[project @ 2004-08-09 14:27:53 by simonmar]
[ghc-hetmet.git] / ghc / compiler / Makefile
index 6732083..b040e58 100644 (file)
@@ -159,6 +159,7 @@ endif
 # be to do `env PATH=$(PATH) make ghc' to minimise the environment. (or the
 # equivalent of `env' if it doesn't exist locally).
 #
+ifneq "$(BuildPackageGHC)" "YES"
 ifneq "$(way)" "dll"
 ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
 HS_PROG=$(odir)/ghc$(_way)-$(ProjectVersion)
@@ -168,6 +169,7 @@ endif
 else
 HS_PROG=$(odir)/ghc-$(ProjectVersion)
 endif
+endif
 
 # -----------------------------------------------------------------------------
 # Create compiler configuration
@@ -285,9 +287,6 @@ else
 EXCLUDED_SRCS += deSugar/DsMeta.hs typecheck/TcSplice.lhs hsSyn/Convert.lhs
 endif 
 
-# There are some C files to include in HS_PROG, so add these to HS_OBJS
-HS_OBJS         += $(C_OBJS)
-
 # -----------------------------------------------
 # mkdependC stuff
 #
@@ -304,7 +303,7 @@ SRC_MKDEPENDC_OPTS += -I$(GHC_INCLUDE_DIR)
 #              Haskell compilations
 
 SRC_HC_OPTS += \
-  -cpp -fglasgow-exts -Rghc-timing \
+  -cpp -fglasgow-exts -fno-generics -Rghc-timing \
   -I. -IcodeGen -InativeGen -Iparser
 
 # Omitted:     -I$(GHC_INCLUDE_DIR)
@@ -560,6 +559,17 @@ endif
 coreSyn/CorePrep_HC_OPTS += -auto-all
 
 #-----------------------------------------------------------------------------
+# Building GHC package
+
+ifeq "$(BuildPackageGHC)" "YES"
+
+PACKAGE = ghc
+STANDALONE_PACKAGE = YES
+PACKAGE_DEPS = base haskell98
+
+endif
+
+#-----------------------------------------------------------------------------
 #              clean
 
 MAINTAINER_CLEAN_FILES += parser/Parser.info main/ParsePkgConf.info