Solved

How to add dependency on .hxx files in Makefile

Posted on 2004-08-09
1
206 Views
Last Modified: 2010-04-21
The subject says it all - I want my Makefile to correctly recompile everything when I change my .hxx header files. It doesnt do that at the moment - it requires a manual make clean then make.
0
Comment
Question by:Risky101
1 Comment
 
LVL 22

Accepted Solution

by:
NovaDenizen earned 125 total points
ID: 11796787
Use the makedepend utility.  That will parse your source files and learn all the include files your sources depend on.  Then, it will add extra dependencies onto your Makefile.

To use makedepend, add this entry to your Makefile.  Make sure SRCS is a list of all of your source files
depend:
          makedepend -- $(CFLAGS) -- $(SRCS)

After you edit your Makefile, run "make depend" to make the new line in the Makefile execute.  Look in your Makefile afterwards and you will see that all the necessary include dependencies have been added.  


0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now