Mail Archives: djgpp/2001/08/15/11:27:24
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 -