update, and add some more build flavours (inc. dons's fast build)
authorSimon Marlow <simonmar@microsoft.com>
Thu, 14 Dec 2006 11:09:47 +0000 (11:09 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Thu, 14 Dec 2006 11:09:47 +0000 (11:09 +0000)
mk/build.mk.sample

index 8541e51..9384393 100644 (file)
@@ -7,54 +7,99 @@
 
 # Uncomment one of these to select a build profile below:
 
-#BuildFlavour = devel
+# Full build with max optimisation (slow build)
 #BuildFlavour = perf
 
+# Fastest build (libs unoptimised):
+#BuildFlavour = quickest
+
+# Fast build with optimised libraries:
+#BuildFlavour = quick
+
+# A development build, working on the stage 1 compiler:
+#BuildFlavour = devel1
+
+# A development build, working on the stage 2 compiler:
+#BuildFlavour = devel2
+
 # Which warnings we like to use
 MyWarningOpts   = -W -fno-warn-unused-matches -fwarn-unused-imports
 
-# -------- 1. A Development build --------------------------------------------
+# -------- 1. A Performance/Distribution build--------------------------------
+
+ifeq "$(BuildFlavour)" "perf"
+
+SRC_HC_OPTS   = -H32m -O2
+GhcHcOpts     = -Rghc-timing
+GhcLibHcOpts  =
+GhcLibWays    = p
 
-ifeq "$(BuildFlavour)" "devel"
+endif
 
-GhcCompilerWays =
+# -------- A Fast build ------------------------------------------------------
 
-SRC_HC_OPTS     = -H32m -O -fasm $(MyWarningOpts)
-GhcLibHcOpts    = -O -dcore-lint $(MyWarningOpts)
+ifeq "$(BuildFlavour)" "quickest"
+
+SRC_HC_OPTS     = -H64m -Onot -fasm
+GhcStage1HcOpts = -O -fasm
+GhcStage2HcOpts = -Onot -fasm
+GhcLibHcOpts    = -Onot -fasm
 GhcLibWays      =
+SplitObjs       = NO
 
-# If you're working on the stage1 compiler, build stage1 with debugging:
-GhcStage1HcOpts = -Rghc-timing -O0 -DDEBUG
+endif
 
-# alternatively, to work on the stage 2 compiler:
-# GhcStage2HcOpts = -Rghc-timing -O0 -DDEBUG
+# -------- A Fast build with optimised libs ----------------------------------
 
-# profiled RTS
-#GhcRtsCcOpts =  -pg -g
+ifeq "$(BuildFlavour)" "quick"
 
-# Optimised/profiled RTS
-#GhcRtsCcOpts = -O2 -pg
+SRC_HC_OPTS     = -H64m -Onot -fasm
+GhcStage1HcOpts = -O -fasm
+GhcStage2HcOpts = -Onot -fasm
+GhcLibHcOpts    = -O -fasm
+GhcLibWays      =
+SplitObjs       = NO
 
-#GhcRtsWithFrontPanel = YES
-#SRC_HC_OPTS += `gtk-config --libs`
+endif
 
+# -------- A Development build (stage 1) -------------------------------------
+
+ifeq "$(BuildFlavour)" "devel1"
+
+SRC_HC_OPTS     = -H64m -O -fasm $(MyWarningOpts)
+GhcLibHcOpts    = -O -dcore-lint $(MyWarningOpts)
+GhcLibWays      =
+GhcStage1HcOpts = -Rghc-timing -O0 -DDEBUG
+GhcStage2HcOpts = -Rghc-timing O -fasm
 SplitObjs = NO
 
-NoFibWays =
-SRC_RUNTEST_OPTS += +RTS -H10m -RTS
-STRIP=:
+endif
+
+# -------- A Development build (stage 2) -------------------------------------
+
+ifeq "$(BuildFlavour)" "devel2"
+
+SRC_HC_OPTS     = -H64m -O -fasm $(MyWarningOpts)
+GhcLibHcOpts    = -O -dcore-lint $(MyWarningOpts)
+GhcLibWays      =
+GhcStage1HcOpts = -Rghc-timing -O -fasm
+GhcStage2HcOpts = -Rghc-timing -O0 -DDEBUG
+SplitObjs = NO
 
 endif
 
-# -------- 1. A Performance/Distribution build--------------------------------
+# -----------------------------------------------------------------------------
+# Other settings that might be useful
 
-ifeq "$(BuildFlavour)" "perf"
+# profiled RTS
+#GhcRtsCcOpts =  -pg -g
 
-SRC_HC_OPTS   = -H32m -O $(MyWarningOpts)
-GhcHcOpts     = -Rghc-timing
-GhcLibHcOpts  =
+# Optimised/profiled RTS
+#GhcRtsCcOpts = -O2 -pg
 
-GhcLibWays    = p
+#GhcRtsWithFrontPanel = YES
+#SRC_HC_OPTS += `gtk-config --libs`
 
-#GhcRtsCcOpts = -O2 -fomit-frame-pointer -mpreferred-stack-boundary=2 -march=pentiumpro
-endif
+# NoFib settings
+NoFibWays =
+STRIP=: