[project @ 2003-08-04 10:06:31 by ross]
[ghc-hetmet.git] / ghc / includes / Makefile
index a6374e2..e0f4b90 100644 (file)
@@ -1,5 +1,5 @@
 # -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.18 2001/11/21 16:56:19 sof Exp $
+# $Id: Makefile,v 1.21 2003/03/21 15:45:56 sof Exp $
 #
 
 TOP = ..
@@ -11,6 +11,13 @@ include $(TOP)/mk/boilerplate.mk
 H_FILES = $(filter-out gmp.h,$(wildcard *.h)) gmp.h
 
 #
+# Options -- if we're building unregisterised, add a couple of -D's
+#
+ifeq "$(GhcUnregisterised)" "YES"
+SRC_CC_OPTS += -DNO_REGS -DUSE_MINIINTERPRETER
+endif
+
+#
 # Header file built from the configure script's findings
 #
 H_CONFIG = config.h
@@ -66,17 +73,19 @@ endif
        @echo "Done."
 
 # ---------------------------------------------------------------------------
-# Make NativeDefs.h for the NCG
+# Make DerivedConstants.h for the compiler
 
 all :: DerivedConstants.h
 
+mkDerivedConstants.c : $(H_CONFIG)
+
 mkDerivedConstantsHdr : mkDerivedConstants.o
        $(CC) -o $@ $(CC_OPTS) $(LD_OPTS) mkDerivedConstants.o
 
 DerivedConstants.h : mkDerivedConstantsHdr
        ./mkDerivedConstantsHdr >DerivedConstants.h
 
-CLEAN_FILES += mkDerivedConstantsHdr DerivedConstants.h
+CLEAN_FILES += mkDerivedConstantsHdr$(exeext) DerivedConstants.h
 
 # ---------------------------------------------------------------------------
 # Make NativeDefs.h for the NCG
@@ -91,7 +100,7 @@ mkNativeHdr : mkNativeHdr.o
 NativeDefs.h : mkNativeHdr
        ./mkNativeHdr >NativeDefs.h
 
-CLEAN_FILES += mkNativeHdr NativeDefs.h
+CLEAN_FILES += mkNativeHdr$(exeext) NativeDefs.h
 
 # ---------------------------------------------------------------------------
 # boot setup: