small fix for make targets from Martin Ley
[openwrt.git] / openwrt / package / jpeg / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=jpeg
6 PKG_VERSION:=6b
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=dbd5f3b47ed13132f04c685d608a7547
9
10 PKG_SOURCE_URL:=http://www.ijg.org/files/ \
11 ftp://ftp.uu.net/graphics/jpeg/
12 PKG_SOURCE:=$(PKG_NAME)src.v$(PKG_VERSION).tar.gz
13 PKG_CAT:=zcat
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
17
18 include $(TOPDIR)/package/rules.mk
19
20 $(eval $(call PKG_template,LIBJPEG,libjpeg,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
21
22 $(PKG_BUILD_DIR)/.configured:
23 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
24 $(TARGET_CONFIGURE_OPTS) \
25 CFLAGS="$(TARGET_CFLAGS)" \
26 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
27 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
28 ./configure \
29 --target=$(GNU_TARGET_NAME) \
30 --host=$(GNU_TARGET_NAME) \
31 --build=$(GNU_HOST_NAME) \
32 --program-prefix="" \
33 --program-suffix="" \
34 --prefix=/usr \
35 --exec-prefix=/usr \
36 --bindir=/usr/bin \
37 --datadir=/usr/share \
38 --includedir=/usr/include \
39 --infodir=/usr/share/info \
40 --libdir=/usr/lib \
41 --libexecdir=/usr/lib \
42 --localstatedir=/var \
43 --mandir=/usr/share/man \
44 --sbindir=/usr/sbin \
45 --sysconfdir=/etc \
46 $(DISABLE_LARGEFILE) \
47 $(DISABLE_NLS) \
48 --enable-shared \
49 --enable-static \
50 )
51 touch $@
52
53 $(PKG_BUILD_DIR)/.built:
54 rm -rf $(PKG_INSTALL_DIR)
55 mkdir -p $(PKG_INSTALL_DIR)/usr/{include,lib}
56 $(MAKE) -C $(PKG_BUILD_DIR) \
57 all
58 $(MAKE) -C $(PKG_BUILD_DIR) \
59 prefix="$(PKG_INSTALL_DIR)/usr" \
60 exec_prefix="$(PKG_INSTALL_DIR)/usr" \
61 install-headers install-lib
62 touch $@
63
64 $(IPKG_LIBJPEG):
65 install -d -m0755 $(IDIR_LIBJPEG)/usr/lib
66 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libjpeg.so.* $(IDIR_LIBJPEG)/usr/lib/
67 $(RSTRIP) $(IDIR_LIBJPEG)
68 $(IPKG_BUILD) $(IDIR_LIBJPEG) $(PACKAGE_DIR)
69
70 $(STAGING_DIR)/usr/lib/libjpeg.so: $(PKG_BUILD_DIR)/.built
71 mkdir -p $(STAGING_DIR)/usr/include
72 cp -fpR $(PKG_INSTALL_DIR)/usr/include/jpeglib.h $(STAGING_DIR)/usr/include/
73 cp -fpR $(PKG_INSTALL_DIR)/usr/include/j{config,error,morecfg}.h $(STAGING_DIR)/usr/include/
74 mkdir -p $(STAGING_DIR)/usr/lib
75 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libjpeg.{a,so*} $(STAGING_DIR)/usr/lib/
76
77 install-dev: $(STAGING_DIR)/usr/lib/libjpeg.so
78
79 uninstall-dev:
80 rm -rf \
81 $(STAGING_DIR)/usr/include/jpeglib.h \
82 $(STAGING_DIR)/usr/include/j{config,error,morecfg}.h \
83 $(STAGING_DIR)/usr/lib/libjpeg.{a,so*} \
84
85 compile-targets: install-dev
86 clean-targets: uninstall-dev
87
This page took 0.04377 seconds and 5 git commands to generate.