delorie.com/archives/browse.cgi | search |
Date: | Wed, 15 Aug 2001 18:04:09 +0300 |
From: | "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il> |
Sender: | halo1 AT zahav DOT net DOT il |
To: | "Patrick Mitran" <pmitran AT tsp DOT ece DOT mcgill DOT ca> |
Message-Id: | <8582-Wed15Aug2001180409+0300-eliz@is.elta.co.il> |
X-Mailer: | Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 |
CC: | djgpp AT delorie DOT com |
In-reply-to: | <ijve7.2399$lc6.1621461@carnaval.risq.qc.ca> |
(pmitran AT tsp DOT ece DOT mcgill DOT ca) | |
Subject: | Re: Makefiles with DJGPP |
References: | <ijve7.2399$lc6 DOT 1621461 AT carnaval DOT risq DOT qc DOT ca> |
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 |
> From: "Patrick Mitran" <pmitran AT tsp DOT ece DOT mcgill DOT ca> > Newsgroups: comp.os.msdos.djgpp > > 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? Test inside the Makefile for the DJDIR variable being defined: ifeq ($(DJDIR),) LIBSTDCXX = -lstdc++ else LIBSTDCXX = -lstdcxx endif then use $(LIBSTDCXX) instead of the literal -lstdcxx. Of course, if someone sets the environment variable DJDIR on GNU/Linux, you are toast; but why would they?
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |