source: freewrt/package/libgd/Makefile@ d419478

freewrt_1_0 freewrt_2_0
Last change on this file since d419478 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.4 KB
Line 
1# $Id: Makefile 3121 2006-02-03 08:31:25Z nico $
2
3include $(TOPDIR)/rules.mk
4
5PKG_NAME:=gd
6PKG_VERSION:=2.0.33
7PKG_RELEASE:=2
8PKG_MD5SUM:=be0a6d326cd8567e736fbc75df0a5c45
9
10PKG_SOURCE_URL:=http://www.boutell.com/gd/http
11PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12
13
14include $(TOPDIR)/package/rules.mk
15
16$(eval $(call PKG_template,LIBGD,libgd,$(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 -I$(STAGING_DIR)/include" \
23 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
24 LIBPNG12_CONFIG="$(STAGING_DIR)/usr/bin/libpng12-config" \
25 ./configure \
26 --target=$(GNU_TARGET_NAME) \
27 --host=$(GNU_TARGET_NAME) \
28 --build=$(GNU_HOST_NAME) \
29 --program-prefix="" \
30 --program-suffix="" \
31 --prefix=/usr \
32 --exec-prefix=/usr \
33 --bindir=/usr/bin \
34 --datadir=/usr/share \
35 --includedir=/usr/include \
36 --infodir=/usr/share/info \
37 --libdir=/usr/lib \
38 --libexecdir=/usr/lib \
39 --localstatedir=/var \
40 --mandir=/usr/share/man \
41 --sbindir=/usr/sbin \
42 --sysconfdir=/etc \
43 --enable-largefile \
44 --disable-nls \
45 --enable-shared \
46 --enable-static \
47 --disable-rpath \
48 --with-gnu-ld \
49 --without-x \
50 --without-freetype \
51 --with-jpeg=$(STAGING_DIR)/usr \
52 --with-png=$(STAGING_DIR)/usr \
53 --without-xpm \
54 )
55 touch $@
56
57$(WRKBUILD)/.built:
58 rm -rf $(WRKINST)
59 mkdir -p $(WRKINST)
60 $(MAKE) -C $(WRKBUILD) \
61 DESTDIR="$(WRKINST)" \
62 all install
63 touch $@
64
65$(IPKG_LIBGD):
66 install -d -m0755 $(IDIR_LIBGD)/usr/lib
67 $(CP) $(WRKINST)/usr/lib/libgd.so.* $(IDIR_LIBGD)/usr/lib/
68 $(RSTRIP) $(IDIR_LIBGD)
69 $(IPKG_BUILD) $(IDIR_LIBGD) $(PACKAGE_DIR)
70
71$(STAGING_DIR)/usr/lib/libgd.so: $(WRKBUILD)/.built
72 mkdir -p $(STAGING_DIR)/usr/bin
73 $(CP) $(WRKINST)/usr/bin/gdlib-config $(STAGING_DIR)/usr/bin/
74 mkdir -p $(STAGING_DIR)/usr/include
75 $(CP) $(WRKINST)/usr/include/entities.h $(STAGING_DIR)/usr/include/
76 $(CP) $(WRKINST)/usr/include/gd*.h $(STAGING_DIR)/usr/include/
77 mkdir -p $(STAGING_DIR)/usr/lib
78 $(CP) $(WRKINST)/usr/lib/libgd.{a,so*} $(STAGING_DIR)/usr/lib/
79 touch $@
80
81install-dev: $(STAGING_DIR)/usr/lib/libgd.so
82
83uninstall-dev:
84 rm -rf \
85 $(STAGING_DIR)/usr/bin/gdlib-config \
86 $(STAGING_DIR)/usr/include/entities.h \
87 $(STAGING_DIR)/usr/include/gd*.h \
88 $(STAGING_DIR)/usr/lib/libgd.{a,so*} \
89
90compile-targets: install-dev
91clean-targets: uninstall-dev
92
Note: See TracBrowser for help on using the repository browser.