| 1 | # $Id: Makefile 3112 2006-02-01 23:53:19Z mbm $
|
|---|
| 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 |
|
|---|
| 13 |
|
|---|
| 14 | include $(TOPDIR)/package/rules.mk
|
|---|
| 15 |
|
|---|
| 16 | $(eval $(call PKG_template,LIBELF,libelf,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 17 |
|
|---|
| 18 | $(WRKBUILD)/.configured:
|
|---|
| 19 | (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
|
|---|
| 20 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 21 | CFLAGS="$(TARGET_CFLAGS)" \
|
|---|
| 22 | CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
|
|---|
| 23 | LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
|
|---|
| 24 | mr_cv_target_elf=yes \
|
|---|
| 25 | libelf_64bit=yes \
|
|---|
| 26 | libelf_cv_struct_elf64_ehdr=yes \
|
|---|
| 27 | libelf_cv_type_elf64_addr=no \
|
|---|
| 28 | libelf_cv_struct_elf64_rel=yes \
|
|---|
| 29 | ac_cv_sizeof_long_long=8 \
|
|---|
| 30 | ./configure \
|
|---|
| 31 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 32 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 33 | --build=$(GNU_HOST_NAME) \
|
|---|
| 34 | --program-prefix="" \
|
|---|
| 35 | --program-suffix="" \
|
|---|
| 36 | --prefix=/usr \
|
|---|
| 37 | --exec-prefix=/usr \
|
|---|
| 38 | --bindir=/usr/bin \
|
|---|
| 39 | --datadir=/usr/share \
|
|---|
| 40 | --includedir=/usr/include \
|
|---|
| 41 | --infodir=/usr/share/info \
|
|---|
| 42 | --libdir=/usr/lib \
|
|---|
| 43 | --libexecdir=/usr/lib \
|
|---|
| 44 | --localstatedir=/var \
|
|---|
| 45 | --mandir=/usr/share/man \
|
|---|
| 46 | --sbindir=/usr/sbin \
|
|---|
| 47 | --sysconfdir=/etc \
|
|---|
| 48 | --enable-largefile \
|
|---|
| 49 | --disable-nls \
|
|---|
| 50 | --enable-shared \
|
|---|
| 51 | --enable-static \
|
|---|
| 52 | --enable-elf64=yes \
|
|---|
| 53 | );
|
|---|
| 54 | touch $@
|
|---|
| 55 |
|
|---|
| 56 | $(WRKBUILD)/.built:
|
|---|
| 57 | rm -rf $(WRKINST)
|
|---|
| 58 | mkdir -p $(WRKINST)
|
|---|
| 59 | $(MAKE) -C $(WRKBUILD) -j1 \
|
|---|
| 60 | CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(ARCH) \
|
|---|
| 61 | instroot="$(WRKINST)" \
|
|---|
| 62 | all install
|
|---|
| 63 | touch $@
|
|---|
| 64 |
|
|---|
| 65 | $(IPKG_LIBELF):
|
|---|
| 66 | install -d -m0755 $(IDIR_LIBELF)/usr/lib
|
|---|
| 67 | $(CP) $(WRKINST)/usr/lib/libelf.so.* $(IDIR_LIBELF)/usr/lib/
|
|---|
| 68 | $(RSTRIP) $(IDIR_LIBELF)
|
|---|
| 69 | $(IPKG_BUILD) $(IDIR_LIBELF) $(PACKAGE_DIR)
|
|---|
| 70 |
|
|---|
| 71 | $(STAGING_DIR)/usr/lib/libelf.so: $(WRKBUILD)/.built
|
|---|
| 72 | mkdir -p $(STAGING_DIR)/usr/include
|
|---|
| 73 | $(CP) $(WRKINST)/usr/include/libelf* $(STAGING_DIR)/usr/include/
|
|---|
| 74 | mkdir -p $(STAGING_DIR)/usr/lib
|
|---|
| 75 | $(CP) $(WRKINST)/usr/lib/libelf.{a,so*} $(STAGING_DIR)/usr/lib/
|
|---|
| 76 |
|
|---|
| 77 | install-dev: $(STAGING_DIR)/usr/lib/libelf.so
|
|---|
| 78 |
|
|---|
| 79 | uninstall-dev:
|
|---|
| 80 | rm -rf $(STAGING_DIR)/usr/include/libelf*
|
|---|
| 81 | rm -rf $(STAGING_DIR)/usr/lib/libelf.{a,so*}
|
|---|
| 82 |
|
|---|
| 83 | compile-targets: install-dev
|
|---|
| 84 | clean-targets: uninstall-dev
|
|---|