what is wrong with this rule
1.
=============================================
%.o:%.cpp %.h
$(CC) -c $< $(CCFLAGS) $(INCLUDE_DIR)
==============================================
other rule is
2.
$(PROGS): $(OBJS)
$(CC) $^ -o $@ $(CCFLAGS) $(LDFLAGS)
what i want to happen is when foo.cpp and/or foo.h changes create
foo.o file.
when i make, a bizzare error occurs and jumps to rule 2.
make output
g++ -c -o foo.o foo.cpp
it seems that make was unable to take the $(INCLUDE_DIR)
when i change rule 1 to(without %.h)
=============================================
%.o:%.cpp
$(CC) -c $< $(CCFLAGS) $(INCLUDE_DIR)
==============================================
it compiles fine. but doesnt detect changes of foo.h file
can somebody help with this
indika