[project @ 2005-05-17 12:34:13 by simonmar]
[ghc-hetmet.git] / mk / config.mk.in
index 1a8dc38..6287525 100644 (file)
@@ -187,7 +187,7 @@ IncludeExampleDirsInBuild=NO
 
 #
 # Which ways should DocBook XML documents be built?
-# options are: dvi ps pdf html
+# options are: dvi ps pdf html chm HxS
 #
 XMLDocWays=
 
@@ -255,7 +255,7 @@ GhcUnregisterised=NO
 # Target platforms supported:
 #   i386, powerpc
 #   sparc has bitrotted
-ifneq "$(findstring $(HostArch_CPP), i386 powerpc)" ""
+ifneq "$(findstring $(HostArch_CPP), i386 x86_64 powerpc)" ""
 GhcWithNativeCodeGen=YES
 else
 GhcWithNativeCodeGen=NO
@@ -268,9 +268,13 @@ HaveLibDL = @HaveLibDL@
 HaveRtldNext = @HaveRtldNext@
 HaveRtldLocal = @HaveRtldLocal@
 
-# Include GHCi in the compiler.  Default to NO for the time being.
+# Whether to include GHCi in the compiler.  Depends on whether the RTS linker
+# has support for this OS/ARCH combination.
 
-ifneq "$(findstring $(HostOS_CPP), mingw32 cygwin32 linux solaris2 freebsd netbsd openbsd darwin)" ""
+OsSupportsGHCi=$(strip $(patsubst $(HostOS_CPP), YES, $(findstring $(HostOS_CPP), mingw32 cygwin32 linux solaris2 freebsd netbsd openbsd darwin)))
+ArchSupportsGHCi=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 powerpc powerpc64 sparc sparc64)))
+
+ifeq "$(OsSupportsGHCi)$(ArchSupportsGHCi)" "YESYES"
 GhcWithInterpreter=YES
 else 
 GhcWithInterpreter=NO
@@ -309,7 +313,7 @@ endif
 ifeq "$(BootingFromHc)" "YES"
 GhcRTSWays=
 else
-GhcRTSWays=thr thr_p debug
+GhcRTSWays=thr thr_p debug thr_debug
 endif
 
 # Option flags to pass to GHC when it's compiling modules in
@@ -319,8 +323,13 @@ endif
 #
 #      -O is pretty desirable, otherwise no inlining of prelude
 #              things (incl "+") happens when compiling with this compiler
+#
+#      -fgenerics switches on generation of support code for 
+#              derivable type classes.  This is now off by default,
+#              but we switch it on for the libraries so that we generate
+#              the code in case someone importing wants it
 
-GhcLibHcOpts=-O -Rghc-timing
+GhcLibHcOpts=-O -Rghc-timing -fgenerics
 
 # Win32 only: Enable the RTS and libraries to be built as DLLs
 DLLized=@EnableWin32DLLs@
@@ -339,11 +348,14 @@ StripLibraries=NO
 #      Don't use -split-objs in in GhcLibHcOpts, because the build
 #              system needs to do other special magic if you are
 #              doing object-file splitting
+ifneq "$(findstring $(HostArch_CPP), i386 powerpc sparc)" ""
+SplitObjs=YES
+else
+SplitObjs=NO
+endif
 
 # Don't split object files for libs if we're building DLLs, or booting from
 # .hc files.
-SplitObjs=YES
-
 ifeq "$(DLLized)" "YES"
 SplitObjs=NO
 endif
@@ -353,7 +365,7 @@ endif
 ifeq "$(GhcUnregisterised)" "YES"
 SplitObjs=NO
 endif
-ifeq "$(TARGETPLATFORM)" "ia64-unknown-linux"
+ifeq "$(TargetArch_CPP)" "ia64"
 SplitObjs=NO
 endif
 
@@ -361,7 +373,7 @@ endif
 # Options for GHC's RTS
 
 # For an optimised RTS (you probably don't want to change these; we build
-# a debugging RTS by default now.  Use -package rts_debug to get it).
+# a debugging RTS by default now.  Use -debug to get it).
 GhcRtsHcOpts=-O2
 GhcRtsCcOpts=-fomit-frame-pointer
 
@@ -462,6 +474,9 @@ NoFibWays = $(GhcLibWays)
 # Haskell compiler options for nofib
 NoFibHcOpts = -O
 
+# Number of times to run each program
+NoFibRuns = 5
+
 # ==============================================================================
 #
 #                      END OF PROJECT-SPECIFIC STUFF
@@ -754,14 +769,14 @@ HaveLibGmp        = @HaveLibGmp@
 LibGmp         = @LibGmp@
 
 #-----------------------------------------------------------------------------
-# Mingwex Library
+# GMP framework (Mac OS X)
 #
-HaveLibMingwEx = @HaveLibMingwEx@
+HaveFrameworkGMP = @HaveFrameworkGMP@
 
 #-----------------------------------------------------------------------------
-# HaskellSupport framework (Mac OS X)
+# Mingwex Library
 #
-HaveFrameworkHaskellSupport = @HaveFrameworkHaskellSupport@
+HaveLibMingwEx = @HaveLibMingwEx@
 
 #-----------------------------------------------------------------------------
 # Flex (currently unused, could be moved to glafp-utils)
@@ -789,6 +804,7 @@ CTAGS                       = $(ETAGS)
 #
 RAWCPP_FLAGS            = -undef -traditional
 FIND                   = @FindCmd@
+SORT                   = @SortCmd@
 INSTALL                        = @INSTALL@
 #
 # Sigh - the autoconf macro for INSTALL will subst a relative path to the fallback
@@ -1061,6 +1077,10 @@ WAY_debug_p_HC_OPTS=-optc-DDEBUG -prof
 WAY_debug_u_NAME=debug unregisterised
 WAY_debug_u_HC_OPTS=-optc-DDEBUG -unreg
 
+# Way 'debug_s':
+WAY_debug_s_NAME=debug SMP
+WAY_debug_s_HC_OPTS=-optc-DDEBUG -smp
+
 # Way 'thr_debug':
 WAY_thr_debug_NAME=threaded
 WAY_thr_debug_HC_OPTS=-optc-DTHREADED_RTS -optc-DDEBUG