- all install
- touch $@
-
-$(IPKG_LIBGMP):
- install -m0755 -d $(IDIR_LIBGMP)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(IDIR_LIBGMP)/usr/lib/
- $(RSTRIP) $(IDIR_LIBGMP)
- $(IPKG_BUILD) $(IDIR_LIBGMP) $(PACKAGE_DIR)
-
-$(STAGING_DIR)/usr/lib/libgmp.so: $(PKG_BUILD_DIR)/.built
- mkdir -p $(STAGING_DIR)/usr/include
- $(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(STAGING_DIR)/usr/include/
- mkdir -p $(STAGING_DIR)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(STAGING_DIR)/usr/lib/
- touch $@
-
-install-dev: $(STAGING_DIR)/usr/lib/libgmp.so
-
-uninstall-dev:
- rm -rf \
- $(STAGING_DIR)/usr/include/gmp* \
- $(STAGING_DIR)/usr/lib/libgmp.{a,so*} \
-
-compile-targets: install-dev
-clean-targets: uninstall-dev
+ CC="$(TARGET_CC)" \
+ all install \
+ )
+endef
+
+define Build/InstallDev
+ mkdir -p $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(1)/usr/include/
+ mkdir -p $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/libgmp/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libgmp))