summaryrefslogtreecommitdiffstats
path: root/toolchain/uClibc/uclibc.mk
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-01-21 12:58:51 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-01-21 12:58:51 +0000
commit726abd4e519f97eda6f6dfc1b6b9505fc37e8b23 (patch)
tree660193529c48e113266f8e844b8a309db45ecc2b /toolchain/uClibc/uclibc.mk
parent50399135542bfb1d7f49ff276f47081313d1426d (diff)
downloadbuildroot-novena-726abd4e519f97eda6f6dfc1b6b9505fc37e8b23.tar.gz
buildroot-novena-726abd4e519f97eda6f6dfc1b6b9505fc37e8b23.zip
- provide means to "install uClibc headers in the target filesystem" without a native compiler
Diffstat (limited to 'toolchain/uClibc/uclibc.mk')
-rw-r--r--toolchain/uClibc/uclibc.mk30
1 files changed, 28 insertions, 2 deletions
diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk
index 8d26a7f74..09ff16b62 100644
--- a/toolchain/uClibc/uclibc.mk
+++ b/toolchain/uClibc/uclibc.mk
@@ -315,11 +315,37 @@ $(TARGET_DIR)/usr/lib/libc.a: $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a
fi;
touch -c $(TARGET_DIR)/usr/lib/libc.a
+$(TARGET_DIR)/usr/include/libc-internal.h: $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a
+ $(MAKE1) -C $(UCLIBC_DIR) \
+ PREFIX=$(TARGET_DIR) \
+ DEVEL_PREFIX=/usr/ \
+ RUNTIME_PREFIX=/ \
+ install_headers
+ # Install the kernel headers to the target dir if necessary
+ if [ ! -f $(TARGET_DIR)/usr/include/linux/version.h ] ; then \
+ cp -pLR $(LINUX_HEADERS_DIR)/include/asm $(TARGET_DIR)/usr/include/ ; \
+ cp -pLR $(LINUX_HEADERS_DIR)/include/linux $(TARGET_DIR)/usr/include/ ; \
+ if [ -d $(LINUX_HEADERS_DIR)/include/asm-generic ] ; then \
+ cp -pLR $(LINUX_HEADERS_DIR)/include/asm-generic \
+ $(TARGET_DIR)/usr/include/ ; \
+ fi; \
+ fi;
+
+ifeq ($(BR2_PACKAGE_UCLIBC_TARGET_HEADERS),y)
+uclibc_target_headers: $(TARGET_DIR)/usr/include/libc-internal.h
+uclibc_target_headers-clean:
+ rm -rf $(TARGET_DIR)/usr/include
+uclibc_target_headers-dirclean:
+ rm -rf $(TARGET_DIR)/usr/include
+else
+uclibc_target_headers: ;
+endif
+
uclibc_target: gcc uclibc $(TARGET_DIR)/usr/lib/libc.a $(TARGET_DIR)/usr/bin/ldd
uclibc_target-clean:
- rm -f $(TARGET_DIR)/include
+ rm -rf $(TARGET_DIR)/usr/include
uclibc_target-dirclean:
- rm -f $(TARGET_DIR)/include
+ rm -rf $(TARGET_DIR)/usr/include