X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FMakefile;h=184a8440cc780998b1ac2531d64b840e1c3be09d;hb=897bcbf84da1b217503e86910ac27255106fc026;hp=e9612a9e7131e4cfd038cac79e286e4e635787f8;hpb=760e1a82a93285e481ec042d772da7a67116f02a;p=ghc-hetmet.git diff --git a/rts/Makefile b/rts/Makefile index e9612a9..184a844 100644 --- a/rts/Makefile +++ b/rts/Makefile @@ -35,7 +35,7 @@ WAYS=$(GhcLibWays) $(GhcRTSWays) ifneq "$(findstring debug, $(way))" "" GhcRtsHcOpts= -GhcRtsCcOpts=-g +GhcRtsCcOpts=-g -O0 endif # ----------------------------------------------------------------------------- @@ -292,6 +292,24 @@ endif CLEAN_FILES += gmp/libgmp.a +# Need to get the GMP vars in through CPP to package.conf.in, and put +# quotes around each element. + +empty = +space = $(empty) $(empty) +comma = , +PACKAGE_CPP_OPTS += -DGMP_INCLUDE_DIRS='$(subst $(space),$(comma),$(patsubst %,"%",$(strip $(GMP_INCLUDE_DIRS))))' +PACKAGE_CPP_OPTS += -DGMP_LIB_DIRS='$(subst $(space),$(comma),$(patsubst %,"%",$(strip $(GMP_LIB_DIRS))))' + +ifneq "$(GMP_INCLUDE_DIRS)" "" +SRC_HC_OPTS += -I$(GMP_INCLUDE_DIRS) +SRC_CC_OPTS += -I$(GMP_INCLUDE_DIRS) +SRC_HSC2HS_OPTS += -I$(GMP_INCLUDE_DIRS) +endif +ifneq "$(GMP_LIB_DIRS)" "" +SRC_LD_OPTS += -L$(GMP_LIB_DIRS) +endif + #----------------------------------------------------------------------------- # # Building the GUM SysMan