delorie.com/archives/browse.cgi | search |
Xref: | news2.mv.net comp.os.msdos.djgpp:6871 |
From: | Roland Exler <R DOT Exler AT jk DOT uni-linz DOT ac DOT at> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: make automatic dependency generation |
Date: | Tue, 06 Aug 1996 09:37:22 -0700 |
Organization: | Institute for el. Measurement, University of Linz, Austria |
Lines: | 50 |
Message-ID: | <320774C2.73B9@jk.uni-linz.ac.at> |
References: | <3205D74D DOT 2781E494 AT dra DOT hmg DOT gb> |
NNTP-Posting-Host: | sensor4.emt.uni-linz.ac.at |
Mime-Version: | 1.0 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Ian Miller wrote: > > If you ever read the make info about automatic dependency > generation but couldn't get it working for djgpp follow the > example I give below. The important (and difficult) part is > the sed expression. The rest I include for completishness.I've not tried where the problem in your makefile is, maybe the command-call. Take a look at the makefile below, this one runs. It used sed to include the .d-files in the dependencies, but I've seen this is not neccesary for gnu-make, it automatically recognices to rebuild the dependencies as they are included! Hope this helps, Roland ----------------- begin example-makefile --------------------- SOURCES=test pcx pcxfile pcxreg filebuf CXXFLAGS=-Wall -O2 TARGET_ARCH=-m486 LDLIBS= -lgr %.d: %.cc $(CC) -MM $(CPPFLAGS) $< | SED 's/$*.o/& $@/g' > $@ %.exe: % strip $< coff2exe $< exe: pcx.exe pcx.exe: test.exe copy test.exe pcx.exe test: $(SOURCES:=.o) include $(SOURCES:=.d) # clear Directory clear: del *.o del *.d del *.bkp +---------------------------------------+---------------------------+ I Roland Exler I EMAIL: I I Universitaet Linz I R DOT Exler AT jk DOT uni-linz DOT ac DOT at I I Institut fuer Elektrische Messtechnik I I I Altenbergerstr. 69 I Phone: I I A-4040 Linz, AUSTRIA I + 43 732 2468 9205 I +---------------------------------------+---------------------------+
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |