42f2c86b84cc838cacb12f188b84a68400bbde0f
[openwrt/svn-archive/archive.git] / libs / libaio / Makefile
1 #
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libaio
11 PKG_VERSION:=0.3.106
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
15 PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/liba/libaio/
16 PKG_MD5SUM:=9480e31cce6506091080d59211089bd4
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/libaio
21 SECTION:=libs
22 CATEGORY:=Libraries
23 DEPENDS:=@LINUX_2_6
24 TITLE:=Linux kernel AIO interface access library
25 URL:=http://lse.sourceforge.net/io/aio.html
26 endef
27
28 define Build/Configure
29 endef
30
31 LIBAIO_CFLAGS:=-nostdlib -nostartfiles -I. $(TARGET_CFLAGS) $(TARGET_CPPFLAGS)
32 LIBAIO_SOVER:=1.0.1
33
34 TARGET_CFLAGS += $(FPIC)
35
36 define Build/Compile
37 $(MAKE) -C $(PKG_BUILD_DIR) \
38 $(TARGET_CONFIGURE_OPTS) \
39 ARCH="$(ARCH)" \
40 CC="$(TARGET_CROSS)gcc" \
41 LD="$(TARGET_CROSS)ld" \
42 CFLAGS="$(LIBAIO_CFLAGS)" \
43 all
44 endef
45
46 define Build/InstallDev
47 mkdir -p $(1)/usr/include
48 $(CP) $(PKG_BUILD_DIR)/src/libaio.h $(1)/usr/include/
49 mkdir -p $(1)/usr/lib
50 $(CP) $(PKG_BUILD_DIR)/src/libaio.{a,so*} $(1)/usr/lib/
51 ln -sf libaio.so.$(LIBAIO_SOVER) $(1)/usr/lib/libaio.so
52 ln -sf libaio.so.$(LIBAIO_SOVER) $(1)/usr/lib/libaio.so.1
53 endef
54
55 define Package/libaio/install
56 $(INSTALL_DIR) $(1)/usr/lib
57 $(CP) $(PKG_BUILD_DIR)/src/libaio.so.* $(1)/usr/lib/
58 ln -sf libaio.so.$(LIBAIO_SOVER) $(1)/usr/lib/libaio.so
59 ln -sf libaio.so.$(LIBAIO_SOVER) $(1)/usr/lib/libaio.so.1
60 endef
61
62 $(eval $(call BuildPackage,libaio))