From 964a1c53a3ac4ac6652f99cefd2abb32cafec071 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Sun, 9 Dec 2012 22:08:51 -0800 Subject: [PATCH] wscript: Attempt to set proper compile/link flags for pthreads. --- FL/wscript | 2 +- mixer/wscript | 2 +- nonlib/wscript | 2 +- sequencer/wscript | 2 +- timeline/wscript | 10 +++++----- wscript | 11 +++++++++++ 6 files changed, 20 insertions(+), 9 deletions(-) diff --git a/FL/wscript b/FL/wscript index eda72a2..89a10d1 100644 --- a/FL/wscript +++ b/FL/wscript @@ -22,5 +22,5 @@ test_press.C ''', includes = '.', export_incdirs = [ '.' 'FL' ], - uselib = 'NTK', + uselib = 'PTHREAD NTK', target = 'fl_widgets') diff --git a/mixer/wscript b/mixer/wscript index 5984929..eb10c79 100644 --- a/mixer/wscript +++ b/mixer/wscript @@ -65,7 +65,7 @@ src/main.C target = 'non-mixer', includes = ['.', 'src', '../FL', '../nonlib'], use = ['nonlib', 'fl_widgets'], - uselib = [ 'JACK', 'LIBLO', 'LRDF', 'XPM', 'NTK', 'NTK_IMAGES' ], + uselib = [ 'JACK', 'LIBLO', 'LRDF', 'XPM', 'NTK', 'NTK_IMAGES', 'PTHREAD' ], install_path = '${BINDIR}') bld( features = 'subst', diff --git a/nonlib/wscript b/nonlib/wscript index 50e5366..6c5d234 100644 --- a/nonlib/wscript +++ b/nonlib/wscript @@ -23,5 +23,5 @@ string_util.C ''', includes = '.', export_incdirs = [ '.', 'nonlib'], - uselib = 'LIBLO JACK', + uselib = 'LIBLO JACK PTHREAD', target = 'nonlib') diff --git a/sequencer/wscript b/sequencer/wscript index fc49cd5..2a3b1c8 100644 --- a/sequencer/wscript +++ b/sequencer/wscript @@ -68,7 +68,7 @@ src/transport.C target = 'non-sequencer', includes = ['.', 'src', 'src/gui', '../FL', '../nonlib'], use = ['nonlib', 'fl_widgets'], - uselib = [ 'JACK', 'SIGCPP', 'LIBLO', 'XPM', 'NTK', 'NTK_IMAGES'], + uselib = [ 'JACK', 'SIGCPP', 'LIBLO', 'XPM', 'NTK', 'NTK_IMAGES', 'PTHREAD'], install_path = '${BINDIR}') bld( features = 'subst', diff --git a/timeline/wscript b/timeline/wscript index 64f28d5..f361c65 100644 --- a/timeline/wscript +++ b/timeline/wscript @@ -25,10 +25,10 @@ def configure(conf): conf.load('compiler_cxx') conf.load('gnu_dirs') - conf.env.append_value('CFLAGS', '-D_LARGEFILE64_SOURCE') - conf.env.append_value('CFLAGS', '-D_FILE_OFFSET_BITS=64') - conf.env.append_value('CXXFLAGS', '-D_LARGEFILE64_SOURCE') - conf.env.append_value('CXXFLAGS', '-D_FILE_OFFSET_BITS=64') + # conf.env.append_value('CFLAGS', '-D_LARGEFILE64_SOURCE') + # conf.env.append_value('CFLAGS', '-D_FILE_OFFSET_BITS=64') + # conf.env.append_value('CXXFLAGS', '-D_LARGEFILE64_SOURCE') + # conf.env.append_value('CXXFLAGS', '-D_FILE_OFFSET_BITS=64') conf.check_cfg(package='sndfile', uselib_store='SNDFILE',args="--cflags --libs", atleast_version='1.0.17', mandatory=True) @@ -91,7 +91,7 @@ src/main.C ''', target = 'non-daw', includes = ['.', 'src', '../FL', '../nonlib'], - uselib = [ 'JACK', 'LIBLO', 'SNDFILE', 'XPM', 'NTK', 'NTK_IMAGES'], + uselib = [ 'JACK', 'LIBLO', 'SNDFILE', 'XPM', 'NTK', 'NTK_IMAGES', 'PTHREAD'], use = [ 'fl_widgets', 'nonlib'], install_path = '${BINDIR}') diff --git a/wscript b/wscript index 05f3386..80e06d8 100644 --- a/wscript +++ b/wscript @@ -42,6 +42,7 @@ def configure(conf): debug_flags = [ '-g' ] + if Options.options.debug: conf.env.append_value('CFLAGS', debug_flags ) conf.env.append_value('CXXFLAGS', debug_flags ) @@ -56,6 +57,16 @@ def configure(conf): # conf.env.append_value('CXXFLAGS',['-Wall','-fno-exceptions', '-fno-rtti']) conf.env.append_value('CXXFLAGS',['-Wall','-fno-rtti']) + global_flags = [ '-pthread', + '-D_LARGEFILE64_SOURCE', + '-D_FILE_OFFSET_BITS=64', + '-D_GNU_SOURCE' ] + + + conf.env.append_value('CFLAGS', global_flags ) + conf.env.append_value('CXXFLAGS', global_flags ) + + conf.env['LIB_PTHREAD'] = ['pthread'] # NTK_EXTRA_FLAGS='' # if not Options.options.use_system_ntk: