==SCons==
[blender-staging.git] / tools / Blender.py
index 1243fb7d309afb515b9a6678447eb49e5a642b96..f87cbacf14299c283c6bfbfa584b6711d5d1967e 100644 (file)
@@ -330,16 +330,16 @@ class BlenderEnvironment(SConsEnvironment):
             if lenv['WITH_BF_GAMEENGINE']:
                     lenv.Append(CPPDEFINES=['GAMEBLENDER=1'])
             if lenv['BF_DEBUG']:
-                    lenv.Append(CFLAGS = lenv['BF_DEBUG_FLAGS'], CCFLAGS = lenv['BF_DEBUG_FLAGS'])
+                    lenv.Append(CCFLAGS = lenv['BF_DEBUG_FLAGS'], CXXFLAGS = lenv['BF_DEBUG_FLAGS'])
             else:
-                    lenv.Append(CFLAGS = lenv['REL_CFLAGS'], CCFLAGS = lenv['REL_CCFLAGS'])
+                    lenv.Append(CCFLAGS = lenv['REL_CFLAGS'], CXXFLAGS = lenv['REL_CCFLAGS'])
             if lenv['BF_PROFILE']:
-                    lenv.Append(CFLAGS = lenv['BF_PROFILE_FLAGS'], CCFLAGS = lenv['BF_PROFILE_FLAGS'])
+                    lenv.Append(CCFLAGS = lenv['BF_PROFILE_FLAGS'], CXXFLAGS = lenv['BF_PROFILE_FLAGS'])
             if compileflags:
-                lenv.Append(CFLAGS = compileflags)
                 lenv.Append(CCFLAGS = compileflags)
-            lenv.Append(CFLAGS = Split(lenv['C_WARN']))
-            lenv.Append(CCFLAGS = Split(lenv['CC_WARN']))
+                lenv.Append(CXXFLAGS = compileflags)
+            lenv.Append(CCFLAGS = Split(lenv['C_WARN']))
+            lenv.Append(CXXFLAGS = Split(lenv['CC_WARN']))
             lib = lenv.Library(target= '#'+root_build_dir+'lib/'+libname, source=sources)
             SConsEnvironment.Default(self, lib) # we add to default target, because this way we get some kind of progress info during build
         else:
@@ -356,6 +356,8 @@ class BlenderEnvironment(SConsEnvironment):
             lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS'])
             lenv.Append(LINKFLAGS = lenv['BF_PYTHON_LINKFLAGS'])
             lenv.Append(LINKFLAGS = lenv['BF_OPENGL_LINKFLAGS'])
+        if lenv['BF_PROFILE']:
+                lenv.Append(LINKFLAGS = lenv['BF_PROFILE_FLAGS'])
         lenv.Append(CPPPATH=includes)
         lenv.Append(LIBPATH=libpath)
         lenv.Append(LIBS=libs)