bump version
[buildroot.git] / package / jpeg / jpeg.mk
blob4891057dd68c44598eac586e5ae5dbef3b3a1587
1 #############################################################
3 # jpeg (libraries needed by some apps)
5 #############################################################
6 # Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org>
7 # Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU Library General Public License as
11 # published by the Free Software Foundation; either version 2 of the
12 # License, or (at your option) any later version.
14 # This program is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # Library General Public License for more details.
19 # You should have received a copy of the GNU Library General Public
20 # License along with this program; if not, write to the Free Software
21 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 # USA
23 JPEG_VERSION:=6b
24 JPEG_DIR=$(BUILD_DIR)/jpeg-$(JPEG_VERSION)
25 JPEG_SITE:=ftp://ftp.uu.net/graphics/jpeg/
26 JPEG_SOURCE=jpegsrc.v$(JPEG_VERSION).tar.gz
27 JPEG_CAT:=$(ZCAT)
29 $(DL_DIR)/$(JPEG_SOURCE):
30 $(WGET) -P $(DL_DIR) $(JPEG_SITE)/$(JPEG_SOURCE)
32 jpeg-source: $(DL_DIR)/$(JPEG_SOURCE)
34 $(JPEG_DIR)/.unpacked: $(DL_DIR)/$(JPEG_SOURCE)
35 $(JPEG_CAT) $(DL_DIR)/$(JPEG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
36 toolchain/patch-kernel.sh $(JPEG_DIR) package/jpeg/ jpeg\*.patch
37 $(CONFIG_UPDATE) $(@D)
38 touch $@
40 $(JPEG_DIR)/.configured: $(JPEG_DIR)/.unpacked
41 (cd $(JPEG_DIR); rm -rf config.cache; \
42 $(AUTO_CONFIGURE_TARGET) \
43 --prefix=/usr \
44 --exec-prefix=/usr \
45 --bindir=/usr/bin \
46 --sbindir=/usr/sbin \
47 --libdir=/lib \
48 --libexecdir=/usr/lib \
49 --sysconfdir=/etc \
50 --datadir=/usr/share \
51 --localstatedir=/var \
52 --includedir=/usr/include \
53 --mandir=/usr/share/man \
54 --infodir=/usr/share/info \
55 --enable-shared \
56 --enable-static \
57 --without-x \
59 touch $@
61 $(JPEG_DIR)/.libs/libjpeg.a: $(JPEG_DIR)/.configured
62 $(MAKE) -C $(JPEG_DIR) all
63 touch -c $@
65 $(STAGING_DIR)/lib/libjpeg.a: $(JPEG_DIR)/.libs/libjpeg.a
66 $(MAKE) DESTDIR=$(STAGING_DIR) -C $(JPEG_DIR) install-headers install-lib
67 rm $(STAGING_DIR)/lib/libjpeg.la
68 touch -c $@
70 $(TARGET_DIR)/usr/lib/libjpeg.so: $(STAGING_DIR)/lib/libjpeg.a
71 mkdir -p $(TARGET_DIR)/usr/lib
72 cp -dpf $(STAGING_DIR)/lib/libjpeg.so* $(TARGET_DIR)/usr/lib/
73 -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libjpeg.so*
74 touch -c $@
76 jpeg: uclibc $(TARGET_DIR)/usr/lib/libjpeg.so
78 jpeg-clean:
79 -$(MAKE) -C $(JPEG_DIR) clean
80 rm -f $(TARGET_DIR)/usr/lib/libjpeg.so* \
81 $(wildcard $(STAGING_DIR)/lib*/libjpeg.so*) \
82 $(wildcard $(STAGING_DIR)/lib*/libjpeg.a*)
84 jpeg-dirclean:
85 rm -rf $(JPEG_DIR)
87 #############################################################
89 # Toplevel Makefile options
91 #############################################################
92 ifeq ($(BR2_PACKAGE_JPEG),y)
93 TARGETS+=jpeg
94 endif