[project @ 2001-05-03 16:32:55 by simonmar]
[ghc-hetmet.git] / ghc / rts / Makefile
index f5d1f75..1580523 100644 (file)
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.45 2001/04/03 15:57:30 dsyme Exp $
+# $Id: Makefile,v 1.48 2001/04/27 16:30:08 sewardj Exp $
 #
 #  This is the Makefile for the runtime-system stuff.
 #  This stuff is written in C (and cannot be written in Haskell).
@@ -104,8 +104,7 @@ SRC_MKDEPENDC_OPTS += -I. -I../includes
 
 ifeq "$(BootingFromHc)" "YES"
 # use the normal $(CC) when booting from .hc files
-SRC_CC_OPTS := $(SRC_CC_OPTS)
-SRC_CC_OPTS += $(PLATFORM_CC_OPTS) $(HC_OPTS)
+SRC_CC_OPTS += $(HC_OPTS)
 else
 # otherwise, use $(GHC_INPLACE) as the C compiler.
 CC=$(GHC_INPLACE)
@@ -151,10 +150,16 @@ endif
 # and not worth re-implementing in our Makefile framework.
 
 ifneq "$(HaveLibGmp)" "YES"
+ifneq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
+boot ::
+       cd gmp && ./configure --enable-shared=no \
+               --host=`echo $(HOSTPLATFORM) | sed 's/i[567]86/i486/g'`
+else
 boot ::
        cd gmp && ./configure --enable-shared=no --target=$(HOSTPLATFORM)
+endif
 
-# Slight cheatage here to past host as target, but x-compilation isn't supported by ghc.
+# Slight cheatage here to pass host as target, but x-compilation isn't supported by ghc.
 
 all :: gmp/libgmp.a
 
@@ -168,8 +173,8 @@ endif
 
 install :: gmp/libgmp.a
 
-clean ::
-       $(MAKE) -C gmp MAKEFLAGS= clean
+clean distclean maintainer-clean ::
+       $(MAKE) -C gmp MAKEFLAGS= $@
 
 ifeq "$(way)" ""
 INSTALL_LIBS += gmp/libgmp.a