2
1

jpeg.mk 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #############################################################
  2. #
  3. # jpeg (libraries needed by some apps)
  4. #
  5. #############################################################
  6. # Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org>
  7. # Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
  8. #
  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.
  13. #
  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.
  18. #
  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)
  28. $(DL_DIR)/$(JPEG_SOURCE):
  29. $(WGET) -P $(DL_DIR) $(JPEG_SITE)/$(JPEG_SOURCE)
  30. jpeg-source: $(DL_DIR)/$(JPEG_SOURCE)
  31. $(JPEG_DIR)/.unpacked: $(DL_DIR)/$(JPEG_SOURCE)
  32. $(JPEG_CAT) $(DL_DIR)/$(JPEG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
  33. toolchain/patch-kernel.sh $(JPEG_DIR) package/jpeg/ jpeg\*.patch
  34. $(CONFIG_UPDATE) $(JPEG_DIR)
  35. touch $@
  36. $(JPEG_DIR)/.configured: $(JPEG_DIR)/.unpacked
  37. (cd $(JPEG_DIR); rm -rf config.cache; \
  38. $(TARGET_CONFIGURE_OPTS) \
  39. $(TARGET_CONFIGURE_ARGS) \
  40. ./configure \
  41. --target=$(GNU_TARGET_NAME) \
  42. --host=$(GNU_TARGET_NAME) \
  43. --build=$(GNU_HOST_NAME) \
  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 \
  59. )
  60. touch $@
  61. $(JPEG_DIR)/.libs/libjpeg.a: $(JPEG_DIR)/.configured
  62. $(MAKE) -C $(JPEG_DIR) all
  63. touch -c $@
  64. $(STAGING_DIR)/lib/libjpeg.a: $(JPEG_DIR)/.libs/libjpeg.a
  65. $(MAKE) DESTDIR=$(STAGING_DIR) -C $(JPEG_DIR) install-headers install-lib
  66. rm $(STAGING_DIR)/lib/libjpeg.la
  67. touch -c $@
  68. $(TARGET_DIR)/usr/lib/libjpeg.so: $(STAGING_DIR)/lib/libjpeg.a
  69. mkdir -p $(TARGET_DIR)/usr/lib
  70. cp -dpf $(STAGING_DIR)/lib/libjpeg.so* $(TARGET_DIR)/usr/lib/
  71. -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libjpeg.so*
  72. touch -c $@
  73. jpeg: uclibc $(TARGET_DIR)/usr/lib/libjpeg.so
  74. jpeg-clean:
  75. -$(MAKE) -C $(JPEG_DIR) clean
  76. jpeg-dirclean:
  77. rm -rf $(JPEG_DIR)
  78. #############################################################
  79. #
  80. # Toplevel Makefile options
  81. #
  82. #############################################################
  83. ifeq ($(strip $(BR2_PACKAGE_JPEG)),y)
  84. TARGETS+=jpeg
  85. endif