summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Samuelsson <ulf.samuelsson@atmel.com>2007-07-28 15:37:11 +0000
committerUlf Samuelsson <ulf.samuelsson@atmel.com>2007-07-28 15:37:11 +0000
commita1025ef45ca1f7e1ad0b351a8ee5e1974d8c5381 (patch)
treeb01495f939d7c134a9e1ed30120dc3d7ca82c20d
parent87e9deb12909a1a0d9d192d264d690cbcbe03878 (diff)
Add libaio package
-rw-r--r--package/Config.in1
-rw-r--r--package/libaio/Config.in5
-rw-r--r--package/libaio/libaio.mk50
3 files changed, 56 insertions, 0 deletions
diff --git a/package/Config.in b/package/Config.in
index befed805c..588e9a96e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -214,6 +214,7 @@ source "package/hotplug/Config.in"
endif
source "package/hwdata/Config.in"
source "package/iostat/Config.in"
+source "package/libaio/Config.in"
source "package/libraw1394/Config.in"
source "package/libusb/Config.in"
source "package/lvm2/Config.in"
diff --git a/package/libaio/Config.in b/package/libaio/Config.in
new file mode 100644
index 000000000..d55612a22
--- /dev/null
+++ b/package/libaio/Config.in
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_LIBAIO
+ bool "libaio"
+ default n
+ help
+ Library for doing asynchronous I/O
diff --git a/package/libaio/libaio.mk b/package/libaio/libaio.mk
new file mode 100644
index 000000000..49bdd8643
--- /dev/null
+++ b/package/libaio/libaio.mk
@@ -0,0 +1,50 @@
+#############################################################
+#
+# libaio
+#
+#############################################################
+LIBAIO_VERSION=0.3.106-avr32
+LIBAIO_SOURCE=libaio-$(LIBAIO_VERSION).tar.bz2
+LIBAIO_SITE=http://avr32linux.org/twiki/pub/Main/LibAio/
+LIBAIO_DIR=$(BUILD_DIR)/libaio-$(LIBAIO_VERSION)
+LIBAIO_SOVER=1.0.1
+
+LIBAIO_ARCH:=$(ARCH)
+LIBAIO_MAKEOPTS:= $(TARGET_CONFIGURE_OPTS) CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS) -nostdlib -nostartfiles -I. -fPIC" LDFLAGS="$(TARGET_LDFLAGS)"
+
+$(DL_DIR)/$(LIBAIO_SOURCE):
+ $(WGET) -P $(DL_DIR) $(LIBAIO_SITE)/$(LIBAIO_SOURCE)
+
+$(LIBAIO_DIR)/.unpacked: $(DL_DIR)/$(LIBAIO_SOURCE)
+ $(BZCAT) $(DL_DIR)/$(LIBAIO_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(LIBAIO_DIR) package/libaio libaio\*.patch
+ touch $@
+
+$(LIBAIO_DIR)/src/libaio.so.$(LIBAIO_SOVER): $(LIBAIO_DIR)/.unpacked
+ $(MAKE) -C $(LIBAIO_DIR) $(LIBAIO_MAKEOPTS)
+
+$(STAGING_DIR)/usr/lib/libaio.so: $(LIBAIO_DIR)/src/libaio.so.$(LIBAIO_SOVER)
+ $(MAKE) -C $(LIBAIO_DIR) $(LIBAIO_MAKEOPTS) prefix=$(STAGING_DIR)/usr install
+
+$(TARGET_DIR)/usr/lib/libaio.so: $(STAGING_DIR)/usr/lib/libaio.so
+ cp -dpf $(STAGING_DIR)/usr/lib/libaio.so* $(TARGET_DIR)/usr/lib/
+ -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libaio.so
+
+libaio: uclibc $(TARGET_DIR)/usr/lib/libaio.so
+
+libaio-source: $(DL_DIR)/$(LIBAIO_SOURCE)
+
+libaio-clean:
+ -$(MAKE) -C $(LIBAIO_DIR) $(LIBAIO_MAKEOPTS) clean
+
+libaio-dirclean:
+ rm -rf $(LIBAIO_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_LIBAIO)),y)
+TARGETS+=libaio
+endif