Mail Archives: djgpp/1995/09/22/07:37:41

Xref: comp.os.msdos.djgpp:2120
From: Roland Exler <R DOT Exler AT jk DOT uni-linz DOT ac DOT at>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Help: Make with auto-dependencies
Date: 21 Sep 1995 06:43:15 GMT
Organization: Institute for el. Measurement, University of Linz, Austria
Lines: 57
References: <DF4BwA DOT D6F AT jade DOT mv DOT net>
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

This is a multi-part message in MIME format.

Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii

I use the following makefile for creation of an library, it's easy to 
change it to compile and link and exe instead. 

The -MM flag controls which header-files to search. -MM searches only 
files included with "file", -M would search files included with <file> 
too. See the manual of gcc for more information.

Hope this helps, 


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

Content-Transfer-Encoding: 7bit
Content-Type: text/plain

SOURCES=DvAxBas DvAxis DvDataVc DvGraph DvGraphO DvMath DvPlot DvPoint \
  DvPoints DvScale DvData DvList

LDLIBS= -lgrx -lpc -lm

	$(CC) -MM $(CPPFLAGS) $< | SED 's/$*.o/& $@/g' > $@

%.exe: %
	strip $<
	coff2exe $<

libplot.a: $(SOURCES:=.o)
	ar -rs $@ $^
	ranlib $@.a

include $(SOURCES:=.d)

# clear Directory
	del *.d
	del *.o


- Raw text -

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