There are five filesĀ 
(first.c (includes the main function), f1.c,f2.c f1.h and f2.h) in the project. 
I want to write makefile such that it compiles only those files in which 
changes are made... My makefile commands are:

all: firstfist: first.o f1.o f2.o
gcc first.o f1.o f2.o -o first
first.o: first.c f1.c f2.c
gcc -Wall -c -o first.o first.c
f1.o: f1.c f1.h
gcc -Wall -c -o f1.o f1.c
f2.o: f2.c f2.h
gcc -Wall -c -o f2.o f2.c


but the compiler gives me error that f1.h and f2.h not exist.




      
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to