Mail Archives: djgpp/1999/07/12/06:09:37
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 -