X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FMakefile;h=5de1c24b36f96f84518a854663c964319b457010;hb=9dbc74ba4aea2b544ca889305a177f3f3921358f;hp=c7a7a67a2f40f700559552f0fdbda33a4dfeed54;hpb=2948d495129c7d4d2067d4609fc8bf392a019d82;p=ghc-hetmet.git diff --git a/ghc/rts/Makefile b/ghc/rts/Makefile index c7a7a67..5de1c24 100644 --- a/ghc/rts/Makefile +++ b/ghc/rts/Makefile @@ -1,5 +1,5 @@ #----------------------------------------------------------------------------- -# $Id: Makefile,v 1.8 1999/04/27 09:37:04 simonm Exp $ +# $Id: Makefile,v 1.10 1999/05/10 08:23:55 sof Exp $ # This is the Makefile for the runtime-system stuff. # This stuff is written in C (and cannot be written in Haskell). @@ -56,7 +56,9 @@ WARNING_OPTS += -optc-Wbad-function-cast SRC_HC_OPTS += -I../includes -I. -Igum $(WARNING_OPTS) $(GhcRtsHcOpts) -optc-DCOMPILING_RTS SRC_CC_OPTS = $(GhcRtsCcOpts) -DLLWRAP = dllwrap +ifneq "$(way)" "dll" +SRC_HC_OPTS += -static +endif ifeq "$(way)" "mp" SRC_HC_OPTS += -I$$PVM_ROOT/include @@ -84,12 +86,29 @@ unexport CC # # Building DLLs is only supported on mingw32 at the moment. # -ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" -dll :: - $(CP) -f libHSrts.a libHSrts_dll.a - ar d libHSrts_dll.a Main.o - $(DLLWRAP) -mno-cygwin --target=i386-mingw32 --export-all --output-lib libHSrts_imp.a --def HSrts.def -o HSrts.dll libHSrts_dll.a -lwinmm -lHS -lgmp -L. -Lgmp +ifeq "$(way)" "dll" +DLL_NAME = HSrts.dll +SRC_BLD_DLL_OPTS += --def HSrts.def -lwinmm -lHS_imp_stub -lgmp -L. -Lgmp + +# +# Need an import library containing the symbols the RTS uses from the Prelude. +# So, to avoid bootstrapping trouble, we build one containing just the syms +# we need. Weirdly named to avoid clashing later on when compiling the contents +# of ghc/lib/.. +# +# Note: if you do change the name of the Prelude DLL, the "--dllname .dll" +# below will need to be updated as well. + +$(DLL_NAME) :: libHS_imp_stub.a + +libHS_imp_stub.a : + dlltool --output-lib libHS_imp_stub.a --def HSprel.def --dllname HSprel.dll + +# It's not included in the DLL, but we need to compile it up separately. +all :: Main.dll_o + endif + # ----------------------------------------------------------------------------- # Compile GMP only if we don't have it already #