Change library suffix from _debug to D for debug build.
And no suffix for a release build.
This commit is contained in:
+3
-1
@@ -74,6 +74,7 @@ assertions = GetOption('assertions')
|
||||
stack_protection = GetOption('stack_protection')
|
||||
test_xml = GetOption('test_xml')
|
||||
prefix = GetOption('prefix')
|
||||
lib_suffix = ''
|
||||
if not (build_type in ['debug', 'release']):
|
||||
print "Error: expected 'debug' or 'release', found: " + build_type
|
||||
Exit(1)
|
||||
@@ -111,6 +112,7 @@ if build_type == 'release':
|
||||
env.Append(CPPDEFINES = ['NDEBUG'])
|
||||
|
||||
elif build_type == 'debug':
|
||||
lib_suffix = 'D'
|
||||
env.Append(CPPDEFINES = ['DEBUG'])
|
||||
|
||||
if stack_protection:
|
||||
@@ -132,7 +134,7 @@ if stack_protection:
|
||||
|
||||
subst_info['@build_host@'] = platform.node()
|
||||
|
||||
Export('env', 'build_type', 'prefix', 'version_info', 'test_xml', 'subst_info')
|
||||
Export('env', 'build_type', 'prefix', 'lib_suffix', 'version_info', 'test_xml', 'subst_info')
|
||||
|
||||
#put all .sconsign files in one place
|
||||
env.SConsignFile()
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import os
|
||||
|
||||
Import('env', 'build_type', 'prefix', 'subst_info')
|
||||
Import('env', 'build_type', 'prefix', 'lib_suffix', 'subst_info')
|
||||
|
||||
ucore_env = env.Clone()
|
||||
|
||||
@@ -13,7 +13,7 @@ sources = ucore_env.Glob('*.c')
|
||||
#print 'sources:', sources[len(sources)-2]
|
||||
|
||||
#Build library
|
||||
ucore_lib = ucore_env.StaticLibrary(target='ucore_' + build_type , source=sources)
|
||||
ucore_lib = ucore_env.StaticLibrary(target='ucore' + lib_suffix , source=sources)
|
||||
|
||||
#install targets
|
||||
ucore_env.Alias('install',
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
import platform
|
||||
|
||||
Import('env', 'build_type', 'prefix', 'version_info', 'test_xml')
|
||||
Import('env', 'build_type', 'prefix', 'lib_suffix', 'version_info', 'test_xml')
|
||||
|
||||
test_env = env.Clone()
|
||||
test_env.Append(LIBPATH = ['#build/src']);
|
||||
test_env.Append(LIBS = ['ucore_' + build_type, 'check'])
|
||||
test_env.Append(LIBS = ['ucore' + lib_suffix, 'check'])
|
||||
|
||||
system = platform.system()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user