Date: Mon, 25 Nov 1996 19:46:09 -0500 (EST) From: Frank Donahoe To: Koen DOT VanHerck AT barco DOT com Cc: DJGPP List Subject: Re: DJGPP path from makefile In-Reply-To: <9611251613.AA11043@ivs4.> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 25 Nov 1996, Koen Van Herck wrote: > > does anyone know if it is possible to detect the installation path of > djgpp in a makefile ? I want to do the following: > > INSTALLDIR = a:/ > DJGPP_PATH = ????? > > install: > cp $(DJGPP_PATH)/bin/cwsdpmi.exe $(INSTALLDIR) > cp myprog.exe $(INSTALLDIR) ; . . . Add a section to your djgpp.env file, for example: - - - - [make] CC=gcc prefix=%\>:prefix%%\DJDIR% LIB_PATH=%\>;LIB_PATH%%\DJDIR%\lib - - - - I have used back-slashes because the gnu utilities understand both types, some DOS constructs eat forward-slashes, and not everyone will have cp, install, mv and rm but must make do with copy, move and del. It is trivial to convert the expressions back to forward slashes. With this addition one can refer in the makefile to $(CC), $(prefix), $(LIB_PATH) etc. as many items as are in the djgpp.env file for make. Regards, Frank