# file : libbutl/buildfile # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file lib{butl}: {hxx ixx txx cxx}{** -win32-utility -version} {hxx}{version} # Exclude these from compilation on non-Windows targets. # if ($cxx.target.class == "windows") lib{butl}: {hxx cxx}{win32-utility} else lib{butl}: file{win32-utility.?xx} # The C-files are included into sha256.cxx (sha256c.c) and timestamp.cxx # (strptime.c timelocal.h timelocal.c), so treat them as files to exclude from # the compilation. # lib{butl}: file{*.c *.h} hxx{version}: in{version} $src_root/file{manifest} hxx{version}: dist = true # For pre-releases use the complete version to make sure they cannot be used # in place of another pre-release or the final version. # if $version.pre_release lib{butl}: bin.lib.version = @"-$version.project_id" else lib{butl}: bin.lib.version = @"-$version.major.$version.minor" bmi{*}: cxx.poptions += -DLIBBUTL_MODULE_BUILD cxx.poptions =+ "-I$out_root" "-I$src_root" obja{*} bmia{*}: cxx.poptions += -DLIBBUTL_STATIC_BUILD objs{*} bmis{*}: cxx.poptions += -DLIBBUTL_SHARED_BUILD lib{butl}: cxx.export.poptions = "-I$out_root" "-I$src_root" liba{butl}: cxx.export.poptions += -DLIBBUTL_STATIC libs{butl}: cxx.export.poptions += -DLIBBUTL_SHARED if ($cxx.target.class == "windows") { if ($cxx.target.system == "mingw32") cxx.libs += -limagehlp else cxx.libs += imagehlp.lib } else cxx.libs += -lpthread # Install into the libbutl/ subdirectory of, say, /usr/include/ recreating # subdirectories. # {mxx hxx ixx txx}{*}: install = include/$project/ {mxx hxx ixx txx}{*}: install.subdirs = true