delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/11/17/11:03:22

Date: Fri, 17 Nov 1995 08:34:36 -0500
From: dj (DJ Delorie)
To: nicolas AT jupiter DOT ceng DOT cea DOT fr
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: makedepend program ??

> I'm using djgpp for years, and I'm learning U..X system at my office. So I
> discovered the wonderfull makedepend program.
> 
> I wanted to use the same stuff at home on djgpp, but I didn't found any
> makedepend program in /bin directory, in V1.12m4 like in v2beta.
> 
> Can someone tell me where I can found such a proram for djgpp ?

gcc has a much more powerful feature.  In your Makefile, add the "-MD"
or "-MMD" options to gcc.  Then, add this at the end of your Makefile:

	DEPS := $(wildcard *.d)
	ifneq ($(DEPS),)
	include $(DEPS)
	endif

gcc will automatically generate dependencies as it compiles, and make
will automatically use any that gcc has generated.  This is much more
reliable than using makedepend.

For an example, see the V2 libc makefiles.

DJ

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019