jpeg.mk 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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_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
  27. $(DL_DIR)/$(JPEG_SOURCE):
  28. $(WGET) -P $(DL_DIR) $(JPEG_SITE)/$(JPEG_SOURCE)
  29. jpeg-source: $(DL_DIR)/$(JPEG_SOURCE)
  30. $(JPEG_DIR)/.unpacked: $(DL_DIR)/$(JPEG_SOURCE)
  31. $(JPEG_CAT) $(DL_DIR)/$(JPEG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
  32. # The config.guess distributed with the package is not able
  33. # to handle cross compilation. Use the one from binutils.
  34. cp $(BINUTILS_DIR)/config.guess $(JPEG_DIR)/
  35. touch $(JPEG_DIR)/.unpacked
  36. $(JPEG_DIR)/.configured: $(JPEG_DIR)/.unpacked
  37. (cd $(JPEG_DIR); rm -rf config.cache; \
  38. $(TARGET_CONFIGURE_OPTS) \
  39. ./configure \
  40. --target=$(GNU_TARGET_NAME) \
  41. --host=$(GNU_TARGET_NAME) \
  42. --build=$(GNU_HOST_NAME) \
  43. --prefix=/usr \
  44. --exec-prefix=/usr \
  45. --bindir=/usr/bin \
  46. --sbindir=/usr/sbin \
  47. --libexecdir=/usr/lib \
  48. --sysconfdir=/etc \
  49. --datadir=/usr/share \
  50. --localstatedir=/var \
  51. --mandir=/usr/man \
  52. --infodir=/usr/info \
  53. --enable-shared \
  54. );
  55. touch $(JPEG_DIR)/.configured
  56. $(JPEG_DIR)/.libs/libjpeg.so.62.0.0: $(JPEG_DIR)/.configured
  57. $(MAKE) -C $(JPEG_DIR) all
  58. $(STAGING_DIR)/lib/libjpeg.so.62.0.0: $(JPEG_DIR)/.libs/libjpeg.so.62.0.0
  59. $(MAKE) -C $(JPEG_DIR) prefix=$(STAGING_DIR) exec_prefix=$(STAGING_DIR) install-headers install-lib
  60. $(TARGET_DIR)/usr/lib/libjpeg.so.62.0.0: $(STAGING_DIR)/lib/libjpeg.so.62.0.0
  61. cp -dpf $(STAGING_DIR)/lib/libjpeg.so* $(TARGET_DIR)/usr/lib/
  62. -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libjpeg.so.62.0.0
  63. jpeg: uclibc $(TARGET_DIR)/usr/lib/libjpeg.so.62.0.0
  64. jpeg-clean:
  65. -$(MAKE) -C $(JPEG_DIR) clean
  66. #############################################################
  67. #
  68. # Toplevel Makefile options
  69. #
  70. #############################################################
  71. ifeq ($(strip $(BR2_PACKAGE_JPEG)),y)
  72. TARGETS+=jpeg
  73. endif