- install
- touch $(PKG_BUILD_DIR)/.built
-
-$(IPKG_LIBGMP):
- install -m0755 -d $(IDIR_LIBGMP)/usr/lib
- cp -fpR $(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 -fpR $(PKG_INSTALL_DIR)/usr/include/gmp* $(STAGING_DIR)/usr/include/
- mkdir -p $(I_LIBPCAP_DEV)/usr/lib
- cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(STAGING_DIR)/usr/lib/
- touch $(STAGING_DIR)/usr/lib/libgmp.so
-
-install-dev: $(STAGING_DIR)/usr/lib/libgmp.so
-
-uninstall-dev:
- rm -rf $(STAGING_DIR)/usr/include/gmp*
- rm -rf $(STAGING_DIR)/usr/lib/libgmp.{a,so*}
-
-compile: install-dev
-clean: 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 Build/UninstallDev
+ rm -rf $(1)/usr/include/gmp* \
+ $(1)/usr/lib/libgmp.{a,so*}
+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))