uClibc: fix ptrace header files for powerpc
[openwrt/svn-archive/archive.git] / toolchain / uClibc / Makefile
1 PATH_PREFIX=.
2
3 include ./common.mk
4
5 HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built
6 HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.uclibc_installed
7
8 HOST_BUILD_PARALLEL:=1
9
10 define Host/SetToolchainInfo
11 $(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk
12 $(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.uclibc.org/,' $(TOOLCHAIN_DIR)/info.mk
13 $(SED) 's,^\(LIBC_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
14 $(SED) 's,^\(LIBC_SO_VERSION\)=.*,\1=$(LIBC_SO_VERSION),' $(TOOLCHAIN_DIR)/info.mk
15 endef
16
17 define Host/Compile
18 $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(HOST_BUILD_DIR)/Rules.mak
19 $(UCLIBC_MAKE) PREFIX= all
20 endef
21
22 define Host/Install
23 $(call Host/SetToolchainInfo)
24 $(UCLIBC_MAKE) PREFIX="$(TOOLCHAIN_DIR)/" install_runtime install_dev
25 $(CP) $(HOST_BUILD_DIR)/libc/libc_so.a $(TOOLCHAIN_DIR)/lib/
26 $(CP) $(HOST_BUILD_DIR)/libpthread/*/libpthread_so.a $(TOOLCHAIN_DIR)/lib/
27 ( cd $(TOOLCHAIN_DIR) ; \
28 for d in lib usr/lib ; do \
29 for f in libc.so libpthread.so libgcc_s.so ; do \
30 if [ -f $$$$d/$$$$f -a ! -L $$$$d/$$$$f ] ; then \
31 $(SED) 's,/usr/lib/,,g;s,/lib/,,g' $$$$d/$$$$f ; \
32 fi \
33 done \
34 done \
35 )
36 rm -f \
37 $(TOOLCHAIN_DIR)/lib/libresolv*.so* \
38 $(TOOLCHAIN_DIR)/lib/libnsl*.so*
39 endef
40
41 $(eval $(call HostBuild))