From ac55a7a0a89fe9a1f39e33ee3445b644c68fa0c1 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 14 Nov 2017 10:39:14 +0200 Subject: Further work on build2 build, support for non-static plugin on Windows --- odb/buildfile | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 odb/buildfile (limited to 'odb/buildfile') diff --git a/odb/buildfile b/odb/buildfile new file mode 100644 index 0000000..e7e3f45 --- /dev/null +++ b/odb/buildfile @@ -0,0 +1,50 @@ +# file : odb/buildfile +# copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC +# license : GNU GPL v3; see accompanying LICENSE file + +define plugin: libs +plugin{*}: bin.lib.prefix = # No lib prefix. +plugin{*}: install = # @@ TODO + +import libs = libcutl%lib{cutl} +import libs += libstudxml%lib{studxml} + +plugin_dir = $config.odb.plugin_dir + +./: exe{odb} plugin{odb} + +exe{odb}: cxx{odb} +exe{odb}: libus{odb}: bin.whole = false + +plugin{odb}: libus{odb} + +if ($cxx.target.system == 'mingw32') + plugin{odb}: $plugin_dir/liba{cc1plus.exe.a} + +libus{odb}: {hxx ixx txx cxx}{** -odb -options} {hxx ixx cxx}{options} $libs + +cxx.poptions += -DODB_BUILD2 # @@ TMP while supporting other build systems. + + +# Don't install any of the plugin's headers. +# +{hxx ixx txx}{*}: install = false + +# Generated options parser. +# +if $cli.configured +{ + cli.cxx{options}: cli{options} + + cli.options += --include-with-brackets --include-prefix odb \ +--guard-prefix ODB --generate-file-scanner --generate-specifier \ +--generate-modifier --generate-description --suppress-undocumented \ +--cxx-prologue '#include ' + + # Include the generated cli files into the distribution and don't remove + # them when cleaning in src (so that clean results in a state identical to + # distributed). + # + cli.cxx{*}: dist = true + cli.cxx{*}: clean = ($src_root != $out_root) +} -- cgit v1.1