Solved

How to add dependency on .hxx files in Makefile

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

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 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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

623 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