diff options
-rw-r--r-- | SConstruct | 20 | ||||
-rw-r--r-- | config/win32-mingw-config.py | 2 | ||||
-rw-r--r-- | tools/Blender.py | 7 | ||||
-rwxr-xr-x | tools/btools.py | 3 |
4 files changed, 28 insertions, 4 deletions
diff --git a/SConstruct b/SConstruct index 62c41d0c331..be2a8f8fa7e 100644 --- a/SConstruct +++ b/SConstruct @@ -51,6 +51,7 @@ B = tools.Blender ### globals ### platform = sys.platform quickie = None +quickdebug = None ##### BEGIN SETUP ##### @@ -88,6 +89,13 @@ btools.print_targets(B.targets, B.bc) # first check cmdline for toolset and we create env to work on quickie = B.arguments.get('BF_QUICK', None) +quickdebug = B.arguments.get('BF_QUICKDEBUG', None) + +if quickdebug: + B.quickdebug=string.split(quickdebug, ',') +else: + B.quickdebug=[] + if quickie: B.quickie=string.split(quickie,',') else: @@ -151,6 +159,18 @@ else: opts = btools.read_opts(optfiles, B.arguments) opts.Update(env) +#check for additional debug libnames + +if env.has_key('BF_DEBUG_LIBS'): + B.quickdebug += env['BF_DEBUG_LIBS'] + +printdebug = B.arguments.get('BF_LISTDEBUG', 0) + +if len(B.quickdebug) > 0 and printdebug != 0: + print B.bc.OKGREEN + "Buildings these libs with debug symbols:" + B.bc.ENDC + for l in B.quickdebug: + print "\t" + l + # check target for blenderplayer. Set WITH_BF_PLAYER if found on cmdline if 'blenderplayer' in B.targets: env['WITH_BF_PLAYER'] = True diff --git a/config/win32-mingw-config.py b/config/win32-mingw-config.py index 84d836cee9f..4f51e037cbe 100644 --- a/config/win32-mingw-config.py +++ b/config/win32-mingw-config.py @@ -146,7 +146,7 @@ LLIBS = [ '-ldxguid', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lw ##DYNLDFLAGS = -shared $(LDFLAGS) BF_DEBUG = 'false' -BF_DEBUG_FLAGS= '' +BF_DEBUG_FLAGS= '-g' BF_BUILDDIR = '..\\build\\win32-mingw' BF_INSTALLDIR='..\\install\\win32-mingw' diff --git a/tools/Blender.py b/tools/Blender.py index e0967d0e06a..d896775dfb8 100644 --- a/tools/Blender.py +++ b/tools/Blender.py @@ -343,13 +343,16 @@ class BlenderEnvironment(SConsEnvironment): print bc.FAIL+'Cannot continue. Missing argument for BuildBlenderLib '+libname+bc.ENDC Exit() if libname in quickie or len(quickie)==0: - print bc.HEADER+'Configuring library '+bc.ENDC+bc.OKGREEN+libname+bc.ENDC + if libname in quickdebug: + print bc.HEADER+'Configuring library '+bc.ENDC+bc.OKGREEN+libname +bc.ENDC+bc.OKBLUE+ " (debug mode)" + bc.ENDC + else: + print bc.HEADER+'Configuring library '+bc.ENDC+bc.OKGREEN+libname + bc.ENDC lenv = self.Copy() lenv.Append(CPPPATH=includes) lenv.Append(CPPDEFINES=defines) if lenv['WITH_BF_GAMEENGINE']: lenv.Append(CPPDEFINES=['GAMEBLENDER=1']) - if lenv['BF_DEBUG']: + if lenv['BF_DEBUG'] or (libname in quickdebug): lenv.Append(CCFLAGS = Split(lenv['BF_DEBUG_FLAGS']), CXXFLAGS = Split(lenv['BF_DEBUG_FLAGS'])) else: lenv.Append(CCFLAGS = lenv['REL_CFLAGS'], CXXFLAGS = lenv['REL_CCFLAGS']) diff --git a/tools/btools.py b/tools/btools.py index 7d6a679905e..b66d388ec76 100755 --- a/tools/btools.py +++ b/tools/btools.py @@ -45,7 +45,7 @@ def validate_arguments(args, bc): arg_list = ['BF_DEBUG', 'BF_QUIET', 'BF_CROSS', 'BF_UPDATE', 'BF_INSTALLDIR', 'BF_TOOLSET', 'BF_BINNAME', 'BF_BUILDDIR', 'BF_FANCY', 'BF_QUICK', 'BF_PROFILE', 'BF_DEBUG', 'BF_DEBUG_FLAGS', - 'BF_PRIORITYLIST', 'BF_BUILDINFO','CC', 'CXX' + 'BF_PRIORITYLIST', 'BF_BUILDINFO','CC', 'CXX', "BF_QUICKDEBUG", "BF_LISTDEBUG" ] all_list = opts_list + arg_list @@ -110,6 +110,7 @@ def SetupBufferedOutput( env ): def read_opts(cfg, args): localopts = Options.Options(cfg, args) localopts.AddOptions( + ('BF_DEBUG_LIBS', 'list of libraries to build with debug symbols'), ('BF_PYTHON', 'base path for python', ''), ('BF_PYTHON_VERSION', 'Python version to use', ''), ('BF_PYTHON_INC', 'include path for Python headers', ''), |