summaryrefslogtreecommitdiffstats
path: root/obsolete-buildroot/make/libfloat.mk
diff options
context:
space:
mode:
authormbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2004-05-25 04:32:27 +0000
committermbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2004-05-25 04:32:27 +0000
commit3ac1acb9ea70080aaaf49ae211835f057e60eefa (patch)
treea2e08d2be3224409a033d25af8861d9853e72de7 /obsolete-buildroot/make/libfloat.mk
parent1eb1b593980fdc06ab92f8e354129b0aadc4f1b0 (diff)
Initial revision
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'obsolete-buildroot/make/libfloat.mk')
-rw-r--r--obsolete-buildroot/make/libfloat.mk55
1 files changed, 55 insertions, 0 deletions
diff --git a/obsolete-buildroot/make/libfloat.mk b/obsolete-buildroot/make/libfloat.mk
new file mode 100644
index 000000000..dffef3de5
--- /dev/null
+++ b/obsolete-buildroot/make/libfloat.mk
@@ -0,0 +1,55 @@
+#############################################################
+#
+# libfloat
+#
+#############################################################
+LIBFLOAT_SOURCE:=libfloat_990616.orig.tar.gz
+LIBFLOAT_PATCH:=libfloat_990616-3.diff.gz
+LIBFLOAT_SITE:=http://ftp.debian.org/debian/pool/main/libf/libfloat
+LIBFLOAT_CAT:=zcat
+LIBFLOAT_DIR:=$(BUILD_DIR)/libfloat
+
+LIBFLOAT_TARGET=
+ifeq ($(strip $(SOFT_FLOAT)),true)
+ifeq ("$(strip $(ARCH))","arm")
+LIBFLOAT_TARGET+=$(STAGING_DIR)/lib/libfloat.so
+endif
+endif
+
+$(DL_DIR)/$(LIBFLOAT_SOURCE):
+ $(WGET) -P $(DL_DIR) $(LIBFLOAT_SITE)/$(LIBFLOAT_SOURCE)
+
+$(DL_DIR)/$(LIBFLOAT_PATCH):
+ $(WGET) -P $(DL_DIR) $(LIBFLOAT_SITE)/$(LIBFLOAT_PATCH)
+
+libfloat-source: $(DL_DIR)/$(LIBFLOAT_SOURCE) $(DL_DIR)/$(LIBFLOAT_PATCH)
+
+$(LIBFLOAT_DIR)/.unpacked: $(DL_DIR)/$(LIBFLOAT_SOURCE) $(DL_DIR)/$(LIBFLOAT_PATCH)
+ $(LIBFLOAT_CAT) $(DL_DIR)/$(LIBFLOAT_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ # Remove the binary files distributed with the the package.
+ make -C $(LIBFLOAT_DIR) clean
+ $(SOURCE_DIR)/patch-kernel.sh $(LIBFLOAT_DIR) $(DL_DIR) $(LIBFLOAT_PATCH)
+ $(SOURCE_DIR)/patch-kernel.sh $(LIBFLOAT_DIR) $(SOURCE_DIR) libfloat.patch
+ touch $(LIBFLOAT_DIR)/.unpacked
+
+$(LIBFLOAT_DIR)/libfloat.so.1: $(LIBFLOAT_DIR)/.unpacked $(TARGET_CC)
+ $(MAKE) CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld -C $(LIBFLOAT_DIR)
+
+$(STAGING_DIR)/lib/libfloat.so: $(LIBFLOAT_DIR)/libfloat.so.1
+ cp -a $(LIBFLOAT_DIR)/libfloat.a $(STAGING_DIR)/lib/libfloat.a
+ cp -a $(LIBFLOAT_DIR)/libfloat.so.1 $(STAGING_DIR)/lib/libfloat.so.1
+ (cd $(STAGING_DIR)/lib ; ln -sf libfloat.so.1 libfloat.so)
+ cp -a $(LIBFLOAT_DIR)/libfloat.a $(TARGET_DIR)/usr/lib/libfloat.a
+ cp -a $(LIBFLOAT_DIR)/libfloat.so.1 $(TARGET_DIR)/lib/libfloat.so.1
+ $(STRIP) $(TARGET_DIR)/lib/libfloat.so.1 > /dev/null 2>&1
+ (cd $(TARGET_DIR)/lib ; ln -sf libfloat.so.1 libfloat.so)
+ (cd $(TARGET_DIR)/usr/lib ; ln -sf /lib/libfloat.so libfloat.so)
+
+libfloat: $(STAGING_DIR)/lib/libfloat.so
+
+libfloat-clean:
+ -$(MAKE) -C $(LIBFLOAT_DIR) clean
+
+libfloat-dirclean:
+ rm -rf $(LIBFLOAT_DIR)
+