source: freewrt/package/libelf/Makefile@ c04ece1

freewrt_1_0 freewrt_2_0
Last change on this file since c04ece1 was d419478, checked in by Thorsten Glaser <tg@…>, 19 years ago
  • whitespace cleanup, while here
  • move WRKDIR and DISTFILES definition into PKG_template
  • define WRKDIR via parent BUILD_DIR instead of going up from WRKSRC
  • use a sub-directory as WRKDIR, like BSD
  • rename PKG_BUILD_DIR into WRKBUILD
  • define WRKBUILD relative via WRKDIR
  • rename PKG_INSTALL_DIR into WRKINST
  • fix a few dependencies
  • make use of common cases in the definition of WRKBUILD and WRKINST, removing many redundant lines
  • use WRKDIR instead of BUILD_DIR in places where the latter was used previously
  • while here, remove PKG_CAT stuff

this only affects packages, for now

git-svn-id: svn://www.freewrt.org/trunk/freewrt@303 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 2.2 KB
Line 
1# $Id: Makefile 3112 2006-02-01 23:53:19Z mbm $
2
3include $(TOPDIR)/rules.mk
4
5PKG_NAME:=libelf
6PKG_VERSION:=0.8.5
7PKG_RELEASE:=1
8PKG_MD5SUM:=c1daf069367871350ece779b7de20047
9
10PKG_SOURCE_URL:=http://www.mr511.de/software/
11PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12
13
14include $(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
77install-dev: $(STAGING_DIR)/usr/lib/libelf.so
78
79uninstall-dev:
80 rm -rf $(STAGING_DIR)/usr/include/libelf*
81 rm -rf $(STAGING_DIR)/usr/lib/libelf.{a,so*}
82
83compile-targets: install-dev
84clean-targets: uninstall-dev
Note: See TracBrowser for help on using the repository browser.