jpeg.mk 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. $(call DOWNLOAD,$(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=/usr/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)/usr/lib/libjpeg.a: $(JPEG_DIR)/.libs/libjpeg.a
  65. $(MAKE) DESTDIR=$(STAGING_DIR) -C $(JPEG_DIR) install
  66. cp -f $(JPEG_DIR)/libjpeg.la $(STAGING_DIR)/usr/lib
  67. $(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libjpeg.la
  68. touch -c $@
  69. $(TARGET_DIR)/usr/lib/libjpeg.so: $(STAGING_DIR)/usr/lib/libjpeg.a
  70. mkdir -p $(TARGET_DIR)/usr/lib
  71. cp -dpf $(STAGING_DIR)/usr/lib/libjpeg.so* $(TARGET_DIR)/usr/lib/
  72. -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libjpeg.so*
  73. touch -c $@
  74. jpeg: uclibc $(TARGET_DIR)/usr/lib/libjpeg.so
  75. jpeg-clean:
  76. -$(MAKE) -C $(JPEG_DIR) clean
  77. jpeg-dirclean:
  78. rm -rf $(JPEG_DIR)
  79. #############################################################
  80. #
  81. # Toplevel Makefile options
  82. #
  83. #############################################################
  84. ifeq ($(BR2_PACKAGE_JPEG),y)
  85. TARGETS+=jpeg
  86. endif