aboutsummaryrefslogtreecommitdiff
path: root/libbutl/buildfile
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-05-01 16:08:43 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-05-01 16:59:24 +0300
commit61377c582e0f2675baa5f5e6e30a35d1a4164b33 (patch)
tree11cdca992834d7f7f197f72856712fbcb3020e3d /libbutl/buildfile
parent442c1a6790e52baa0c081f310d4d9e9b6f1ff638 (diff)
Add hxx extension for headers and lib prefix for library dir
Diffstat (limited to 'libbutl/buildfile')
-rw-r--r--libbutl/buildfile93
1 files changed, 93 insertions, 0 deletions
diff --git a/libbutl/buildfile b/libbutl/buildfile
new file mode 100644
index 0000000..a55311c
--- /dev/null
+++ b/libbutl/buildfile
@@ -0,0 +1,93 @@
+# file : libbutl/buildfile
+# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
+# license : MIT; see accompanying LICENSE file
+
+lib{butl}: \
+ {hxx cxx}{ base64 } \
+ {hxx cxx}{ char-scanner } \
+ {hxx }{ const-ptr } \
+ {hxx ixx txx cxx}{ curl } \
+ {hxx cxx}{ diagnostics } \
+ {hxx }{ export } \
+ {hxx ixx cxx}{ fdstream } \
+ {hxx ixx cxx}{ filesystem } \
+ {hxx }{ manifest-forward } \
+ {hxx cxx}{ manifest-parser } \
+ {hxx cxx}{ manifest-serializer } \
+ {hxx }{ multi-index } \
+ {hxx }{ optional } \
+ {hxx cxx}{ pager } \
+ {hxx ixx txx cxx}{ path } \
+ {hxx }{ path-io } \
+ {hxx }{ path-map } \
+ {hxx txx }{ prefix-map } \
+ {hxx ixx cxx}{ process } \
+ {hxx }{ process-details } \
+ {hxx }{ process-io } \
+ { txx cxx}{ process-run } \
+ {hxx ixx cxx}{ sendmail } \
+ {hxx cxx}{ sha256 } \
+ {hxx }{ small-vector } \
+ {hxx ixx cxx}{ standard-version } \
+ {hxx cxx}{ string-parser } \
+ {hxx txx }{ string-table } \
+ {hxx cxx}{ tab-parser } \
+ {hxx cxx}{ target-triplet } \
+ {hxx cxx}{ timestamp } \
+ {hxx ixx cxx}{ utility } \
+ {hxx }{ vector-view } \
+ {hxx }{ version } \
+ft/{hxx }{ exception } \
+ft/{hxx }{ lang } \
+ft/{hxx }{ shared_mutex }
+
+# 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.hxx win32-utility.cxx }
+
+# This one is included into sha256.cxx so treat it as file to exclude
+# from the compilation.
+#
+lib{butl}: file{sha256c.c}
+
+# These ones are included into timestamp.cxx so treat them as files to exclude
+# from the compilation.
+#
+lib{butl}: file{strptime.c timelocal.h timelocal.c}
+
+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"
+
+cxx.poptions =+ "-I$out_root" "-I$src_root"
+obja{*}: cxx.poptions += -DLIBBUTL_STATIC_BUILD
+objs{*}: 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 += -lpsapi
+ else
+ cxx.libs += psapi.lib
+}
+else
+ cxx.libs += -lpthread
+
+# Install into the libbutl/ subdirectory of, say, /usr/include/.
+#
+install.include = $install.include/libbutl/
+install.include.subdirs = true # Recreate subdirectories.