summaryrefslogtreecommitdiffstats
path: root/make/uclibc.mk
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-04-26 11:45:55 +0000
committerEric Andersen <andersen@codepoet.org>2002-04-26 11:45:55 +0000
commit08782ae7d8812933ad3f932132955ea1c0fb1e52 (patch)
tree1808993dc06e0c9a473c2e77236ce5d31039466d /make/uclibc.mk
parent057adc1c84e0082cdf88da23a32bf2098680ff4e (diff)
downloadbuildroot-novena-08782ae7d8812933ad3f932132955ea1c0fb1e52.tar.gz
buildroot-novena-08782ae7d8812933ad3f932132955ea1c0fb1e52.zip
Major rework
Diffstat (limited to 'make/uclibc.mk')
-rw-r--r--make/uclibc.mk75
1 files changed, 75 insertions, 0 deletions
diff --git a/make/uclibc.mk b/make/uclibc.mk
new file mode 100644
index 000000000..3b3b16de2
--- /dev/null
+++ b/make/uclibc.mk
@@ -0,0 +1,75 @@
+#############################################################
+#
+# uClibc (the C library)
+#
+#############################################################
+
+ifeq ($(USE_UCLIBC_SNAPSHOT),true)
+# Be aware that this changes daily....
+UCLIBC_DIR=$(BUILD_DIR)/uClibc
+UCLIBC_SOURCE=uClibc-snapshot.tar.bz2
+else
+UCLIBC_DIR:=$(BUILD_DIR)/uClibc-0.9.11
+UCLIBC_SOURCE:=uClibc-0.9.11.tar.bz2
+endif
+#UCLIBC_URI:=http://www.uclibc.org/downloads
+UCLIBC_URI:=http://de.busybox.net/downloads/uClibc
+ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true)
+LARGEFILE=true
+else
+LARGEFILE=false
+endif
+ifneq ($(CROSS),)
+CROSSARG:=--cross="$(CROSS)"
+endif
+
+$(DL_DIR)/$(UCLIBC_SOURCE):
+ wget -P $(DL_DIR) --passive-ftp $(UCLIBC_URI)/$(UCLIBC_SOURCE)
+
+uclibc-source: $(DL_DIR)/$(UCLIBC_SOURCE)
+
+$(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE)
+ rm -rf $(UCLIBC_DIR)
+ bzcat $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ touch $(UCLIBC_DIR)/.unpacked
+
+$(UCLIBC_DIR)/.configured: $(UCLIBC_DIR)/.unpacked
+ $(UCLIBC_DIR)/extra/Configs/uClibc_config_fix.pl \
+ --arch=$(ARCH) \
+ $(CROSSARG) --c99_math=true \
+ --devel_prefix=$(STAGING_DIR) \
+ --float=true \
+ --kernel_dir=$(LINUX_DIR) \
+ --large_file=$(LARGEFILE) \
+ --ldso_path="/lib" \
+ --long_long=true \
+ --rpc_support=true \
+ --shadow=true \
+ --shared_support=true \
+ --threads=true \
+ --debug=false \
+ --file=$(UCLIBC_DIR)/extra/Configs/Config.$(ARCH) \
+ > $(UCLIBC_DIR)/Config;
+ perl -i -p -e 's,SYSTEM_DEVEL_PREFIX.*,SYSTEM_DEVEL_PREFIX=$(STAGING_DIR)/usr,g' $(UCLIBC_DIR)/Config
+
+ touch $(UCLIBC_DIR)/.configured
+
+$(UCLIBC_DIR)/lib/libc.a: $(UCLIBC_DIR)/.configured
+ $(MAKE) -C $(UCLIBC_DIR)
+
+$(STAGING_DIR)/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a
+ $(MAKE) -C $(UCLIBC_DIR) install
+
+$(TARGET_DIR)/lib/libc.so.0: $(STAGING_DIR)/lib/libc.a
+ $(MAKE) -C $(UCLIBC_DIR) DEVEL_PREFIX=$(TARGET_DIR) \
+ SYSTEM_DEVEL_PREFIX=$(TARGET_DIR)/usr install_runtime install_utils
+
+uclibc: $(LINUX_KERNEL) $(TARGET_DIR)/lib/libc.so.0
+
+uclibc-clean:
+ rm -f $(TARGET_DIR)/lib/libc.so.0
+ -make -C $(UCLIBC_DIR) clean
+ rm -f $(UCLIBC_DIR)/Config
+
+uclibc-dirclean:
+ rm -rf $(UCLIBC_DIR)