From bf95d0f61901cb52bb88aeff8b3f2ef46964fb23 Mon Sep 17 00:00:00 2001 From: Baptiste Lepilleur Date: Thu, 19 Nov 2009 12:19:07 +0000 Subject: [PATCH] - fixed build issue on AIX. Build both shared and static library is now only activated on Linux. Building static library on other platforms. --- SConstruct | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/SConstruct b/SConstruct index ae7b7e7..8728eff 100644 --- a/SConstruct +++ b/SConstruct @@ -148,32 +148,28 @@ elif platform == 'msvc6': for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']: env.Tool( tool ) env['CXXFLAGS']='-GR -GX /nologo /MT' - env['SHARED_LIB_ENABLED'] = False elif platform == 'msvc70': env['MSVS_VERSION']='7.0' for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']: env.Tool( tool ) env['CXXFLAGS']='-GR -GX /nologo /MT' - env['SHARED_LIB_ENABLED'] = False elif platform == 'msvc71': env['MSVS_VERSION']='7.1' for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']: env.Tool( tool ) env['CXXFLAGS']='-GR -GX /nologo /MT' - env['SHARED_LIB_ENABLED'] = False elif platform == 'msvc80': env['MSVS_VERSION']='8.0' for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']: env.Tool( tool ) env['CXXFLAGS']='-GR -EHsc /nologo /MT' - env['SHARED_LIB_ENABLED'] = False elif platform == 'mingw': env.Tool( 'mingw' ) env.Append( CPPDEFINES=[ "WIN32", "NDEBUG", "_MT" ] ) - env['SHARED_LIB_ENABLED'] = False elif platform.startswith('linux-gcc'): env.Tool( 'default' ) env.Append( LIBS = ['pthread'], CCFLAGS = "-Wall" ) + env['SHARED_LIB_ENABLED'] = True else: print "UNSUPPORTED PLATFORM." env.Exit(1) @@ -191,7 +187,9 @@ if short_platform.startswith('msvc'): short_platform = short_platform[2:] # Notes: on Windows you need to rebuild the source for each variant # Build script does not support that yet so we only build static libraries. -env['SHARED_LIB_ENABLED'] = env.get('SHARED_LIB_ENABLED', True) +# This also fails on AIX because both dynamic and static library ends with +# extension .a. +env['SHARED_LIB_ENABLED'] = env.get('SHARED_LIB_ENABLED', False) env['LIB_PLATFORM'] = short_platform env['LIB_LINK_TYPE'] = 'lib' # static env['LIB_CRUNTIME'] = 'mt'