X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=wscript;h=9068290a9051e490792104f6a3b019eb1a2c0e74;hb=7e10eec3c2ed47b83510fbbecb453fd85a9a7131;hp=bf9b7bacba4aa69bb3d9bb71085b66bff216c6e7;hpb=d48e916ef13145c0238c34d1a3b6969885d09c07;p=ardour.git diff --git a/wscript b/wscript index bf9b7bacba..9068290a90 100644 --- a/wscript +++ b/wscript @@ -27,11 +27,6 @@ class i18n_mo(BuildContext): cmd = 'i18n_mo' fun = 'i18n_mo' -def is_tracks_build(self, *k, **kw): - return self.env['PROGRAM_NAME'] == 'Tracks Live' - -Context.Context.is_tracks_build = is_tracks_build - compiler_flags_dictionaries= { 'gcc' : { # Flags required when building a debug build @@ -404,6 +399,10 @@ int main() { return 0; }''', conf.env['build_host'] = 'sierra' elif re.search ("^17[.]", version) != None: conf.env['build_host'] = 'high_sierra' + elif re.search ("^18[.]", version) != None: + conf.env['build_host'] = 'mojave' + elif re.search ("^19[.]", version) != None: + conf.env['build_host'] = 'catalina' else: conf.env['build_host'] = 'irrelevant' @@ -431,8 +430,12 @@ int main() { return 0; }''', conf.env['build_target'] = 'el_capitan' elif re.search ("^16[.]", version) != None: conf.env['build_target'] = 'sierra' + elif re.search ("^17[.]", version) != None: + conf.env['build_target'] = 'high sierra' + elif re.search ("^18[.]", version) != None: + conf.env['build_target'] = 'mojave' else: - conf.env['build_target'] = 'high_sierra' + conf.env['build_target'] = 'catalina' else: match = re.search( "(?Pi[0-6]86|x86_64|powerpc|ppc|ppc64|arm|s390x?)", @@ -453,11 +456,11 @@ int main() { return 0; }''', # compiler_flags.append ('-U__STRICT_ANSI__') - if opt.use_libcpp or conf.env['build_host'] in [ 'el_capitan', 'sierra', 'high_sierra' ]: + if opt.use_libcpp or conf.env['build_host'] in [ 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' ]: cxx_flags.append('--stdlib=libc++') linker_flags.append('--stdlib=libc++') - if conf.options.cxx11 or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra' ]: + if conf.options.cxx11 or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' ]: conf.check_cxx(cxxflags=["-std=c++11"]) cxx_flags.append('-std=c++11') if platform == "darwin": @@ -465,7 +468,7 @@ int main() { return 0; }''', # from requiring a full path to requiring just the header name. cxx_flags.append('-DCARBON_FLAT_HEADERS') - if not opt.use_libcpp and not conf.env['build_host'] in [ 'el_capitan', 'sierra', 'high_sierra' ]: + if not opt.use_libcpp and not conf.env['build_host'] in [ 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' ]: cxx_flags.append('--stdlib=libstdc++') linker_flags.append('--stdlib=libstdc++') # Prevents visibility issues in standard headers @@ -474,7 +477,7 @@ int main() { return 0; }''', cxx_flags.append('-DBOOST_NO_AUTO_PTR') - if (is_clang and platform == "darwin") or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra' ]: + if (is_clang and platform == "darwin") or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' ]: # Silence warnings about the non-existing osx clang compiler flags # -compatibility_version and -current_version. These are Waf # generated and not needed with clang @@ -590,7 +593,7 @@ int main() { return 0; }''', ("-DMAC_OS_X_VERSION_MAX_ALLOWED=1090", "-mmacosx-version-min=10.8")) - elif conf.env['build_target'] in ['el_capitan', 'sierra', 'high_sierra' ]: + elif conf.env['build_target'] in ['el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' ]: compiler_flags.extend( ("-DMAC_OS_X_VERSION_MAX_ALLOWED=1090", "-mmacosx-version-min=10.9")) @@ -712,9 +715,6 @@ def create_resource_file(icon): print('Could not open gtk2_ardour/windows_icon.rc for writing\n') sys.exit(-1) -def is_tracks_build (conf): - return conf.env['PROGRAM_NAME'] == 'Tracks Live' - #---------------------------------------------------------------- # Waf stages @@ -871,8 +871,7 @@ def configure(conf): # but first make sure that all build-hosts (incl. OSX-10.5/PPC) have that python lib. # lazy approach: just use major version 2.X.X if itstool != "itstool" or version[0] < "2": - print("--freedesktop requires itstool > 2.0.0 to translate files.") - sys.exit(-1) + conf.fatal("--freedesktop requires itstool > 2.0.0 to translate files.") conf.env['VERSION'] = VERSION conf.env['MAJOR'] = MAJOR @@ -967,9 +966,6 @@ def configure(conf): # off processor type. Need to add in a check # for that. # - conf.env.append_value('CXXFLAGS_OSX', '-F/System/Library/Frameworks') - conf.env.append_value('CXXFLAGS_OSX', '-F/Library/Frameworks') - conf.env.append_value('LINKFLAGS_OSX', ['-framework', 'AppKit']) conf.env.append_value('LINKFLAGS_OSX', ['-framework', 'CoreAudio']) conf.env.append_value('LINKFLAGS_OSX', ['-framework', 'CoreAudioKit']) @@ -1225,8 +1221,7 @@ int main () { return 0; } backends += ['dummy'] if not backends: - print("Must configure and build at least one backend") - sys.exit(1) + conf.fatal("Must configure and build at least one backend") conf.env['BACKENDS'] = backends conf.env['BUILD_JACKBACKEND'] = any('jack' in b for b in backends) @@ -1238,38 +1233,35 @@ int main () { return 0; } if (Options.options.use_lld): if re.search ("linux", sys.platform) != None and Options.options.dist_target != 'mingw' and conf.env['BUILD_PABACKEND']: - print("lld is only for Linux builds") + conf.fatal("lld is only for Linux builds") else: - try: - conf.find_program ('lld') - conf.env.append_value('LINKFLAGS', '-fuse-ld=lld') - print ("Using the lld linker") - except conf.errors.ConfigurationError: - pass + conf.find_program ('lld') + conf.env.append_value('LINKFLAGS', '-fuse-ld=lld') if re.search ("linux", sys.platform) != None and Options.options.dist_target != 'mingw' and conf.env['BUILD_PABACKEND']: - print("PortAudio Backend is not for Linux") - sys.exit(1) + conf.fatal("PortAudio Backend is not for Linux") if sys.platform != 'darwin' and conf.env['BUILD_CORECRAPPITA']: - print("Coreaudio backend is only available for OSX") - sys.exit(1) + conf.fatal("Coreaudio backend is only available for OSX") if re.search ("linux", sys.platform) == None and conf.env['BUILD_ALSABACKEND']: - print("ALSA Backend is only available on Linux") - sys.exit(1) + conf.fatal("ALSA Backend is only available on Linux") if re.search ("linux", sys.platform) == None and conf.env['BUILD_PULSEAUDIO']: - print("Pulseaudio Backend is only available on Linux") - sys.exit(1) + conf.fatal("Pulseaudio Backend is only available on Linux") if conf.env['BUILD_PULSEAUDIO'] and not conf.is_defined('HAVE_PULSEAUDIO'): - print("Pulseaudio Backend requires libpulse-dev") - sys.exit(1) + conf.fatal("Pulseaudio Backend requires libpulse-dev") set_compiler_flags (conf, Options.options) + if conf.env['build_host'] not in [ 'mojave', 'catalina']: + conf.env.append_value('CXXFLAGS_OSX', '-F/System/Library/Frameworks') + print("**** YES ADDING FRAMEWORKS") + + conf.env.append_value('CXXFLAGS_OSX', '-F/Library/Frameworks') + if sys.platform == 'darwin': sub_config_and_use(conf, 'libs/appleutility') elif re.search ("openbsd", sys.platform) != None: @@ -1345,6 +1337,7 @@ const char* const ardour_config_info = "\\n\\ write_config_text('Translation', opts.nls) # write_config_text('Tranzport', opts.tranzport) write_config_text('Unit tests', conf.env['BUILD_TESTS']) + write_config_text('Use LLD linker', opts.use_lld) write_config_text('Windows VST support', opts.windows_vst) write_config_text('Wiimote support', conf.is_defined('BUILD_WIIMOTE')) write_config_text('Windows key', opts.windows_key) @@ -1390,11 +1383,6 @@ def build(bld): # set up target directories lwrcase_dirname = 'ardour' + bld.env['MAJOR'] - if bld.is_tracks_build(): - bld.env.append_value ('CXXFLAGS', '-DUSE_TRACKS_CODE_FEATURES') - bld.env.append_value ('CFLAGS', '-DUSE_TRACKS_CODE_FEATURES') - lwrcase_dirname = 'trx' - # configuration files go here bld.env['CONFDIR'] = os.path.join(bld.env['SYSCONFDIR'], lwrcase_dirname) # data files loaded at run time go here