Solved

How to add dependency on .hxx files in Makefile

Posted on 2004-08-09
1
224 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

735 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