-$(PKG_IPK): $(PKG_BUILD_DIR)/lib/libelf.so.$(LIBELF_VER)
- $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
- mkdir -p $(PKG_IPK_DIR)/usr/lib
- cp -a $(PKG_BUILD_DIR)/lib/libelf.so* $(PKG_IPK_DIR)/usr/lib/
- $(STRIP) $(PKG_IPK_DIR)/usr/lib/*
- mkdir -p $(PACKAGE_DIR)
- $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
+$(IPKG_LIBELF):
+ install -d -m0755 $(IDIR_LIBELF)/usr/lib
+ cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libelf.so.* $(IDIR_LIBELF)/usr/lib/
+ $(RSTRIP) $(IDIR_LIBELF)
+ $(IPKG_BUILD) $(IDIR_LIBELF) $(PACKAGE_DIR)