summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2011-09-05 15:46:01 +0100
committerRobin Watts <Robin.Watts@artifex.com>2011-09-05 21:35:28 +0100
commitcb5b14133b516323694dcb99c7594337e84d5e3f (patch)
tree5a20061e67b333514e30db848d0d7aaa9425fbff /main
parent2fab16e3cbf8b2a18aa82c6beee76e261e530b9f (diff)
Add Memento configuration to Visual Studio projects (and gs makefile)
When swapping between memento and non-memento builds, a complete rebuild is required due to the pervasive nature of the memento defines. As such it makes sense to have it as a separate configuration in the project. Memento directories are named 'memobj', 'memobj64', 'membin' etc in keeping with 'debugobj', and 'profobj' etc. Also, take the opportunity to fix a couple of small things in the visual studio files. Firstly, the 64 bit profile build targets were incorrect (weren't setting paths etc). Secondly, we remove the use of nmake /A for the rebuild step, and instead rely on an explicit clean call, then a rebuild; this means we get consistent results for a rebuild compared to a clean then a build. As part of this work, we add logic to the (MSVC) makefiles to detect MEMENTO=1 and PROFILE=1. If set, these change the default DEBUG, TDEBUG and DEBUGSYM flags as appropriate, and change the default output directory names. This keeps the invocations from Visual Studio sane (as I found lots of mistakes in them as I looked through). Also fix some places where we were failing to set and pass on BINDIR/PSOBJDIR resulting in stray directories being created. CLUSTER_UNTESTED
Diffstat (limited to 'main')
-rw-r--r--main/pcl6_msvc.mak42
1 files changed, 42 insertions, 0 deletions
diff --git a/main/pcl6_msvc.mak b/main/pcl6_msvc.mak
index bf862f0c9..c2b3e0d3b 100644
--- a/main/pcl6_msvc.mak
+++ b/main/pcl6_msvc.mak
@@ -24,14 +24,51 @@ BUNDLE_FONTS=1
XCFLAGS=
!endif
+# If we are building MEMENTO=1, then adjust default debug flags
+!if "$(MEMENTO)"=="1"
+!ifndef DEBUG
+DEBUG=1
+!endif
+!ifndef TDEBUG
+TDEBUG=1
+!endif
+!ifndef DEBUGSYM
+DEBUGSYM=1
+!endif
+!endif
+
+# If we are building PROFILE=1, then adjust default debug flags
+!if "$(PROFILE)"=="1"
+!ifndef DEBUG
+DEBUG=0
+!endif
+!ifndef TDEBUG
+TDEBUG=0
+!endif
+!ifndef DEBUGSYM
+DEBUGSYM=1
+!endif
+!endif
+
# The build process will put all of its output in this directory:
!ifndef GENDIR
+!if "$(MEMENTO)"=="1"
+GENDIR=.\memobj
+!else
+!if "$(PROFILE)"=="1"
+GENDIR=.\profobj
+!else
!if "$(DEBUG)"=="1"
GENDIR=.\debugobj
!else
GENDIR=.\obj
!endif
!endif
+!endif
+!ifdef WIN64
+GENDIR=$(GENDIR)64
+!endif
+!endif
!ifndef AUXDIR
AUXDIR=$(GENDIR)\aux_
@@ -145,6 +182,11 @@ GLGENDIR=$(GENDIR)
GLOBJDIR=$(GENDIR)
!endif
+# Not strictly speaking necessary, but saves a stray mkdir later on.
+!ifndef BINDIR
+BINDIR=$(GENDIR)
+!endif
+
# The PSGENDIR and PSOBJDIR are not strictly speaking required, but adding
# them here prevents noisy warnings later on.
!ifndef PSGENDIR