jpeg.mk 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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) -xvf -
  32. touch $(JPEG_DIR)/.unpacked
  33. $(JPEG_DIR)/.configured: $(JPEG_DIR)/.unpacked
  34. zcat $(DL_DIR)/$(JPEG_SOURCE) | tar -C $(BUILD_DIR) -xvf -
  35. (cd $(JPEG_DIR); rm -rf config.cache; \
  36. $(TARGET_CONFIGURE_OPTS) \
  37. ./configure \
  38. --target=$(GNU_TARGET_NAME) \
  39. --host=$(GNU_TARGET_NAME) \
  40. --build=$(GNU_HOST_NAME) \
  41. --prefix=/usr \
  42. --exec-prefix=/usr \
  43. --bindir=/usr/bin \
  44. --sbindir=/usr/sbin \
  45. --libexecdir=/usr/lib \
  46. --sysconfdir=/etc \
  47. --datadir=/usr/share \
  48. --localstatedir=/var \
  49. --mandir=/usr/man \
  50. --infodir=/usr/info \
  51. --enable-shared \
  52. );
  53. touch $(JPEG_DIR)/.configured
  54. $(STAGING_DIR)/lib/libjpeg.so.62.0.0: $(JPEG_DIR)/.configured
  55. $(MAKE) -C $(JPEG_DIR) CC=$(TARGET_CROSS)gcc all
  56. $(MAKE) -C $(JPEG_DIR) install-lib
  57. $(MAKE) -C $(JPEG_DIR) install-headers
  58. $(TARGET_DIR)/lib/libjpeg.so.62.0.0: $(STAGING_DIR)/lib/libjpeg.so.62.0.0
  59. cp -dpf $(STAGING_DIR)/lib/libjpeg.so* $(TARGET_DIR)/lib/
  60. jpeg: uclibc $(TARGET_DIR)/lib/libjpeg.so.62.0.0
  61. jpeg-clean:
  62. -$(MAKE) -C $(JPEG_DIR) clean