Date: Wed, 15 Aug 2001 17:26:51 +0200 (MET DST) From: Gisle Vanem To: djgpp AT delorie DOT com Subject: Re: Makefiles with DJGPP In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 15 Aug 2001, Patrick Mitran wrote: > I'm trying to write a makefile that will run with DJGPP and Linux. There is > only > one issue that troubles me. I have a line > > LDLIBS = -lm -lstdcxx > > in my makefile. In DJGPP, this links fine, no problem. In linux, I would > need > the second library to be -lstdc++ instead. How can I make the makefile > detect the build environment and choose the right library? For example: ifeq ($(DJDIR)-,-) LDLIBS = -lm -stdc++ else LDLIBS = -lm -stdcxx endif Assuming you don't define DJDIR in Linux. In DOS(emu), it should be in djgpp.env Gisle V.