summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-01-22 00:47:33 +0100
committerRobin Gareus <robin@gareus.org>2020-01-25 04:07:42 +0100
commit5a841ef4624ef4b776e578af80d2397241754b00 (patch)
tree792514a39b03e1f446faf6df7de555019f15d2d6 /wscript
parent06b2eb1c277c35e653b9117b194eadbb65dcbb66 (diff)
Tweaks to build/package scripts for new waf
* Windows: delete waf installed .dll.a files * Windows: override waf's conf.env.LIBDIR = conf.env.BINDIR with explicit --libdir * Windows: fix asm (`x86_64-w64-mingw32-as` -D flag is for debug messages, -D defines are not available) * Mac: override waf adding -install_name (and -Wl,-compatibility_version -Wl,-current_version) by moving -dynamiclib from linkflags to ldflags * Mac: Allow libs with compat version number suffix (not needed anymore, but may help in the future)
Diffstat (limited to 'wscript')
-rw-r--r--wscript17
1 files changed, 17 insertions, 0 deletions
diff --git a/wscript b/wscript
index e1beb6a86d..b0d60e59bb 100644
--- a/wscript
+++ b/wscript
@@ -943,6 +943,12 @@ def configure(conf):
conf.env.append_value ('CXXFLAGS', '-DSILENCE_AFTER')
conf.define ('FREEBIE', 1)
+ # set explicit LIBDIR, otherwise mingw/windows builds use
+ # conf.env.LIBDIR = conf.env.BINDIR and `waf install` fails
+ # because $BINDIR/ardour6 is the main binary, and $LIBDIR/ardour6/ a directory
+ if Options.options.libdir:
+ conf.env.LIBDIR = Options.options.libdir
+
if Options.options.lv2dir:
conf.env['LV2DIR'] = Options.options.lv2dir
else:
@@ -1299,6 +1305,17 @@ int main () { return 0; }
# Fix utterly braindead FLAC include path to not smash assert.h
conf.env['INCLUDES_FLAC'] = []
+ if sys.platform == 'darwin':
+ # override waf's -install_name added in
+ # waflib/Tools/ccroot.py when -dynamiclib is used
+ if conf.env.LINKFLAGS_cshlib:
+ conf.env.LINKFLAGS_cshlib = [];
+ conf.env.LDFLAGS_cshlib = ['-dynamiclib']
+
+ if conf.env.LINKFLAGS_cxxshlib:
+ conf.env.LINKFLAGS_cxxshlib = [];
+ conf.env.LDFLAGS_cxxshlib = ['-dynamiclib']
+
config_text = open('libs/ardour/config_text.cc', "w")
config_text.write('''#include "ardour/ardour.h"
namespace ARDOUR {