www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/08/15/11:27:24

Date: Wed, 15 Aug 2001 17:26:51 +0200 (MET DST)
From: Gisle Vanem <giva AT bgnett DOT no>
To: djgpp AT delorie DOT com
Subject: Re: Makefiles with DJGPP
In-Reply-To: <ijve7.2399$lc6.1621461@carnaval.risq.qc.ca>
Message-ID: <Pine.UW2.3.95.1010815172355.17869A-100000@bryggen.bgnett.no>
MIME-Version: 1.0
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

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.

- Raw text -


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