Boost logo

Boost :

From: Dan Nuffer (dnuffer_at_[hidden])
Date: 2001-02-19 13:44:21


John Maddock wrote:
>
> >Luckily there is the makefile lib/gcc-shared.mak which can make a shared
> >library. Unfortunately it doesn't have CXXFLAGS! So, I would propose
> >to either fix the configure script to create a makefile that has support
> >for compiling a shared library, or add CXXFLAGS support to lib/gcc.mak
> >and lib/gcc-shared.mak
>
> Thanks for pointing that out: do you have a sample "typical" makefile that
> corresponds to the format you require? (Humour me I'm mostly a win32
> programmer...).
>

Well, I don't know if there is a "typical" makefile configuration, but
here are some of the rules and definitions from a makefile generated by
automake:

DEFS = -DPACKAGE=\"openwbem\" -DVERSION=\"1.0\" -DYYTEXT_POINTER=1 -I.
-I$(srcdir)
CPPFLAGS =
LDFLAGS =
LIBS =
CXXFLAGS = -g -O2
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(AM_CXXFLAGS) $(CXXFLAGS)

.cpp.o:
   $(CXXCOMPILE) -c $<

Thus the user can override any number of things:
compiler - CXX
defines - DEFS
include directories - INCLUDES
debug/optimization/warning flags - CXXFLAGS
linker flags - LDFLAGS
additional libraries - LIBS

--Dan Nuffer


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk