Solved

create header file dependencies in make file

Posted on 1998-11-10
6
215 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
ID: 1254151
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
ID: 1254152
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
ID: 1254153
Well, i don't know AIX, but the above works on Linux, HP-UX, SCO _and_ NT...
0
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

Author Comment

by:mahh
ID: 1254154
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
ID: 1254155
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
ID: 1254156
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
memory mapped I/O query 6 142
Converting a float to a string function in c languange 10 204
TCP/IP Socket - connection close results in data lost 14 119
Need example 5 107
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.

930 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