From 60d6a84eb4f48aad39f8356e189e32b5a5e03141 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 18 Oct 2006 17:25:58 +0000 Subject: [PATCH] separate out DEBUGFLAGS --- dtool/Config.pp | 20 ++++++++++++++------ dtool/pptempl/Global.pp | 2 ++ dtool/pptempl/Template.unix.pp | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/dtool/Config.pp b/dtool/Config.pp index 1630811c67..7091a9c75a 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -145,11 +145,14 @@ #define OPTIMIZE 3 // On OSX, you may or may not want to compile universal binaries. -// Leaving this option on allows your compiled version of Panda to run + +// Turning this option on allows your compiled version of Panda to run // on any version of OSX (PPC or Intel-based), but it will also // increase the compilation time, as well as the resulting binary -// size. This option has no effect on non-OSX platforms. -#define UNIVERSAL_BINARIES 1 +// size. I believe you have to be building on an Intel-based platform +// to generate universal binaries using this technique. This option +// has no effect on non-OSX platforms. +#define UNIVERSAL_BINARIES // Panda uses prc files for runtime configuration. There are many // compiled-in options to customize the behavior of the prc config @@ -891,6 +894,11 @@ #defer COMPILE_C $[CC] $[CFLAGS_GEN] $[ARCH_FLAGS] -c -o $[target] $[ipath:%=-I%] $[flags] $[source] #defer COMPILE_C++ $[CXX] $[C++FLAGS_GEN] $[ARCH_FLAGS] -c -o $[target] $[ipath:%=-I%] $[flags] $[source] +// What flags should be passed to both C and C++ compilers to enable +// debug symbols? This will be supplied when OPTIMIZE (above) is set +// to 1, 2, or 3. +#defer DEBUGFLAGS -g + // What flags should be passed to both C and C++ compilers to enable // compiler optimizations? This will be supplied when OPTIMIZE // (above) is set to 2, 3, or 4. @@ -911,9 +919,9 @@ // so we can compile certain files that give optimizers trouble (like // the output of lex and yacc) without them, but with all the other // relevant flags. -#defer CFLAGS_OPT1 $[CDEFINES_OPT1:%=-D%] -Wall -g -#defer CFLAGS_OPT2 $[CDEFINES_OPT2:%=-D%] -Wall -g $[OPTFLAGS] -#defer CFLAGS_OPT3 $[CDEFINES_OPT3:%=-D%] -g $[OPTFLAGS] +#defer CFLAGS_OPT1 $[CDEFINES_OPT1:%=-D%] -Wall $[DEBUGFLAGS] +#defer CFLAGS_OPT2 $[CDEFINES_OPT2:%=-D%] -Wall $[DEBUGFLAGS] $[OPTFLAGS] +#defer CFLAGS_OPT3 $[CDEFINES_OPT3:%=-D%] $[DEBUGFLAGS] $[OPTFLAGS] #defer CFLAGS_OPT4 $[CDEFINES_OPT4:%=-D%] $[OPTFLAGS] // What additional flags should be passed to both compilers when diff --git a/dtool/pptempl/Global.pp b/dtool/pptempl/Global.pp index e0a4eb5082..66a46792bd 100644 --- a/dtool/pptempl/Global.pp +++ b/dtool/pptempl/Global.pp @@ -216,6 +216,7 @@ #define cg_lpath $[wildcard $[CG_LPATH]] #define cg_cflags $[CG_CFLAGS] #define cg_libs $[CG_LIBS] + #define cg_framework $[CG_FRAMEWORK] #endif #if $[HAVE_CGGL] @@ -223,6 +224,7 @@ #define cggl_lpath $[wildcard $[CGGL_LPATH]] #define cggl_cflags $[CGGL_CFLAGS] #define cggl_libs $[CGGL_LIBS] + #define cggl_framework $[CGGL_FRAMEWORK] #endif #if $[HAVE_CGDX8] diff --git a/dtool/pptempl/Template.unix.pp b/dtool/pptempl/Template.unix.pp index 68ac4cda51..ec3bc72bd4 100644 --- a/dtool/pptempl/Template.unix.pp +++ b/dtool/pptempl/Template.unix.pp @@ -126,7 +126,7 @@ #defer libs $[unique $[actual_local_libs:%=%$[dllext]] $[patsubst %:m,,%:c %,%$[dllext],$[OTHER_LIBS]] $[get_libs]] // And $[frameworks] is the set of OSX-style frameworks we will link with. -#defer frameworks $[get_frameworks] +#defer frameworks $[unique $[get_frameworks]] // This is the set of files we might copy into *.prebuilt, if we have // bison and flex (or copy from *.prebuilt if we don't have them).