X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=mk%2Ftarget.mk;h=81ac73badfa4820c202bf84e5e26189eb1e37713;hb=50027272414438955dbc41696541cbd25da55883;hp=926560d12daee3b8111ab99a28879e66fc2339e5;hpb=349242118ba2e2d8280f8acb8223665912175699;p=ghc-hetmet.git diff --git a/mk/target.mk b/mk/target.mk index 926560d..81ac73b 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -308,35 +308,49 @@ endif ifneq "$(C_PROG)" "" all :: $(C_PROG) +ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" +CC_OPTS += -mno-cygwin +endif + $(C_PROG) :: $(C_OBJS) $(CC) -o $@ $(CC_OPTS) $(LD_OPTS) $(C_OBJS) $(LIBS) endif #---------------------------------------- -# Libraries/archives +# Building HsLibs libraries. + +ifneq "$(HSLIB)" "" ifeq "$(IS_CBITS_LIB)" "YES" _cbits := _cbits endif -ifneq "$(HSLIB)" "" LIBRARY = libHS$(HSLIB)$(_cbits)$(_way).a GHCI_LIBRARY = HS$(HSLIB)$(_cbits)$(_way).o + +ifneq "$(IS_CBITS_LIB)" "YES" +WAYS=$(GhcLibWays) +endif + ifeq "$(LIBOBJS)" "" - ifneq "$(IS_CBITS_LIB)" "YES" - LIBOBJS = $(HS_OBJS) - else + ifeq "$(IS_CBITS_LIB)" "YES" LIBOBJS = $(C_OBJS) + else + LIBOBJS = $(HS_OBJS) endif endif -ifneq "$(IS_CBITS_LIB)" "" -CC = $(HC) + +ifeq "$(IS_CBITS_LIB)" "YES" override datadir:=$(libdir)/includes INSTALL_DATAS += Hs$(shell perl -e 'print ucfirst "$(HSLIB)"').h SRC_CC_OPTS += -I$(GHC_INCLUDE_DIR) -I$(GHC_RUNTIME_DIR) endif -endif + +endif # HSLIB + +#---------------------------------------- +# Libraries/archives ifneq "$(LIBRARY)" "" all :: $(LIBRARY)