From 444b9b06fb8d0b15bc1eb0a9ddf360f1278bbbb2 Mon Sep 17 00:00:00 2001 From: cxgeorge <> Date: Thu, 21 Jun 2001 21:37:18 +0000 Subject: [PATCH] add mapinfo flags --- dtool/pptempl/Global.gmsvc.pp | 15 +-- dtool/pptempl/Global.msvc.pp | 16 +-- dtool/pptempl/compilerSettings.pp | 169 ++++++++++++++++-------------- 3 files changed, 99 insertions(+), 101 deletions(-) diff --git a/dtool/pptempl/Global.gmsvc.pp b/dtool/pptempl/Global.gmsvc.pp index 1008d3d417..37ab8fc8fd 100644 --- a/dtool/pptempl/Global.gmsvc.pp +++ b/dtool/pptempl/Global.gmsvc.pp @@ -117,18 +117,11 @@ #defer CFLAGS_OPT3 $[CDEFINES_OPT3:%=/D%] $[COMMONFLAGS] $[RELEASEFLAGS] $[OPTFLAGS] #defer CFLAGS_OPT4 $[CDEFINES_OPT4:%=/D%] $[COMMONFLAGS] $[RELEASEFLAGS] $[OPTFLAGS] -#if $[ENABLE_PROFILING] -// note according to docs, this should force /PDB:none /DEBUGTYPE:cv, so no pdb file is generated for debug?? (doesnt seem to be true) -#define PROFILE_FLAG /PROFILE -#else -#define PROFILE_FLAG -#endif - // NODEFAULTLIB ensures static libs linked in will connect to the correct msvcrt, so no debug/release mixing occurs -#defer LDFLAGS_OPT1 /debug /incremental:no /NODEFAULTLIB:MSVCRT.LIB /WARN:3 $[PROFILE_FLAG] -#defer LDFLAGS_OPT2 /debug /incremental:no /NODEFAULTLIB:MSVCRT.LIB /WARN:3 $[PROFILE_FLAG] -#defer LDFLAGS_OPT3 /fixed:no /incremental:no /NODEFAULTLIB:MSVCRTD.LIB /WARN:3 $[PROFILE_FLAG] /OPT:REF -#defer LDFLAGS_OPT4 /fixed:no /incremental:no /NODEFAULTLIB:MSVCRTD.LIB /WARN:3 $[PROFILE_FLAG] /OPT:REF +#defer LDFLAGS_OPT1 /debug /incremental:no /NODEFAULTLIB:MSVCRT.LIB /WARN:3 $[LINKER_FLAGS] +#defer LDFLAGS_OPT2 /debug /incremental:no /NODEFAULTLIB:MSVCRT.LIB /WARN:3 $[LINKER_FLAGS] +#defer LDFLAGS_OPT3 /fixed:no /incremental:no /NODEFAULTLIB:MSVCRTD.LIB /WARN:3 $[LINKER_FLAGS] /OPT:REF +#defer LDFLAGS_OPT4 /fixed:no /incremental:no /NODEFAULTLIB:MSVCRTD.LIB /WARN:3 $[LINKER_FLAGS] /OPT:REF // $[build_pdbs] will be nonempty (true) if we should expect to // generate a .pdb file when we build a DLL or EXE. diff --git a/dtool/pptempl/Global.msvc.pp b/dtool/pptempl/Global.msvc.pp index 690f517761..50725dbdf7 100644 --- a/dtool/pptempl/Global.msvc.pp +++ b/dtool/pptempl/Global.msvc.pp @@ -106,18 +106,12 @@ #defer CFLAGS_OPT3 $[CDEFINES_OPT3:%=/D%] $[COMMONFLAGS] $[RELEASEFLAGS] $[OPTFLAGS] #defer CFLAGS_OPT4 $[CDEFINES_OPT4:%=/D%] $[COMMONFLAGS] $[RELEASEFLAGS] $[OPTFLAGS] -#if $[ENABLE_PROFILING] -// note according to docs, this should force /PDB:none /DEBUGTYPE:cv, so no pdb file is generated for debug?? (doesnt seem to be true) -#define PROFILE_FLAG /PROFILE -#else -#define PROFILE_FLAG -#endif - // NODEFAULTLIB ensures static libs linked in will connect to the correct msvcrt, so no debug/release mixing occurs -#defer LDFLAGS_OPT1 /debug /incremental:no /NODEFAULTLIB:MSVCRT.LIB /WARN:3 $[PROFILE_FLAG] -#defer LDFLAGS_OPT2 /debug /incremental:no /NODEFAULTLIB:MSVCRT.LIB /WARN:3 $[PROFILE_FLAG] -#defer LDFLAGS_OPT3 /fixed:no /incremental:no /NODEFAULTLIB:MSVCRTD.LIB /WARN:3 /OPT:REF $[PROFILE_FLAG] -#defer LDFLAGS_OPT4 /fixed:no /incremental:no /NODEFAULTLIB:MSVCRTD.LIB /WARN:3 /OPT:REF $[PROFILE_FLAG] +#defer LDFLAGS_OPT1 /debug /incremental:no /NODEFAULTLIB:MSVCRT.LIB /WARN:3 $[LINKER_FLAGS] +#defer LDFLAGS_OPT2 /debug /incremental:no /NODEFAULTLIB:MSVCRT.LIB /WARN:3 $[LINKER_FLAGS] +#defer LDFLAGS_OPT3 /fixed:no /incremental:no /NODEFAULTLIB:MSVCRTD.LIB /WARN:3 $[LINKER_FLAGS] /OPT:REF +#defer LDFLAGS_OPT4 /fixed:no /incremental:no /NODEFAULTLIB:MSVCRTD.LIB /WARN:3 $[LINKER_FLAGS] /OPT:REF + // $[build_pdbs] will be nonempty (true) if we should expect to // generate a .pdb file when we build a DLL or EXE. diff --git a/dtool/pptempl/compilerSettings.pp b/dtool/pptempl/compilerSettings.pp index 89f22867ec..29a905fca5 100644 --- a/dtool/pptempl/compilerSettings.pp +++ b/dtool/pptempl/compilerSettings.pp @@ -1,79 +1,90 @@ - -#if $[eq $[USE_COMPILER], MSVC] - #define COMPILER cl - #define LINKER link - #define LIBBER lib - #define COMMONFLAGS /Gi- - #define OPTFLAGS /O2 /Ob1 /G6 - #define OPT1FLAGS /GZ - -// #defer DEBUGFLAGS /MDd $[BROWSEINFO_FLAG] $[DEBUG_TYPE_FLAGS] - #defer DEBUGFLAGS /MDd $[BROWSEINFO_FLAG] /Zi /Fd"$[osfilename $[target:%.obj=%.pdb]]" - #define RELEASEFLAGS /MD - -// in case we have mixed intel/msvc build - #define EXTRA_LIBPATH /ia32/lib - #define EXTRA_INCPATH /ia32/include -#elif $[eq $[USE_COMPILER], BOUNDS] // NuMega BoundsChecker - #define COMPILER nmcl - #define LINKER nmlink - #define LIBBER lib - #define COMMONFLAGS - #define OPTFLAGS /O2 /Ogity /G6 - #define OPT1FLAGS /GZ - #defer DEBUGFLAGS /MDd /Zi $[BROWSEINFO_FLAG] /Fd"$[osfilename $[target:%.obj=%.pdb]]" - #define RELEASEFLAGS /MD - #define EXTRA_LIBPATH - #define EXTRA_INCPATH - #if $[BOUNDS_TRUETIME] // NuMega BoundsChecker TrueTime Profiler - // This may look like a bad thing (to extend the compiler - // and linker with a switch), but I think it's the right - // thing to do in this case -- skyler. - #define COMPILER $[COMPILER] /NMttOn - #define LINKER $[LINKER] /NMttOn - #endif -#elif $[eq $[USE_COMPILER], TRUETIME] // NuMega TrueTime Profiler - // This may look like a bad thing (to extend the compiler - // and linker with a switch), but I think it's the right - // thing to do in this case -- skyler. - #define COMPILER nmcl /NMttOn - #define LINKER nmlink /NMttOn - #define LIBBER lib - #define COMMONFLAGS - #define OPTFLAGS /O2 /Ogity /G6 - #define OPT1FLAGS /GZ - #defer DEBUGFLAGS /MDd /Zi $[BROWSEINFO_FLAG] /Fd"$[osfilename $[target:%.obj=%.pdb]]" - #define RELEASEFLAGS /MD - #define EXTRA_LIBPATH - #define EXTRA_INCPATH -#elif $[eq $[USE_COMPILER], INTEL] - #define COMPILER icl - #define LINKER xilink - #define LIBBER xilib - #define COMMONFLAGS /Gi- /Qwd985 -// #define OPTFLAGS /O3 /G6 /Qvc6 /Qipo /QaxW /Qvec_report1 - #define OPTFLAGS /O3 /G6 /Qvc6 /Qip - // Oy- needed for MS debugger - #define DEBUGFLAGS /MDd /Zi /Qinline_debug_info /Oy- - #define OPT1FLAGS /GZ /Od - #define RELEASEFLAGS /MD - // We assume the Intel compiler installation dir is mounted as /ia32. - #define EXTRA_LIBPATH /ia32/lib - #define EXTRA_INCPATH /ia32/include -#else - #error Invalid value specified for USE_COMPILER. -#endif - -#if $[CHECK_SYNTAX_ONLY] -#define END_CFLAGS $[END_CFLAGS] /Zs -#endif - -#if $[GEN_ASSEMBLY] -#define END_CFLAGS $[END_CFLAGS] /FAs -#endif - -#if $[PREPROCESSOR_OUTPUT] -#define END_CFLAGS $[END_CFLAGS] /E -#endif - - + +#if $[eq $[USE_COMPILER], MSVC] + #define COMPILER cl + #define LINKER link + #define LIBBER lib + #define COMMONFLAGS /Gi- + #define OPTFLAGS /O2 /Ob1 /G6 + #define OPT1FLAGS /GZ + +// #defer DEBUGFLAGS /MDd $[BROWSEINFO_FLAG] $[DEBUG_TYPE_FLAGS] + #defer DEBUGFLAGS /MDd $[BROWSEINFO_FLAG] /Zi /Fd"$[osfilename $[target:%.obj=%.pdb]]" + #define RELEASEFLAGS /MD + + #define MAPINFOFLAGS /MAPINFO:EXPORTS /MAPINFO:FIXUPS /MAPINFO:LINES + + #if $[ENABLE_PROFILING] + // note according to docs, this should force /PDB:none /DEBUGTYPE:cv, so no pdb file is generated for debug?? (doesnt seem to be true) + #define PROFILE_FLAG /PROFILE + #else + #define PROFILE_FLAG + #endif + + #define LINKER_FLAGS $[PROFILE_FLAG] /MAP $[MAPINFOFLAGS] + +// in case we have mixed intel/msvc build + #define EXTRA_LIBPATH /ia32/lib + #define EXTRA_INCPATH /ia32/include +#elif $[eq $[USE_COMPILER], BOUNDS] // NuMega BoundsChecker + #define COMPILER nmcl + #define LINKER nmlink + #define LIBBER lib + #define COMMONFLAGS + #define OPTFLAGS /O2 /Ogity /G6 + #define OPT1FLAGS /GZ + #defer DEBUGFLAGS /MDd /Zi $[BROWSEINFO_FLAG] /Fd"$[osfilename $[target:%.obj=%.pdb]]" + #define RELEASEFLAGS /MD + #define EXTRA_LIBPATH + #define EXTRA_INCPATH + #if $[BOUNDS_TRUETIME] // NuMega BoundsChecker TrueTime Profiler + // This may look like a bad thing (to extend the compiler + // and linker with a switch), but I think it's the right + // thing to do in this case -- skyler. + #define COMPILER $[COMPILER] /NMttOn + #define LINKER $[LINKER] /NMttOn + #endif +#elif $[eq $[USE_COMPILER], TRUETIME] // NuMega TrueTime Profiler + // This may look like a bad thing (to extend the compiler + // and linker with a switch), but I think it's the right + // thing to do in this case -- skyler. + #define COMPILER nmcl /NMttOn + #define LINKER nmlink /NMttOn + #define LIBBER lib + #define COMMONFLAGS + #define OPTFLAGS /O2 /Ogity /G6 + #define OPT1FLAGS /GZ + #defer DEBUGFLAGS /MDd /Zi $[BROWSEINFO_FLAG] /Fd"$[osfilename $[target:%.obj=%.pdb]]" + #define RELEASEFLAGS /MD + #define EXTRA_LIBPATH + #define EXTRA_INCPATH +#elif $[eq $[USE_COMPILER], INTEL] + #define COMPILER icl + #define LINKER xilink + #define LIBBER xilib + #define COMMONFLAGS /Gi- /Qwd985 +// #define OPTFLAGS /O3 /G6 /Qvc6 /Qipo /QaxW /Qvec_report1 + #define OPTFLAGS /O3 /G6 /Qvc6 /Qip + // Oy- needed for MS debugger + #define DEBUGFLAGS /MDd /Zi /Qinline_debug_info /Oy- + #define OPT1FLAGS /GZ /Od + #define RELEASEFLAGS /MD + // We assume the Intel compiler installation dir is mounted as /ia32. + #define EXTRA_LIBPATH /ia32/lib + #define EXTRA_INCPATH /ia32/include +#else + #error Invalid value specified for USE_COMPILER. +#endif + +#if $[CHECK_SYNTAX_ONLY] +#define END_CFLAGS $[END_CFLAGS] /Zs +#endif + +#if $[GEN_ASSEMBLY] +#define END_CFLAGS $[END_CFLAGS] /FAs +#endif + +#if $[PREPROCESSOR_OUTPUT] +#define END_CFLAGS $[END_CFLAGS] /E +#endif + +