1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
|
# Boost.Iostreams Library Build Jamfile
# (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
# (C) Copyright 2004-2007 Jonathan Turkanis
# 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.
project /boost/iostreams : source-location /home/user/Documents/Conti/boost_1_57_0/libs/iostreams/src ;
# The biggest trick in this Jamfile is to link to zlib and bzip2 when
# needed. To configure that, a number of variables are used, which must
# be set by user with 'path-constant' either in Boost's root Jamfile, or
# in user-config.jam.
# For each library with either link to existing binary, or build
# a library from the sources.
import modules ;
import os ;
import path ;
import ac ;
local debug = [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] ;
for local v in NO_COMPRESSION
NO_ZLIB ZLIB_SOURCE ZLIB_INCLUDE ZLIB_BINARY ZLIB_LIBPATH
NO_BZIP2 BZIP2_SOURCE BZIP2_INCLUDE BZIP2_BINARY BZIP2_LIBPATH
{
$(v) = [ modules.peek : $(v) ] ;
}
if $(NO_COMPRESSION) != 1 && $(NO_ZLIB) != 1
{
using zlib : : <build-name>boost_zlib <tag>@tag : : true ;
}
else
{
if $(debug)
{
ECHO "notice: iostreams: not using zlib compression " ;
}
}
# Given a name of library, either 'zlib', or 'bzip2', creates the necessary
# main target and returns it. If compression is disabled, returns nothing.
# The 'sources' argument is the list of sources names for the library,
# which will be used if building the library.
rule create-library ( library-name : windows-name unix-name : sources + : requirements * )
{
local LIB = $(library-name:U) ;
if ! $(library-name) in zlib bzip2
{
EXIT "Wrong library name passed to 'create-library' in libs/iostream/build/Jamfile.v2" ;
}
if [ os.name ] = NT && ! $($(LIB)_SOURCE) && ! $($(LIB)_INCLUDE)
{
if $(debug)
{
ECHO "notice: iostreams: not using $(library-name) compression " ;
}
NO_$(LIB) = 1 ;
# This is necessary to that test Jamfiles don't run compression
# tests when not needed. Dirty, but I don't have time to
# write full-blow project module for zlib and bzip2.
modules.poke : NO_$(LIB) : 1 ;
}
if $(NO_COMPRESSION)
{
if ! $(NO_COMPRESSION) in 0 1
{
ECHO "warning: NO_COMPRESSION should be either '0' or '1'" ;
}
}
if $(NO_$(LIB))
{
if ! $(NO_$(LIB)) in 0 1
{
ECHO "warning: NO_$(LIB) should be either '0' or '1'" ;
}
}
if $(NO_COMPRESSION) = 1 || $(NO_$(LIB)) = 1
{
if $(debug)
{
ECHO "notice: iostreams: not using $(library-name) compression " ;
}
}
else
{
if ! $($(LIB)_INCLUDE)
{
$(LIB)_INCLUDE = $($(LIB)_SOURCE) ;
}
# Should we use prebuilt library or build it ourselves?
if $($(LIB)_SOURCE)
{
return [ lib boost_$(library-name)
: [ path.glob $($(LIB)_SOURCE) : $(sources).c ]
: <include>$($(LIB)_INCLUDE)
<location-prefix>$(LIB:L)
$(requirements)
:
: <include>$($(LIB)_INCLUDE)
] ;
}
else
{
if $(debug)
{
ECHO "notice: iostreams: using prebuilt $(library-name)" ;
}
# Should use prebuilt library.
if ! $($(LIB)_BINARY)
{
# No explicit name specified, guess it.
if [ os.name ] = NT
{
$(LIB)_BINARY = $(windows-name) ;
lib boost_$(library-name) : : <name>$(windows-name) ;
}
else
{
$(LIB)_BINARY = $(unix-name) ;
}
}
return [ lib boost_$(library-name)
:
: <name>$($(LIB)_BINARY)
<search>$($(LIB)_LIBPATH)
:
: <include>$($(LIB)_INCLUDE)
] ;
}
}
}
local sources = file_descriptor.cpp mapped_file.cpp ;
local bz2 = [ create-library bzip2 : libbz2 bz2 :
blocksort bzlib compress crctable decompress huffman randtable :
<link>shared:<def-file>$(BZIP2_SOURCE)/libbz2.def ] ;
if $(bz2)
{
sources += boost_bzip2 bzip2.cpp ;
}
lib boost_iostreams
: $(sources)
: <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1
<define>BOOST_IOSTREAMS_USE_DEPRECATED
[ ac.check-library /zlib//zlib : <library>/zlib//zlib
<source>zlib.cpp <source>gzip.cpp ]
:
: <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1
;
boost-install boost_iostreams ; |
Partager