Tcl build fix
[gumsense-br.git] / package / jpeg / jpeg.mk
blobc980f700b42423e76f31511140520b99a500c8f6
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_DIR=$(BUILD_DIR)/jpeg-6b
24 JPEG_SITE:=ftp://ftp.uu.net/graphics/jpeg/
25 JPEG_SOURCE=jpegsrc.v6b.tar.gz
26 JPEG_CAT:=zcat
28 $(DL_DIR)/$(JPEG_SOURCE):
29 $(WGET) -P $(DL_DIR) $(JPEG_SITE)/$(JPEG_SOURCE)
31 jpeg-source: $(DL_DIR)/$(JPEG_SOURCE)
33 $(JPEG_DIR)/.unpacked: $(DL_DIR)/$(JPEG_SOURCE)
34 $(JPEG_CAT) $(DL_DIR)/$(JPEG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
35 toolchain/patch-kernel.sh $(JPEG_DIR) package/jpeg/ jpeg\*.patch
36 $(CONFIG_UPDATE) $(JPEG_DIR)
37 touch $(JPEG_DIR)/.unpacked
39 $(JPEG_DIR)/.configured: $(JPEG_DIR)/.unpacked
40 (cd $(JPEG_DIR); rm -rf config.cache; \
41 $(TARGET_CONFIGURE_OPTS) \
42 ./configure \
43 --target=$(GNU_TARGET_NAME) \
44 --host=$(GNU_TARGET_NAME) \
45 --build=$(GNU_HOST_NAME) \
46 --prefix=$(STAGING_DIR) \
47 --enable-shared \
48 --enable-static \
50 touch $(JPEG_DIR)/.configured
52 $(JPEG_DIR)/.libs/libjpeg.a: $(JPEG_DIR)/.configured
53 $(MAKE) -C $(JPEG_DIR) all
54 touch -c $(JPEG_DIR)/.libs/libjpeg.a
56 $(STAGING_DIR)/lib/libjpeg.a: $(JPEG_DIR)/.libs/libjpeg.a
57 $(MAKE) -C $(JPEG_DIR) install-headers install-lib
58 rm $(STAGING_DIR)/lib/libjpeg.la
59 touch -c $(STAGING_DIR)/lib/libjpeg.a
61 $(TARGET_DIR)/usr/lib/libjpeg.a: $(STAGING_DIR)/lib/libjpeg.a
62 cp -dpf $(STAGING_DIR)/lib/libjpeg* $(TARGET_DIR)/usr/lib/
63 -$(STRIP) $(TARGET_DIR)/usr/lib/libjpeg.so*
64 touch -c $(TARGET_DIR)/usr/lib/libjpeg.a
66 jpeg: uclibc $(TARGET_DIR)/usr/lib/libjpeg.a
68 jpeg-clean:
69 -$(MAKE) -C $(JPEG_DIR) clean
71 jpeg-dirclean:
72 rm -rf $(JPEG_DIR)
74 #############################################################
76 # Toplevel Makefile options
78 #############################################################
79 ifeq ($(strip $(BR2_PACKAGE_JPEG)),y)
80 TARGETS+=jpeg
81 endif