From 5a841ef4624ef4b776e578af80d2397241754b00 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 22 Jan 2020 00:47:33 +0100 Subject: 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) --- wscript | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'wscript') 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 { -- cgit v1.2.3