X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FMakefile;h=6bf42712cb8230d7ca2fcc5a8ef3dd1acfd9eb22;hb=4cf6fdd28fea80bd8e2bb86f2f5da15fd851f783;hp=e9612a9e7131e4cfd038cac79e286e4e635787f8;hpb=760e1a82a93285e481ec042d772da7a67116f02a;p=ghc-hetmet.git diff --git a/rts/Makefile b/rts/Makefile index e9612a9..6bf4271 100644 --- a/rts/Makefile +++ b/rts/Makefile @@ -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