- provide means to "install uClibc headers in the target filesystem" without a native...
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sun, 21 Jan 2007 12:58:51 +0000 (12:58 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sun, 21 Jan 2007 12:58:51 +0000 (12:58 -0000)
package/Config.in
toolchain/Makefile.in
toolchain/gcc/Config.in.2
toolchain/uClibc/Config.in.2 [new file with mode: 0644]
toolchain/uClibc/Makefile.in [new file with mode: 0644]
toolchain/uClibc/uclibc.mk

index d8a6317eeb8dbce2b2d5fa62e8141824c6727680..e9ecf99ea09ef7a8618b5bad539701c84dd66b62 100644 (file)
@@ -21,6 +21,7 @@ if !BR2_PACKAGE_BUSYBOX_HIDE_OTHERS
 source "package/gawk/Config.in"
 endif
 source "toolchain/gcc/Config.in.2"
+source "toolchain/uClibc/Config.in.2"
 source "toolchain/ccache/Config.in.2"
 if !BR2_PACKAGE_BUSYBOX_HIDE_OTHERS
 source "package/grep/Config.in"
@@ -185,6 +186,7 @@ source "package/hostap/Config.in"
 source "package/iproute2/Config.in"
 source "package/ipsec-tools/Config.in"
 source "package/iptables/Config.in"
+#source "package/l2tp/Config.in"
 source "package/libcgi/Config.in"
 source "package/libcgicc/Config.in"
 source "package/libpcap/Config.in"
@@ -237,6 +239,7 @@ menuconfig BR2_X_WINDOW_SYSTEM
          Support for X and related packages
 
 if BR2_X_WINDOW_SYSTEM
+#source "package/microwin/Config.in"
 comment "X server"
 source "package/xorg/Config.in"
 source "package/tinyx/Config.in"
@@ -250,7 +253,6 @@ source "package/libgtk2/Config.in"
 source "package/fontconfig/Config.in"
 source "package/freetype/Config.in"
 comment "Window managers"
-source "package/microwin/Config.in"
 source "package/metacity/Config.in"
 comment "X applications"
 source "package/dillo/Config.in"
index 1a2c0f26f5b9b4ef51731bade5993c3772ad0a9f..45ee14a3baa63763a0c30cfaec6e67ddcb20d4ef 100644 (file)
@@ -16,3 +16,5 @@ OPTIMIZE_FOR_CPU=$(ARCH)
 
 # gcc has a bunch of needed stuff....
 include toolchain/gcc/Makefile.in
+
+include toolchain/uClibc/Makefile.in
index c523b970510fa124967b6cf410f657f81732be0b..24b3163076a582cbd2a9b2321a01b73c1a8ceb1d 100644 (file)
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_GCC_TARGET
        bool "native toolchain in the target filesystem"
        default n
+       select BR2_PACKAGE_UCLIBC_TARGET_HEADERS
        help
          If you want the target system to be able to run 
          binutils/gcc and compile native code, say Y here.
diff --git a/toolchain/uClibc/Config.in.2 b/toolchain/uClibc/Config.in.2
new file mode 100644 (file)
index 0000000..90a065e
--- /dev/null
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_UCLIBC_TARGET_HEADERS
+       bool "install uClibc headers in the target filesystem"
+       default n
+       help
+         Install the uClibc headers and kernel-headers in the
+         target filesystem.
diff --git a/toolchain/uClibc/Makefile.in b/toolchain/uClibc/Makefile.in
new file mode 100644 (file)
index 0000000..f83651e
--- /dev/null
@@ -0,0 +1,4 @@
+
+ifeq ($(strip $(BR2_PACKAGE_UCLIBC_TARGET_HEADERS)),y)
+TARGETS+=uclibc_target_headers
+endif
index 8d26a7f74e3113c00352e9362947c3459985bcf9..09ff16b62b02779823e3e8f6708fb19b05369f79 100644 (file)
@@ -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