diff options
author | Joshua Leung <aligorith@gmail.com> | 2008-02-06 04:25:56 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2008-02-06 04:25:56 +0300 |
commit | 038c08804d3597d7edbd878fab0632a9c86b8ea5 (patch) | |
tree | b25a250264fe617ff9956fabc841def73d2c7bae | |
parent | 53d86458371d9d595d693c10437cfd08817acaf9 (diff) |
It is now possible to compile a profiling build with mingw+scons.
Here are the changes I've had to make:
* Added default settings for BF_PROFILE and BF_PROFILE_FLAGS for mingw
* Made makesdna.c link with profiling flags too. This fixes some linking problems related to guardedmalloc for linking it. I'm not sure if this breaks compiling with BF_PROFILE on other platforms.
-rw-r--r-- | config/win32-mingw-config.py | 3 | ||||
-rw-r--r-- | source/blender/makesdna/intern/SConscript | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/config/win32-mingw-config.py b/config/win32-mingw-config.py index 8c8c12db46f..fa6b12ab138 100644 --- a/config/win32-mingw-config.py +++ b/config/win32-mingw-config.py @@ -156,5 +156,8 @@ LLIBS = ['-lshell32', '-lshfolder', '-ldxguid', '-lgdi32', '-lmsvcrt', '-lwinmm' BF_DEBUG = 'false' BF_DEBUG_FLAGS= '-g' +BF_PROFILE_FLAGS = ['-pg','-g'] +BF_PROFILE = 'false' + BF_BUILDDIR = '..\\build\\win32-mingw' BF_INSTALLDIR='..\\install\\win32-mingw' diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript index fe712afbeeb..872fd515f1d 100644 --- a/source/blender/makesdna/intern/SConscript +++ b/source/blender/makesdna/intern/SConscript @@ -25,6 +25,8 @@ if sys.platform != 'cygwin': makesdna_tool.Append (CCFLAGS = cflags) makesdna_tool.Append (CPPDEFINES = defines) makesdna_tool.Append (LIBPATH = '#'+root_build_dir+'/lib') +if env['BF_PROFILE']: + makesdna_tool.Append (LINKFLAGS = env['BF_PROFILE_FLAGS']) if env['OURPLATFORM'] == 'linux2' and root_build_dir[0]==os.sep: makesdna = makesdna_tool.Program (target = root_build_dir+'/makesdna', source = source_files, LIBS=['bf_guardedalloc']) |