strip grub binary
[buildroot.git] / package / jpeg / jpeg.mk
bloba1cb21c51620fae94042de757fdcd13df675f3f3
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_SITE:=http://www.ijg.org/files/
27 JPEG_SOURCE=jpegsrc.v$(JPEG_VERSION).tar.gz
28 JPEG_CAT:=$(ZCAT)
30 $(DL_DIR)/$(JPEG_SOURCE):
31 $(WGET) -P $(DL_DIR) $(JPEG_SITE)/$(JPEG_SOURCE)
33 jpeg-source: $(DL_DIR)/$(JPEG_SOURCE)
35 $(JPEG_DIR)/.unpacked: $(DL_DIR)/$(JPEG_SOURCE)
36 $(JPEG_CAT) $(DL_DIR)/$(JPEG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
37 toolchain/patch-kernel.sh $(JPEG_DIR) package/jpeg/ jpeg\*.patch
38 $(CONFIG_UPDATE) $(@D)
39 touch $@
41 $(JPEG_DIR)/.configured: $(JPEG_DIR)/.unpacked
42 (cd $(JPEG_DIR); rm -rf config.cache; \
43 $(AUTO_CONFIGURE_TARGET) \
44 --prefix=/usr \
45 --exec-prefix=/usr \
46 --bindir=/usr/bin \
47 --sbindir=/usr/sbin \
48 --libdir=/lib \
49 --libexecdir=/usr/lib \
50 --sysconfdir=/etc \
51 --datadir=/usr/share \
52 --localstatedir=/var \
53 --includedir=/usr/include \
54 --mandir=/usr/share/man \
55 --infodir=/usr/share/info \
56 --enable-shared \
57 --enable-static \
58 --without-x \
60 touch $@
62 $(JPEG_DIR)/.libs/libjpeg.a: $(JPEG_DIR)/.configured
63 $(MAKE) -C $(JPEG_DIR) all
64 touch -c $@
66 $(STAGING_DIR)/lib/libjpeg.a: $(JPEG_DIR)/.libs/libjpeg.a
67 $(MAKE) DESTDIR=$(STAGING_DIR) -C $(JPEG_DIR) install-headers install-lib
68 rm $(STAGING_DIR)/lib/libjpeg.la
69 touch -c $@
71 $(TARGET_DIR)/usr/lib/libjpeg.so: $(STAGING_DIR)/lib/libjpeg.a
72 mkdir -p $(TARGET_DIR)/usr/lib
73 cp -dpf $(STAGING_DIR)/lib/libjpeg.so* $(TARGET_DIR)/usr/lib/
74 -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libjpeg.so*
75 touch -c $@
77 jpeg: $(TARGET_DIR)/usr/lib/libjpeg.so
79 jpeg-clean:
80 -$(MAKE) -C $(JPEG_DIR) clean
81 rm -f $(TARGET_DIR)/usr/lib/libjpeg.so* \
82 $(wildcard $(STAGING_DIR)/lib*/libjpeg.so*) \
83 $(wildcard $(STAGING_DIR)/lib*/libjpeg.a*)
85 jpeg-dirclean:
86 rm -rf $(JPEG_DIR)
88 #############################################################
90 # Toplevel Makefile options
92 #############################################################
93 ifeq ($(BR2_PACKAGE_JPEG),y)
94 TARGETS+=jpeg
95 endif