Boost logo

Boost-Build :

From: pal.tw (b84037_at_[hidden])
Date: 2003-11-02 23:20:13


Recently I attempt to merge codes of several projects
into one single DLL module. Like the following.
##############################################################
project Images
: source-location $(SOURCE_ROOT)/images
;

local SOURCE_FILES =
blocksort.c bzlib.c compress.c crctable.c decompress.c huffman.c
randtable.c ;

alias bzlib : bzlib/$(SOURCE_FILES) : <link>shared:<define>BZ_EXPORT ;

#---------------------------------------------------------------
SOURCE_FILES = adler32.c compress.c crc32.c gzio.c uncompr.c
deflate.c trees.c
zutil.c inflate.c infblock.c inftrees.c infcodes.c infutil.c
inffast.c ;

alias zlib : zlib/$(SOURCE_FILES) ;

#---------------------------------------------------------------
SOURCE_FILES = png.c pngerror.c pngget.c pngmem.c pngpread.c
pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c
pngtrans.c pngvcrd.c pngwio.c pngwrite.c pngwtran.c
pngwutil.c ;

alias libpng : png/$(SOURCE_FILES) zlib
: <link>shared:<define>PNG_BUILD_DLL
<link>shared:<define>PNG_NO_MODULEDEF
<include>$(INCLUDE_ROOT)/png
: : <include>$(INCLUDE_ROOT)/png ;
;
#---------------------------------------------------------------
lib images : bzlib zlib libpng : : <link>shared
;
##############################################################
Of course the 'requirements' of 'alias' targets will not pass
to the targets who use them.
Hmmm... since 'alias' can be used to group source files,
it might be needed to pass 'requirement' to eventual targets
which really produce final output files.

Another thing... bzlib/compress.c and zlib/compress.c
have the same file name. They could be put into the same moudle,
but alas BBv2 will be broken with 'error: Duplicate name of actual
target'.

- PAL

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk