Improve the configure script
[packages/integer-gmp.git] / gmp / ghc.mk
index ba0c8bc..a1852c8 100644 (file)
@@ -10,6 +10,9 @@
 #
 # -----------------------------------------------------------------------------
 
+ifneq "$(phase)" "0"
+
+include libraries/integer-gmp/gmp/config.mk
 
 # Compile GMP only if we don't have it already
 #
@@ -39,6 +42,12 @@ ifneq "$(HaveFrameworkGMP)" "YES"
 GMP_LIB = libraries/integer-gmp/gmp/libgmp.a
 OTHER_LIBS += $(GMP_LIB)
 
+SRC_CC_OPTS += -I$(TOP)/libraries/integer-gmp/gmp
+SRC_LD_OPTS += -L$(TOP)/libraries/integer-gmp/gmp
+libraries/integer-gmp_dist-install_CONFIGURE_OPTS += --extra-lib-dirs=$(TOP)/libraries/integer-gmp/gmp
+
+libraries/integer-gmp/dist-install/package-data.mk: libraries/integer-gmp/gmp/gmp.h
+
 INSTALL_LIBS += libraries/integer-gmp/gmp/libgmp.a
 INSTALL_HEADERS += libraries/integer-gmp/gmp/gmp.h
 
@@ -141,3 +150,5 @@ endif
 #      $(RM) -rf gmpbuild-shared
 #endif
 
+endif
+