+ endef
+
+ define Package/eglibc/install
+ $(call Package/glibc/install,$1)
+ endef
+
+ define Package/uClibc/install
+ $(INSTALL_DIR) $(1)/lib
+ $(CP) \
+ $(TOOLCHAIN_DIR)/lib/ld*-uClibc.so.* \
+ $(TOOLCHAIN_DIR)/lib/ld*-uClibc-$(LIBC_SO_VERSION).so \
+ $(1)/lib/
+ $(CP) \
+ $(TOOLCHAIN_DIR)/lib/libc.so.* \
+ $(TOOLCHAIN_DIR)/lib/libuClibc-$(LIBC_SO_VERSION).so \
+ $(1)/lib/
+ for file in libcrypt libdl libm libutil; do \
+ $(CP) \
+ $(TOOLCHAIN_DIR)/lib/$$$$file.so.* \
+ $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_SO_VERSION).so \
+ $(1)/lib/; \
+ done
+
+ $(CP) \
+ $(PKG_BUILD_DIR)/libuClibc-* \
+ $(PKG_BUILD_DIR)/libm-* \
+ $(PKG_BUILD_DIR)/libcrypt-* \
+ $(1)/lib/
+ endef
+
+ define Package/libc/install
+ $(call Package/$(LIBC)/install,$1)
+ endef
+
+ define Package/libc/install_lib
+ $(CP) $(filter-out %/libdl_pic.a %/libpthread_pic.a %/libresolv_pic.a,$(wildcard $(TOOLCHAIN_DIR)/lib/lib*.a)) $(1)/lib/
+ $(if $(wildcard $(TOOLCHAIN_DIR)/lib/libc_so.a),$(CP) $(TOOLCHAIN_DIR)/lib/libc_so.a $(1)/lib/libc_pic.a)
+ $(if $(LIBGCC_MAP), \
+ $(CP) $(LIBGCC_A) $(1)/lib/libgcc_s_pic.a; \
+ $(CP) $(LIBGCC_MAP) $(1)/lib/libgcc_s_pic.map \
+ )
+ endef
+
+ define Package/libpthread/install
+ $(INSTALL_DIR) $(1)/lib
+ $(CP) \
+ $(TOOLCHAIN_DIR)/lib/libpthread.so.* \
+ $(if $(BUILD_LIBGCC),\
+ $(PKG_BUILD_DIR)/libpthread-$(LIBC_SO_VERSION).so, \
+ $(TOOLCHAIN_DIR)/lib/libpthread-$(LIBC_SO_VERSION).so \
+ ) \
+ $(1)/lib/
+ endef
+
+ define Package/libpthread/install_lib
+ $(if $(wildcard $(TOOLCHAIN_DIR)/lib/libpthread_so.a),$(CP) $(TOOLCHAIN_DIR)/lib/libpthread_so.a $(1)/lib/libpthread_pic.a)
+ endef
+
+ define Package/librt/install
+ $(INSTALL_DIR) $(1)/lib
+ $(CP) \
+ $(TOOLCHAIN_DIR)/lib/librt.so.* \
+ $(TOOLCHAIN_DIR)/lib/librt-$(LIBC_SO_VERSION).so \
+ $(1)/lib/
+ endef
+
+ define Package/ldd/install
+ $(INSTALL_DIR) $(1)/usr/bin/
+ $(CP) $(TOOLCHAIN_DIR)/bin/ldd $(1)/usr/bin/
+ endef
+
+ define Package/ldconfig/install
+ $(INSTALL_DIR) $(1)/sbin/
+ $(CP) $(TOOLCHAIN_DIR)/sbin/ldconfig $(1)/sbin/
+ endef
+
+else
+
+ define Package/libgcc/install
+ for file in $(call qstrip,$(CONFIG_LIBGCC_FILE_SPEC)); do \
+ dir=`dirname $$$$file` ; \
+ $(INSTALL_DIR) $(1)/$$$$dir ; \
+ $(CP) $(call qstrip,$(CONFIG_LIBGCC_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
+ done ; \
+ exit 0
+ endef
+
+ define Package/libgfortran/install
+ for file in $(call qstrip,$(CONFIG_LIBGFORTRAN_FILE_SPEC)); do \
+ dir=`dirname $$$$file` ; \
+ $(INSTALL_DIR) $(1)/$$$$dir ; \
+ $(CP) $(call qstrip,$(CONFIG_LIBGFORTRAN_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
+ done
+ endef
+
+ define Package/libssp/install
+ for file in $(call qstrip,$(CONFIG_LIBSSP_FILE_SPEC)); do \
+ dir=`dirname $$$$file` ; \
+ $(INSTALL_DIR) $(1)/$$$$dir ; \
+ $(CP) $(call qstrip,$(CONFIG_LIBSSP_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
+ done ; \
+ exit 0
+ endef
+
+ define Package/libstdcpp/install
+ for file in $(call qstrip,$(CONFIG_LIBSTDCPP_FILE_SPEC)); do \
+ dir=`dirname $$$$file` ; \
+ $(INSTALL_DIR) $(1)/$$$$dir ; \
+ $(CP) $(call qstrip,$(CONFIG_LIBSTDCPP_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
+ done ; \
+ exit 0
+ endef
+
+ define Package/libc/install
+ for file in $(call qstrip,$(CONFIG_LIBC_FILE_SPEC)); do \
+ dir=`dirname $$$$file` ; \
+ $(INSTALL_DIR) $(1)/$$$$dir ; \
+ $(CP) $(call qstrip,$(CONFIG_LIBC_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
+ done ; \
+ exit 0
+ endef
+
+ define Package/libpthread/install
+ for file in $(call qstrip,$(CONFIG_LIBPTHREAD_FILE_SPEC)); do \
+ dir=`dirname $$$$file` ; \
+ $(INSTALL_DIR) $(1)/$$$$dir ; \
+ $(CP) $(call qstrip,$(CONFIG_LIBPTHREAD_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
+ done ; \
+ exit 0
+ endef
+
+ define Package/librt/install
+ for file in $(call qstrip,$(CONFIG_LIBRT_FILE_SPEC)); do \
+ dir=`dirname $$$$file` ; \
+ $(INSTALL_DIR) $(1)/$$$$dir ; \
+ $(CP) $(call qstrip,$(CONFIG_LIBRT_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
+ done ; \
+ exit 0
+ endef
+
+ define Package/ldd/install
+ for file in $(call qstrip,$(CONFIG_LDD_FILE_SPEC)); do \
+ dir=`dirname $$$$file` ; \
+ $(INSTALL_DIR) $(1)/$$$$dir ; \
+ $(CP) $(call qstrip,$(CONFIG_LDD_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
+ done ; \
+ exit 0
+ endef
+
+ define Package/ldconfig/install
+ for file in $(call qstrip,$(CONFIG_LDCONFIG_FILE_SPEC)); do \
+ dir=`dirname $$$$file` ; \
+ $(INSTALL_DIR) $(1)/$$$$dir ; \
+ $(CP) $(call qstrip,$(CONFIG_LDCONFIG_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
+ done ; \
+ exit 0
+ endef
+
+endif
+
+ifneq ($(DUMP),1)
+ -include $(PLATFORM_DIR)/base-files.mk
+endif