From bc48dfb6d88d3f2df58c5cb2d3f93ab5a04aeb6b Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 28 May 2022 15:30:52 +0200 Subject: [PATCH] - libdpf: rework build --- package/libdpf/libdpf.mk | 18 +++++++++--------- ...-crossbuild.patch => 0001-crossbuild.patch} | 0 2 files changed, 9 insertions(+), 9 deletions(-) rename package/libdpf/patches/{libdpf-crossbuild.patch => 0001-crossbuild.patch} (100%) diff --git a/package/libdpf/libdpf.mk b/package/libdpf/libdpf.mk index 115bfe66..5a93f0a7 100644 --- a/package/libdpf/libdpf.mk +++ b/package/libdpf/libdpf.mk @@ -14,16 +14,16 @@ LIBDPF_DEPENDENCIES = libusb-compat LIBDPF_MAKE_OPTS = \ CC=$(TARGET_CC) PREFIX=$(TARGET_prefix) -libdpf: $(LIBDPF_DEPENDENCIES) | $(TARGET_DIR) - $(REMOVE)/$(PKG_DIR) - $(GET_GIT_SOURCE) $(PKG_SITE)/$(PKG_SOURCE) $(DL_DIR)/$(PKG_SOURCE) - $(CPDIR)/$(PKG_SOURCE) - $(call APPLY_PATCHES,$(PKG_PATCHES_DIR)) - $(CHDIR)/$(PKG_DIR); \ - $(MAKE1) -C dpflib libdpf.a $($(PKG)_MAKE_OPTS) +define LIBDPF_INSTALL_FILES $(INSTALL_DATA) -D $(PKG_BUILD_DIR)/dpflib/libdpf.a $(TARGET_libdir)/libdpf.a $(INSTALL_DATA) -D $(PKG_BUILD_DIR)/dpflib/dpf.h $(TARGET_includedir)/libdpf/libdpf.h $(INSTALL_DATA) -D $(PKG_BUILD_DIR)/include/spiflash.h $(TARGET_includedir)/libdpf/spiflash.h $(INSTALL_DATA) -D $(PKG_BUILD_DIR)/include/usbuser.h $(TARGET_includedir)/libdpf/usbuser.h - $(REMOVE)/$(PKG_DIR) - $(TOUCH) +endef +LIBDPF_PRE_FOLLOWUP_HOOKS += LIBDPF_INSTALL_FILES + +libdpf: | $(TARGET_DIR) + $(call PREPARE) + $(CHDIR)/$($(PKG)_DIR); \ + $(MAKE1) -C dpflib libdpf.a $($(PKG)_MAKE_OPTS) + $(call TARGET_FOLLOWUP) diff --git a/package/libdpf/patches/libdpf-crossbuild.patch b/package/libdpf/patches/0001-crossbuild.patch similarity index 100% rename from package/libdpf/patches/libdpf-crossbuild.patch rename to package/libdpf/patches/0001-crossbuild.patch