X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=mk%2Ftarget.mk;h=287fa4099b611a57c8f1dbae1efcdba9ac7b4de5;hb=4a84bb362c9433bc3fa6df42981cde41677d652b;hp=0a64f068feff852d0ba6d974977fffd05bec4977;hpb=46518c83e1d4a479eec18c7fa87d2df1d60ec07f;p=ghc-hetmet.git diff --git a/mk/target.mk b/mk/target.mk index 0a64f06..287fa40 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -309,7 +309,8 @@ _cbits := _cbits endif ifneq "$(HSLIB)" "" -LIBRARY = libHS$(HSLIB)$(_cbits)$(_way).a +LIBRARY = libHS$(HSLIB)$(_cbits)$(_way).a +GHCI_LIBRARY = HS$(HSLIB)$(_cbits)$(_way).o ifeq "$(LIBOBJS)" "" ifneq "$(IS_CBITS_LIB)" "YES" LIBOBJS = $(HS_OBJS) @@ -400,6 +401,36 @@ $(LIBRARY) :: $(STUBOBJS) $(LIBOBJS) $(BUILD_LIB) endif +#-------------------------------------------------------------- +# Build dynamically-linkable libraries for GHCi +# + +ifneq "$(GHCI_LIBRARY)" "" +ifeq "$(GhcWithInterpreter)" "YES" + +all :: $(GHCI_LIBRARY) + +ifeq "$(GHCI_LIBOBJS)" "" +GHCI_LIBOBJS = $(LIBOBJS) +endif + +ifneq "$(HS_SRCS)" "" +ifeq "$(SplitObjs)" "YES" +$(GHCI_LIBRARY) :: $(GHCI_LIBOBJS) + ( echo $(STUBOBJS) ; $(FIND) $(patsubst %.$(way_)o,%,$(GHCI_LIBOBJS)) -name '*.$(way_)o' -print ) | xargs ld -r -x -o $@ +else # not SplitObjs +$(GHCI_LIBRARY) :: $(GHCI_LIBOBJS) + ld -r -x -o $@ $(GHCI_LIBOBJS) +endif +else # no HS_SRCS +$(GHCI_LIBRARY) :: $(GHCI_LIBOBJS) + ld -r -x -o $@ $(GHCI_LIBOBJS) +endif + +CLEAN_FILES += $(GHCI_LIBRARY) +endif +endif + #---------------------------------------- # Building Win32 DLLs # @@ -893,17 +924,9 @@ ifneq "$(SGML_DOC)" "" # multi-file SGML document: main document name is specified in $(SGML_DOC), # sub-documents (.sgml files) listed in $(SGML_SRCS). -ifeq "$(VSGML_SRCS)" "" -VSGML_SRCS = $(wildcard *.vsgml) -endif - ifeq "$(SGML_SRCS)" "" -ifneq "$(VSGML_SRCS)" "" -SGML_SRCS = $(patsubst %.vsgml, %.sgml, $(VSGML_SRCS)) -else SGML_SRCS = $(wildcard *.sgml) endif -endif SGML_TEX = $(addsuffix .tex,$(SGML_DOC)) SGML_DVI = $(addsuffix .dvi,$(SGML_DOC)) @@ -925,7 +948,6 @@ txt :: $(SGML_TEXT) CLEAN_FILES += $(SGML_TEXT) $(SGML_TEX) $(SGML_PS) $(SGML_DVI) $(SGML_PDF) $(SGML_RTF) $(SGML_HTML) $(SGML_DOC)-*.html # can't use $(SGML_SRCS) here, it was maybe used elsewhere -MOSTLY_CLEAN_FILES += $(patsubst %.vsgml, %.sgml, $(VSGML_SRCS)) extraclean :: $(RM) -rf DBTOHTML_OUTPUT_*