add libao package.
[openwrt.git] / openwrt / package / libelf / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=libelf
6 PKG_VERSION:=0.8.5
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=c1daf069367871350ece779b7de20047
9
10 PKG_SOURCE_URL:=http://www.mr511.de/software/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,LIBELF,libelf,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21 .NOTPARALLEL:
22
23 $(PKG_BUILD_DIR)/.configured:
24 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
25 $(TARGET_CONFIGURE_OPTS) \
26 CFLAGS="$(TARGET_CFLAGS)" \
27 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
28 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
29 mr_cv_target_elf=yes \
30 libelf_64bit=yes \
31 libelf_cv_struct_elf64_ehdr=yes \
32 libelf_cv_type_elf64_addr=no \
33 libelf_cv_struct_elf64_rel=yes \
34 ac_cv_sizeof_long_long=8 \
35 ./configure \
36 --target=$(GNU_TARGET_NAME) \
37 --host=$(GNU_TARGET_NAME) \
38 --build=$(GNU_HOST_NAME) \
39 --program-prefix="" \
40 --program-suffix="" \
41 --prefix=/usr \
42 --exec-prefix=/usr \
43 --bindir=/usr/bin \
44 --datadir=/usr/share \
45 --includedir=/usr/include \
46 --infodir=/usr/share/info \
47 --libdir=/usr/lib \
48 --libexecdir=/usr/lib \
49 --localstatedir=/var \
50 --mandir=/usr/share/man \
51 --sbindir=/usr/sbin \
52 --sysconfdir=/etc \
53 $(DISABLE_LARGEFILE) \
54 $(DISABLE_NLS) \
55 --enable-shared \
56 --enable-static \
57 --enable-elf64=yes \
58 );
59 touch $@
60
61 $(PKG_BUILD_DIR)/.built:
62 rm -rf $(PKG_INSTALL_DIR)
63 mkdir -p $(PKG_INSTALL_DIR)
64 $(MAKE) -C $(PKG_BUILD_DIR) -j1 \
65 CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(ARCH) \
66 instroot="$(PKG_INSTALL_DIR)" \
67 all install
68 touch $@
69
70 $(IPKG_LIBELF):
71 install -d -m0755 $(IDIR_LIBELF)/usr/lib
72 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libelf.so.* $(IDIR_LIBELF)/usr/lib/
73 $(RSTRIP) $(IDIR_LIBELF)
74 $(IPKG_BUILD) $(IDIR_LIBELF) $(PACKAGE_DIR)
75
76 $(STAGING_DIR)/usr/lib/libelf.so: $(PKG_BUILD_DIR)/.built
77 mkdir -p $(STAGING_DIR)/usr/include
78 cp -fpR $(PKG_INSTALL_DIR)/usr/include/libelf* $(STAGING_DIR)/usr/include/
79 mkdir -p $(STAGING_DIR)/usr/lib
80 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libelf.{a,so*} $(STAGING_DIR)/usr/lib/
81
82 install-dev: $(STAGING_DIR)/usr/lib/libelf.so
83
84 uninstall-dev:
85 rm -rf $(STAGING_DIR)/usr/include/libelf*
86 rm -rf $(STAGING_DIR)/usr/lib/libelf.{a,so*}
87
88 compile: install-dev
89 clean: uninstall-dev
This page took 0.041498 seconds and 5 git commands to generate.