wscript: Attempt to set proper compile/link flags for pthreads.

This commit is contained in:
Jonathan Moore Liles 2012-12-09 22:08:51 -08:00
parent bae6e38504
commit 964a1c53a3
6 changed files with 20 additions and 9 deletions

View File

@ -22,5 +22,5 @@ test_press.C
''', ''',
includes = '.', includes = '.',
export_incdirs = [ '.' 'FL' ], export_incdirs = [ '.' 'FL' ],
uselib = 'NTK', uselib = 'PTHREAD NTK',
target = 'fl_widgets') target = 'fl_widgets')

View File

@ -65,7 +65,7 @@ src/main.C
target = 'non-mixer', target = 'non-mixer',
includes = ['.', 'src', '../FL', '../nonlib'], includes = ['.', 'src', '../FL', '../nonlib'],
use = ['nonlib', 'fl_widgets'], use = ['nonlib', 'fl_widgets'],
uselib = [ 'JACK', 'LIBLO', 'LRDF', 'XPM', 'NTK', 'NTK_IMAGES' ], uselib = [ 'JACK', 'LIBLO', 'LRDF', 'XPM', 'NTK', 'NTK_IMAGES', 'PTHREAD' ],
install_path = '${BINDIR}') install_path = '${BINDIR}')
bld( features = 'subst', bld( features = 'subst',

View File

@ -23,5 +23,5 @@ string_util.C
''', ''',
includes = '.', includes = '.',
export_incdirs = [ '.', 'nonlib'], export_incdirs = [ '.', 'nonlib'],
uselib = 'LIBLO JACK', uselib = 'LIBLO JACK PTHREAD',
target = 'nonlib') target = 'nonlib')

View File

@ -68,7 +68,7 @@ src/transport.C
target = 'non-sequencer', target = 'non-sequencer',
includes = ['.', 'src', 'src/gui', '../FL', '../nonlib'], includes = ['.', 'src', 'src/gui', '../FL', '../nonlib'],
use = ['nonlib', 'fl_widgets'], use = ['nonlib', 'fl_widgets'],
uselib = [ 'JACK', 'SIGCPP', 'LIBLO', 'XPM', 'NTK', 'NTK_IMAGES'], uselib = [ 'JACK', 'SIGCPP', 'LIBLO', 'XPM', 'NTK', 'NTK_IMAGES', 'PTHREAD'],
install_path = '${BINDIR}') install_path = '${BINDIR}')
bld( features = 'subst', bld( features = 'subst',

View File

@ -25,10 +25,10 @@ def configure(conf):
conf.load('compiler_cxx') conf.load('compiler_cxx')
conf.load('gnu_dirs') conf.load('gnu_dirs')
conf.env.append_value('CFLAGS', '-D_LARGEFILE64_SOURCE') # conf.env.append_value('CFLAGS', '-D_LARGEFILE64_SOURCE')
conf.env.append_value('CFLAGS', '-D_FILE_OFFSET_BITS=64') # conf.env.append_value('CFLAGS', '-D_FILE_OFFSET_BITS=64')
conf.env.append_value('CXXFLAGS', '-D_LARGEFILE64_SOURCE') # conf.env.append_value('CXXFLAGS', '-D_LARGEFILE64_SOURCE')
conf.env.append_value('CXXFLAGS', '-D_FILE_OFFSET_BITS=64') # conf.env.append_value('CXXFLAGS', '-D_FILE_OFFSET_BITS=64')
conf.check_cfg(package='sndfile', uselib_store='SNDFILE',args="--cflags --libs", conf.check_cfg(package='sndfile', uselib_store='SNDFILE',args="--cflags --libs",
atleast_version='1.0.17', mandatory=True) atleast_version='1.0.17', mandatory=True)
@ -91,7 +91,7 @@ src/main.C
''', ''',
target = 'non-daw', target = 'non-daw',
includes = ['.', 'src', '../FL', '../nonlib'], 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'], use = [ 'fl_widgets', 'nonlib'],
install_path = '${BINDIR}') install_path = '${BINDIR}')

11
wscript
View File

@ -42,6 +42,7 @@ def configure(conf):
debug_flags = [ '-g' ] debug_flags = [ '-g' ]
if Options.options.debug: if Options.options.debug:
conf.env.append_value('CFLAGS', debug_flags ) conf.env.append_value('CFLAGS', debug_flags )
conf.env.append_value('CXXFLAGS', 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-exceptions', '-fno-rtti'])
conf.env.append_value('CXXFLAGS',['-Wall','-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='' # NTK_EXTRA_FLAGS=''
# if not Options.options.use_system_ntk: # if not Options.options.use_system_ntk: