Solved

create header file dependencies in make file

Posted on 1998-11-10
6
203 Views
Last Modified: 2010-04-15
How can I create header file dependencies in make file so that it will be portable in all platforms.
0
Comment
Question by:mahh
  • 3
  • 3
6 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 50 total points
Comment Utility
For BSD makefiles, it's usually done like this:

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif

You'll of course have to use 'make depend' to get it working...
0
 

Author Comment

by:mahh
Comment Utility
Please explain in detail about how to do that in unix platforms. It will be helpful if you can explain in AIX version.
0
 
LVL 86

Expert Comment

by:jkr
Comment Utility
Well, i don't know AIX, but the above works on Linux, HP-UX, SCO _and_ NT...
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:mahh
Comment Utility
Your reply is actually good but I did not really understand the steps you have mentioned. Can you explain by giving examples. Also tell me whether any websites I can look to get a clear understanding.
Thanks for your valuable help.
0
 
LVL 86

Expert Comment

by:jkr
Comment Utility
Well, the 'include .depend' directive simply instructs 'make' to evaluate a file called '.depend', that was previously created by running 'make depend' on the current target... I'll see if i can point you to some web sites.
0
 

Author Comment

by:mahh
Comment Utility
Please help me to point to web sites and I still did not understand the answer you provided. I had given the points for not dissapointing you.

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

771 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

10 Experts available now in Live!

Get 1:1 Help Now