Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using the Make Utility

Status
Not open for further replies.

PhilDonovan

Programmer
Aug 6, 2004
1
GB
I am maintaining a large project, using the make utility.
All the C++ source files are in one directory and the headers are in another directory.
When I change the source code the compiler picks up the changes and compiles. When I change the header files, the compiler does not pick the changes.

Header files:
cflags = /app1/include/BrokerTec/PriceHeader/...
Source Code:
OBJS = BTECPriceFeedRepo.o ...
Compile:
target: ${OBJS} ${CC} ${cflags} -o target

The make file is in the same directory as the source files.
How can I get the make to recognize the changs to the header files???

Thanks so Much
 
You also need to add some header file dependencies to your makefile

Code:
prog.c : header.h

If you're using gcc, then look at the various [tt]-M[/tt] options for creating dependency information automatically.

--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top