help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Makefile


From: Muhammad Bilal
Subject: Makefile
Date: Sat, 31 Jul 2010 05:38:36 -0700 (PDT)

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: first
fist: 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]