Browse Source

Add --static configure flag, used for official windows builds

Signed-off-by: falkTX <falktx@falktx.com>
tags/v1.9.15
falkTX 4 years ago
parent
commit
5a9a7c50cc
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 6 additions and 4 deletions
  1. +4
    -4
      common/wscript
  2. +2
    -0
      wscript

+ 4
- 4
common/wscript View File

@@ -132,7 +132,7 @@ def build(bld):
]
includes = ['../windows' ] + includes
libsuffix = "64" if (bld.env['DEST_CPU'] == "x86_64" and not bld.variant) else ""
skipshared = bool('HAVE_TRE_REGEX_H' in bld.env)
staticbuild = bool('BUILD_STATIC' in bld.env and bld.env['BUILD_STATIC'])
uselib.append('REGEX')
uselib.append('WS2_32')
uselib.append('PSAPI')
@@ -204,7 +204,7 @@ def build(bld):

if bld.env['IS_WINDOWS']:
# remove switch to shared binaries if possible, as we most likely want static builds on Windows
if skipshared:
if staticbuild:
clientlib.env['SHLIB_MARKER'] = ''
# statically link libjack to libstdc++, some client apps like ardour come
# with a different version of libstdc++.dll that takes precedence and results
@@ -228,7 +228,7 @@ def build(bld):
serverlib.env['cxxshlib_PATTERN'] = 'lib%s.dll'
serverlib.env['cxxstlib_PATTERN'] = 'lib%s.a'
serverlib.env['implib_PATTERN'] = 'lib%s.dll.a'
if skipshared:
if staticbuild:
serverlib.env['SHLIB_MARKER'] = ''
serverlib.env.append_value('LINKFLAGS', ['-static-libstdc++', '--disable-auto-import'])
serverlib.install_path = '${LIBDIR}'
@@ -330,7 +330,7 @@ def build(bld):
netlib.env['cxxshlib_PATTERN'] = 'lib%s.dll'
netlib.env['cxxstlib_PATTERN'] = 'lib%s.a'
netlib.env['implib_PATTERN'] = 'lib%s.dll.a'
if skipshared:
if staticbuild:
netlib.env['SHLIB_MARKER'] = ''
netlib.use += ['WS2_32', 'WINMM']
elif not bld.env['IS_MACOSX']:


+ 2
- 0
wscript View File

@@ -68,6 +68,7 @@ def options(opt):
opt.add_option('--platform', type='string', default=sys.platform, help='Target platform for cross-compiling, e.g. cygwin or win32')
opt.add_option('--mixed', action='store_true', default=False, help='Build with 32/64 bits mixed mode')
opt.add_option('--debug', action='store_true', default=False, dest='debug', help='Build debuggable binaries')
opt.add_option('--static', action='store_true', default=False, dest='static', help='Build static binaries (Windows only)')

# options affecting general jack functionality
opt.add_option('--classic', action='store_true', default=False, help='Force enable standard JACK (jackd) even if D-Bus JACK (jackdbus) is enabled too')
@@ -316,6 +317,7 @@ def configure(conf):
conf.env['BUILD_WITH_32_64'] = Options.options.mixed
conf.env['BUILD_CLASSIC'] = Options.options.classic
conf.env['BUILD_DEBUG'] = Options.options.debug
conf.env['BUILD_STATIC'] = Options.options.static

if conf.env['BUILD_JACKDBUS']:
conf.env['BUILD_JACKD'] = conf.env['BUILD_CLASSIC']


Loading…
Cancel
Save