delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/12/06:09:37

Date: Mon, 12 Jul 1999 13:07:14 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: George Ryot <ryot AT bigfoot DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Implicit make rules fail to link with std C++ library
In-Reply-To: <3788d992.10402823@news.clara.net>
Message-ID: <Pine.SUN.3.91.990712130110.1868A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 11 Jul 1999, George Ryot wrote:

> What I am trying to acheive is a makefile that has a reasonable chance
> of working on different platforms, is it safe to assume that CXXFLAGS
> will work or should I set CFLAGS as normal then do CXXFLAGS=$(CFLAGS)?

Define "different platforms".  Do you need that Makfile to work with 
non-GNU Make and non-GNU C/C++ compilers?  If so, then your problem has 
no simple solution.  You will probably need some configuration script 
that will detect the flavor of Make and the compiler and build Makefiles 
from some template.

If you want it to be portable to GNU tools on other platforms, that's 
easier, but you still have problems with g++ vs gxx and libstdc++ vs 
libstdcxx.

> Thanks for the help, I still don't understand why the default
> behaviour of make doesn't cater for building c++ projects, but at
> least I now have a working makefile.

The defaults do work for C++ projects, but they are correct for Unix 
systems, and nobody cared enough to make them tailored to DJGPP in the 
DJGPP port of Make.  (I guess most people don't use built-in rules too 
much, that's why nobody complained.)

- Raw text -


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