Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 237
  • Last Modified:

How to add dependency on .hxx files in Makefile

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
Risky101
Asked:
Risky101
1 Solution
 
NovaDenizenCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now