remove use of hardcoded -fPIC compiler flag, and use compiler flag dict instead
This commit is contained in:
parent
d7fca7c828
commit
8ed33f1bc7
@ -78,8 +78,8 @@ def build(bld):
|
||||
audiographer.defines = [ 'LIBAUDIOGRAPHER_DLL_EXPORTS=1' ]
|
||||
else:
|
||||
audiographer = bld.stlib(features = 'c cxx cstlib cxxstlib', source=audiographer_sources)
|
||||
audiographer.cxxflags = [ '-fPIC' ]
|
||||
audiographer.cflags = [ '-fPIC' ]
|
||||
audiographer.cxxflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
audiographer.cflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
audiographer.defines = []
|
||||
|
||||
audiographer.name = 'libaudiographer'
|
||||
|
@ -80,8 +80,8 @@ def build(bld):
|
||||
obj.use = 'libardour libpbd ardouralsautil'
|
||||
obj.install_path = os.path.join(bld.env['LIBDIR'], 'backends')
|
||||
if bld.env['build_target'] != 'mingw':
|
||||
obj.cxxflags = [ '-fPIC' ]
|
||||
obj.cflags = [ '-fPIC' ]
|
||||
obj.cxxflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
obj.cflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
else:
|
||||
obj.cxxflags = [ ]
|
||||
obj.cflags = [ ]
|
||||
|
@ -80,8 +80,8 @@ def build(bld):
|
||||
obj.defines = [ 'LIBCANVAS_DLL_EXPORTS=1' ]
|
||||
else:
|
||||
obj = bld.stlib(features = 'cxx cxxstlib', source=canvas_sources)
|
||||
obj.cxxflags = [ '-fPIC' ]
|
||||
obj.cflags = [ '-fPIC' ]
|
||||
obj.cxxflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
obj.cflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
obj.defines = [ ]
|
||||
|
||||
obj.export_includes = ['.']
|
||||
|
@ -83,8 +83,8 @@ def build(bld):
|
||||
libsmf.use = [ 'libtemporal' ]
|
||||
libsmf.install_path = None
|
||||
if bld.env['build_target'] != 'mingw':
|
||||
libsmf.cxxflags = [ '-fPIC' ]
|
||||
libsmf.cflags = [ '-fPIC' ]
|
||||
libsmf.cxxflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
libsmf.cflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
|
||||
lib_source = '''
|
||||
src/Control.cpp
|
||||
@ -106,8 +106,8 @@ def build(bld):
|
||||
obj.defines = [ 'LIBEVORAL_DLL_EXPORTS' ]
|
||||
else:
|
||||
obj = bld.stlib(features = 'c cxx cstlib cxxstlib', source=lib_source)
|
||||
obj.cxxflags = [ '-fPIC' ]
|
||||
obj.cflags = [ '-fPIC' ]
|
||||
obj.cxxflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
obj.cflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
obj.defines = [ ]
|
||||
|
||||
obj.export_includes = ['.']
|
||||
|
@ -61,7 +61,7 @@ def build(bld):
|
||||
'src/fluid_settings.c',
|
||||
'src/fluid_sys.c'
|
||||
],
|
||||
cflags = [ '-fPIC', '-fvisibility=hidden' ],
|
||||
cflags = [ bld.env['compiler_flags_dict']['pic'], '-fvisibility=hidden' ],
|
||||
includes = ['.', 'src/' ],
|
||||
target = 'libfluidsynth',
|
||||
use = 'libfluidsynth_includes',
|
||||
|
@ -66,7 +66,7 @@ def build(bld):
|
||||
obj.target = 'ardour-vst-scanner.exe.so'
|
||||
obj.uselib = ['GIOMM', 'DL']
|
||||
obj.use = [ 'libpbd' ]
|
||||
obj.cxxflags = [ '-fPIC' ]
|
||||
obj.cxxflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
else:
|
||||
obj = bld (features = 'cxx c cxxprogram')
|
||||
obj.source = ( 'scanner.cc' )
|
||||
|
@ -76,7 +76,7 @@ def build(bld):
|
||||
obj.defines = [ 'LIBGTKMM2EXT_DLL_EXPORTS', 'ABSTRACT_UI_EXPORTS' ]
|
||||
else:
|
||||
obj = bld.stlib(features = 'c cxx cstlib cxxstlib', source=sources)
|
||||
obj.cxxflags = [ '-fPIC' ]
|
||||
obj.cxxflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
obj.defines = [ ]
|
||||
|
||||
obj.export_includes = ['.']
|
||||
|
@ -57,7 +57,7 @@ def build(bld):
|
||||
obj.linkflags = [ '-lsetupapi', '-mwindows' ]
|
||||
obj.uselib = 'SETUPAPI'
|
||||
else:
|
||||
obj.cflags += [ '-fPIC' ]
|
||||
obj.cflags += [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
if sys.platform == 'darwin':
|
||||
obj.source = 'mac/hid.c'
|
||||
obj.framework = [ 'IOKit', 'CoreFoundation' ]
|
||||
|
@ -43,7 +43,7 @@ def build(bld):
|
||||
)
|
||||
|
||||
bld.stlib (source = ['ltc.c', 'timecode.c', 'encoder.c', 'decoder.c'],
|
||||
cflags = [ '-fPIC' ],
|
||||
cflags = [ bld.env['compiler_flags_dict']['pic'] ],
|
||||
includes = ['.'],
|
||||
target = 'libltc',
|
||||
use = 'libltc_includes'
|
||||
|
@ -22,12 +22,12 @@ def configure(conf):
|
||||
|
||||
def build(bld):
|
||||
obj=bld.stlib (source = ['lua.cc', 'luastate.cc'],
|
||||
cflags = [ '-fPIC' ],
|
||||
cxxflags = [ '-fPIC' ],
|
||||
includes = ['.'],
|
||||
export_includes = ['.'],
|
||||
target = 'liblua',
|
||||
uselib = [ 'SIGCPP', 'DL' ]
|
||||
cflags = [ bld.env['compiler_flags_dict']['pic'] ],
|
||||
cxxflags = [ bld.env['compiler_flags_dict']['pic'] ],
|
||||
includes = ['.'],
|
||||
export_includes = ['.'],
|
||||
target = 'liblua',
|
||||
uselib = [ 'SIGCPP', 'DL' ]
|
||||
)
|
||||
autowaf.ensure_visible_symbols (obj, True)
|
||||
|
||||
|
@ -61,7 +61,7 @@ def build(bld):
|
||||
obj.defines = [ 'LIBMIDIPP_DLL_EXPORTS=1' ]
|
||||
else:
|
||||
obj = bld.stlib(features = 'cxx cxxstlib', source=libmidi_sources)
|
||||
obj.cxxflags = [ '-fPIC' ]
|
||||
obj.cxxflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
obj.defines = []
|
||||
|
||||
# everybody loves JACK
|
||||
|
@ -151,8 +151,8 @@ def build(bld):
|
||||
obj.defines = [ 'LIBPBD_DLL_EXPORTS=1' ]
|
||||
else:
|
||||
obj = bld.stlib(features = 'cxx cxxstlib', source=libpbd_sources)
|
||||
obj.cxxflags = [ '-fPIC' ]
|
||||
obj.cflags = [ '-fPIC' ]
|
||||
obj.cxxflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
obj.cflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
obj.defines = []
|
||||
|
||||
if bld.is_defined('DEBUG_RT_ALLOC'):
|
||||
|
@ -39,7 +39,7 @@ def build(bld):
|
||||
obj = bld(features = 'c cshlib',
|
||||
source = 'a-comp.c',
|
||||
name = 'a-comp',
|
||||
cflags = [ '-fPIC', bld.env['compiler_flags_dict']['c99'] ],
|
||||
cflags = [ bld.env['compiler_flags_dict']['pic'], bld.env['compiler_flags_dict']['c99'] ],
|
||||
includes = [ '../../ardour', '../shared' ],
|
||||
target = '../../LV2/%s/a-comp' % bundle,
|
||||
install_path = '${LV2DIR}/%s' % bundle,
|
||||
|
@ -39,7 +39,7 @@ def build(bld):
|
||||
obj = bld(features = 'c cshlib',
|
||||
source = 'a-delay.c',
|
||||
name = 'a-delay',
|
||||
cflags = [ '-fPIC', bld.env['compiler_flags_dict']['c99'] ],
|
||||
cflags = [ bld.env['compiler_flags_dict']['pic'], bld.env['compiler_flags_dict']['c99'] ],
|
||||
includes = [ '../../ardour' ],
|
||||
target = '../../LV2/%s/a-delay' % bundle,
|
||||
install_path = '${LV2DIR}/%s' % bundle,
|
||||
|
@ -39,7 +39,7 @@ def build(bld):
|
||||
obj = bld(features = 'c cshlib',
|
||||
source = 'a-eq.c',
|
||||
name = 'a-eq',
|
||||
cflags = [ '-fPIC', bld.env['compiler_flags_dict']['c99'] ],
|
||||
cflags = [ bld.env['compiler_flags_dict']['pic'], bld.env['compiler_flags_dict']['c99'] ],
|
||||
includes = [ '../../ardour' ],
|
||||
target = '../../LV2/%s/a-eq' % bundle,
|
||||
install_path = '${LV2DIR}/%s' % bundle,
|
||||
|
@ -39,7 +39,7 @@ def build(bld):
|
||||
obj = bld(features = 'c cshlib',
|
||||
source = 'a-exp.c',
|
||||
name = 'a-exp',
|
||||
cflags = [ '-fPIC', bld.env['compiler_flags_dict']['c99'] ],
|
||||
cflags = [ bld.env['compiler_flags_dict']['pic'], bld.env['compiler_flags_dict']['c99'] ],
|
||||
includes = [ '../../ardour', '../shared' ],
|
||||
target = '../../LV2/%s/a-exp' % bundle,
|
||||
install_path = '${LV2DIR}/%s' % bundle,
|
||||
|
@ -38,7 +38,7 @@ def build(bld):
|
||||
obj = bld(features = 'cxx cshlib',
|
||||
source = 'a-fluidsynth.cc',
|
||||
name = 'a-fluidsynth',
|
||||
cxxflags = [ '-fPIC' ],
|
||||
cxxflags = [ bld.env['compiler_flags_dict']['pic'] ],
|
||||
includes = [ '../../ardour' ],
|
||||
target = '../../LV2/%s/a-fluidsynth' % bundle,
|
||||
install_path = '${LV2DIR}/%s' % bundle,
|
||||
|
@ -38,7 +38,7 @@ def build(bld):
|
||||
obj = bld(features = 'c cshlib',
|
||||
source = 'a-reverb.c',
|
||||
name = 'a-reverb',
|
||||
cflags = [ '-fPIC', bld.env['compiler_flags_dict']['c99'] ],
|
||||
cflags = [ bld.env['compiler_flags_dict']['pic'], bld.env['compiler_flags_dict']['c99'] ],
|
||||
includes = [ '../../ardour' ],
|
||||
target = '../../LV2/%s/a-reverb' % bundle,
|
||||
install_path = '${LV2DIR}/%s' % bundle,
|
||||
|
@ -79,8 +79,9 @@ def build(bld):
|
||||
obj.vnum = QM_DSP_VERSION
|
||||
obj.install_path = bld.env['LIBDIR']
|
||||
if bld.env['build_target'] != 'mingw':
|
||||
obj.cxxflags += [ '-fPIC' ]
|
||||
obj.cflags += [ '-fPIC' ]
|
||||
obj.cxxflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
obj.cflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
|
||||
|
||||
def shutdown():
|
||||
autowaf.shutdown()
|
||||
|
@ -24,7 +24,7 @@ def build(bld):
|
||||
obj.defines = [ 'LIBCONTROLCP_DLL_EXPORTS' ]
|
||||
else:
|
||||
obj = bld.stlib(features = 'c cxx cstlib cxxstlib', source=controlcp_sources)
|
||||
obj.cxxflags = [ '-fPIC' ]
|
||||
obj.cxxflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
obj.defines = [ ]
|
||||
|
||||
obj.export_includes = ['.', './control_protocol' ]
|
||||
|
@ -40,8 +40,8 @@ def build(bld):
|
||||
obj.defines = [ 'LIBTEMPORAL_DLL_EXPORTS=1' ]
|
||||
else:
|
||||
obj = bld.stlib(features = 'cxx cxxstlib', source=temporal_sources)
|
||||
obj.cxxflags = [ '-fPIC' ]
|
||||
obj.cflags = [ '-fPIC' ]
|
||||
obj.cxxflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
obj.cflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
obj.defines = [ ]
|
||||
|
||||
obj.export_includes = ['.']
|
||||
|
@ -46,8 +46,8 @@ def build(bld):
|
||||
obj.defines = [ 'LIBWAVEVIEW_DLL_EXPORTS=1' ]
|
||||
else:
|
||||
obj = bld.stlib(features = 'cxx cxxstlib', source=waveview_sources)
|
||||
obj.cxxflags = [ '-fPIC' ]
|
||||
obj.cflags = [ '-fPIC' ]
|
||||
obj.cxxflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
obj.cflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
obj.defines = [ ]
|
||||
|
||||
obj.export_includes = ['.']
|
||||
|
@ -69,8 +69,8 @@ def build(bld):
|
||||
obj.defines = [ 'LIBWIDGETS_DLL_EXPORTS=1' ]
|
||||
else:
|
||||
obj = bld.stlib(features = 'cxx cxxstlib', source=widgets_sources)
|
||||
obj.cxxflags = [ '-fPIC' ]
|
||||
obj.cflags = [ '-fPIC' ]
|
||||
obj.cxxflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
obj.cflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
||||
obj.defines = [ ]
|
||||
|
||||
obj.export_includes = ['.']
|
||||
|
@ -42,7 +42,7 @@ def configure(conf):
|
||||
|
||||
def build(bld):
|
||||
obj = bld.stlib(features = 'cxx cxxstlib', source = zresampler_sources)
|
||||
obj.cxxflags = [ '-fPIC', '-O3', '-ffast-math' ]
|
||||
obj.cxxflags = [ bld.env['compiler_flags_dict']['pic'], '-O3', '-ffast-math' ]
|
||||
obj.export_includes = ['.']
|
||||
obj.includes = ['.']
|
||||
obj.name = 'zita-resampler'
|
||||
|
Loading…
Reference in New Issue
Block a user