Hi guys.I have a problem about makefile. I hava a diagram following..
I wrote a makefile file but I do not know where library file is write??
dummy: prog1.exe prog2.exe
echo "build done"
prog1.exe: x.o y.o
$(CC) x.o y.o -o prog1.exe
prog2.exe: z.o d.o
$(cc) z.o d.o -o prog2.exe
x.o: x.c defs.h
$(CC) -c x.c
y.o: y.c def2.h def3.h
$(CC) -c y.c
z.o: z.c def2.h def3.h
$(CC) -c z.c
d.o d.c def3.h
$(CC) -c d.c
Last edited on
It looks like you need to link it with prog1
OK.But can you show me on code?
thank you very much.Finally,
why did you lpet instead of libpet..?
-l argument takes a library name, not a library filename. The filename varies from platform to platform; the name does not.
Thank you very much.İt works. Final question, can we save exe files previous directories?
I used mv command but it does not work.