1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-05 10:25:54 +02:00
openwrt-xburst/toolchain/uClibc/Makefile
nbd db73773bde uClibc: split the package into the main directory and the headers/ and utils/ subdirectories to clean up build order and fix quilt support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32557 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-06-30 21:44:05 +00:00

40 lines
1.2 KiB
Makefile

PATH_PREFIX=.
include ./common.mk
HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built
HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.uclibc_installed
define Host/SetToolchainInfo
$(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.uclibc.org/,' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_SO_VERSION\)=.*,\1=$(LIBC_SO_VERSION),' $(TOOLCHAIN_DIR)/info.mk
endef
define Host/Compile
$(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(HOST_BUILD_DIR)/Rules.mak
$(UCLIBC_MAKE) $(TOOLCHAIN_JOBS) PREFIX= all
endef
define Host/Install
$(call Host/SetToolchainInfo)
$(UCLIBC_MAKE) PREFIX="$(TOOLCHAIN_DIR)/" install_runtime install_dev
$(CP) $(HOST_BUILD_DIR)/libc/libc_so.a $(TOOLCHAIN_DIR)/lib/
$(CP) $(HOST_BUILD_DIR)/libpthread/*/libpthread_so.a $(TOOLCHAIN_DIR)/lib/
( cd $(TOOLCHAIN_DIR) ; \
for d in lib usr/lib ; do \
for f in libc.so libpthread.so libgcc_s.so ; do \
if [ -f $$$$d/$$$$f -a ! -L $$$$d/$$$$f ] ; then \
$(SED) 's,/usr/lib/,,g;s,/lib/,,g' $$$$d/$$$$f ; \
fi \
done \
done \
)
rm -f \
$(TOOLCHAIN_DIR)/lib/libresolv*.so* \
$(TOOLCHAIN_DIR)/lib/libnsl*.so*
endef
$(eval $(call HostBuild))