[project @ 2001-07-23 21:31:00 by sof]
[ghc-hetmet.git] / ghc / rts / Makefile
index 1580523..5c8d651 100644 (file)
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.48 2001/04/27 16:30:08 sewardj Exp $
+# $Id: Makefile,v 1.53 2001/07/23 21:31:00 sof Exp $
 #
 #  This is the Makefile for the runtime-system stuff.
 #  This stuff is written in C (and cannot be written in Haskell).
@@ -80,7 +80,7 @@ SRCS_RTS_C :=  $(filter-out Vis%.c, $(SRCS_RTS_C))
 # we need GTK+ for the front panel
 ifneq "$(GTK_CONFIG)" ""
 ifeq "$(GhcRtsWithFrontPanel)" "YES"
-SRC_HC_OPTS            += `$(GTK_CONFIG) --cflags` -DRTS_GTK_FRONTPANEL
+SRC_HC_OPTS            += `$(GTK_CONFIG) --cflags` -optc-DRTS_GTK_FRONTPANEL
 SRCS_RTS_C             := $(SRCS_RTS_C) $(wildcard Vis*.c)
 VisCallbacks_CC_OPTS   += -Wno-unused
 endif # GhcRtsWithFrontPanel
@@ -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
@@ -155,8 +155,10 @@ boot ::
        cd gmp && ./configure --enable-shared=no \
                --host=`echo $(HOSTPLATFORM) | sed 's/i[567]86/i486/g'`
 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.
@@ -183,6 +185,7 @@ endif
 gmp/libgmp.a ::
        $(MAKE) -C gmp MAKEFLAGS=
        @$(CP) gmp/.libs/libgmp.a gmp
+       @$(RANLIB) gmp/libgmp.a
 endif
 
 #-----------------------------------------------------------------------------