[project @ 2001-08-20 14:10:02 by simonmar]
[ghc-hetmet.git] / ghc / rts / Makefile
index 5adfa21..07707e5 100644 (file)
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.50 2001/06/06 10:35:39 rrt Exp $
+# $Id: Makefile,v 1.54 2001/07/23 23:27:50 ken Exp $
 #
 #  This is the Makefile for the runtime-system stuff.
 #  This stuff is written in C (and cannot be written in Haskell).
@@ -51,7 +51,7 @@ WARNING_OPTS += -Winline
 WARNING_OPTS += -Waggregate-return
 #WARNING_OPTS += -Wpointer-arith
 WARNING_OPTS += -Wbad-function-cast
-#WARNING_OPTS += -Wcast-align
+WARNING_OPTS += -Wcast-align
 #WARNING_OPTS += -Wnested-externs
 #WARNING_OPTS += -Wshadow
 #WARNING_OPTS += -Wcast-qual
@@ -120,7 +120,7 @@ unexport CC
 #
 #  Building DLLs is only supported on mingw32 at the moment.
 #
-HSLIB             = rts
+PACKAGE             = rts
 
 ifeq "$(DLLized)" "YES"
 SRC_BLD_DLL_OPTS += -lHS_imp_stub -lgmp_imp
@@ -158,7 +158,7 @@ else
 # Pass --target to configure of GMP, so that building for mingwin under
 # cygwin works properly (when the host is not the same as the target)
 boot ::
-       cd gmp && ./configure --enable-shared=no --target=$(HOSTPLATFORM)
+       cd gmp && CC=$(WhatGccIsCalled) ./configure --enable-shared=no --target=$(HOSTPLATFORM)
 endif
 
 # Slight cheatage here to pass host as target, but x-compilation isn't supported by ghc.
@@ -175,16 +175,17 @@ endif
 
 install :: gmp/libgmp.a
 
+ifeq "$(way)" ""
 clean distclean maintainer-clean ::
-       $(MAKE) -C gmp MAKEFLAGS= $@
+       -$(MAKE) -C gmp MAKEFLAGS= $@
 
-ifeq "$(way)" ""
 INSTALL_LIBS += gmp/libgmp.a
 endif
 
 gmp/libgmp.a ::
        $(MAKE) -C gmp MAKEFLAGS=
        @$(CP) gmp/.libs/libgmp.a gmp
+       @$(RANLIB) gmp/libgmp.a
 endif
 
 #-----------------------------------------------------------------------------