Apr 2, 2014 at 9:32pm
Hi guys.I have a problem about makefile. I hava a diagram following..
[url=
http://hizliresim.com/x8Gj6V][img]http://i.hizliresim.com/x8Gj6V.jpg[/img][/url]
I wrote a makefile file but I do not know where library file is write??
my makefile:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
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
|
please help?
Last edited on Apr 2, 2014 at 9:32pm
Apr 2, 2014 at 9:52pm
It looks like you need to link it with prog1
Apr 2, 2014 at 10:04pm
OK.But can you show me on code?
Apr 2, 2014 at 10:29pm
thank you very much.Finally,
why did you lpet instead of libpet..?
Apr 2, 2014 at 10:46pm
The -l
argument takes a library name, not a library filename. The filename varies from platform to platform; the name does not.
Apr 3, 2014 at 1:53am
Thank you very much.İt works. Final question, can we save exe files previous directories?
I used mv command but it does not work.