X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FMakefile;h=c01d5e2b5e0291174386b4fdfdd5d4181c8c09e3;hb=dff6ab2d210ff6139aaea38bef16c0ae2d1a005a;hp=f5d1f759bfa24bc235d86a01a3ad930f6a96861e;hpb=e7346fbbb8999184cb935e3d721e9d57559ce476;p=ghc-hetmet.git diff --git a/ghc/rts/Makefile b/ghc/rts/Makefile index f5d1f75..c01d5e2 100644 --- a/ghc/rts/Makefile +++ b/ghc/rts/Makefile @@ -1,5 +1,5 @@ #----------------------------------------------------------------------------- -# $Id: Makefile,v 1.45 2001/04/03 15:57:30 dsyme Exp $ +# $Id: Makefile,v 1.56 2002/01/15 05:39:15 sof 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 @@ -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 @@ -104,8 +104,8 @@ 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) +SRC_CC_OPTS += -I../includes -I. -Iparallel -DCOMPILING_RTS else # otherwise, use $(GHC_INPLACE) as the C compiler. CC=$(GHC_INPLACE) @@ -121,7 +121,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 @@ -151,10 +151,18 @@ 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 --target=$(HOSTPLATFORM) + 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 && CC=$(WhatGccIsCalled) ./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,18 +176,21 @@ endif install :: gmp/libgmp.a -clean :: - $(MAKE) -C gmp MAKEFLAGS= clean - ifeq "$(way)" "" +clean distclean maintainer-clean :: + -$(MAKE) -C gmp MAKEFLAGS= $@ + INSTALL_LIBS += gmp/libgmp.a endif gmp/libgmp.a :: $(MAKE) -C gmp MAKEFLAGS= @$(CP) gmp/.libs/libgmp.a gmp + @$(RANLIB) gmp/libgmp.a endif +CLEAN_FILES += gmp/libgmp.a + #----------------------------------------------------------------------------- # # Building the GUM SysMan