Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to add dependency on .hxx files in Makefile

Posted on 2004-08-09
1
Medium Priority
?
231 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 22

Accepted Solution

by:
NovaDenizen earned 500 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

Use Filtering Commands to Process Files in Linux

Learn how to manipulate data with the help of various filtering commands such as `cat`, `fmt`, `pr`, and others in Linux.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

722 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