Files
iostreams/build/bzip2.jam
Jonathan Turkanis c0564c3c7c initial commitment
[SVN r26900]
2005-01-28 23:54:41 +00:00

83 lines
2.5 KiB
Plaintext
Executable File

# Boost.Iostreams Library Build Jamfile
# (C) Copyright Jonathan Turkanis 2004
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
# See http://www.boost.org/libs/iostreams for documentation.
# For use in conjunction with the libbzip2 data compression library by Julian
# Seward. See http://www.zlib.org/ to obtain libbzip2 if it is not installed
# on your system, or if you wish to build it with different compiler or linker
# options.
rule bzip2_config
{
local SOURCES = blocksort bzlib compress crctable decompress huffman
mk251 randtable ;
BZIP2_INCLUDE = [ unless $(BZIP2_INCLUDE) : $(BZIP2_SOURCE) ] ;
local WINDOWS = ;
if ! $(BZIP2_SOURCE) && ! $(BZIP2_BINARY)
{
if $(NT) && ! [ MATCH (.*gcc.*) : $(TOOLS) ]
{
WINDOWS = 1 ;
BZIP2_BINARY = "libbz2" ;
}
else
{
BZIP2_BINARY = "bz2" ;
}
}
if $(BZIP2_SOURCE)
{
template bzip2_common
: # sources
$(BZIP2_SOURCE)/$(SOURCES).c
: # build requirements
[ common-names ] # magic for install and auto-link features
<include>$(BZIP2_INCLUDE)
: # build variants
debug release
;
lib boost_bzip2
: # sources
<template>bzip2_common
: # build requirements
: # build variants
;
dll boost_bzip2 # Need support for .def files.
: # sources
<template>bzip2_common
: # build requirements
<runtime-link>dynamic # build only for dynamic runtimes
: # build variants
;
install bzip2 lib
: <lib>boost_bzip2
[ unless $(WINDOWS) : <dll>boost_bzip2 ]
;
}
}
bzip2_config ;
template bzip2
: # sources
[ unless $(NO_BZIP2)$(NO_COMPRESSION) : ../src/bzip2.cpp ]
[ cond $(BZIP2_SOURCE) : <lib>boost_bzip2 : ]
: # build requirements
[ unless $(NO_BZIP2)$(NO_COMPRESSION) : <include>$(BZIP2_INCLUDE) ]
[ unless $(BZIP2_SOURCE) : <define>BOOST_BZIP2_BINARY=$(BZIP2_BINARY) ]
[ cond $(BZIP2_LIBPATH) : <library-path>$(BZIP2_LIBPATH) : ]
[ unless $(BZIP2_SOURCE) : <find-library>$(BZIP2_BINARY) : ]
: # build variants
;
# end