The attached patch fixes xyssl build on non-linux plaforms -- the original Makefile...
[openwrt/svn-archive/archive.git] / libs / jpeg / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=jpeg
12 PKG_VERSION:=6b
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)src.v$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.ijg.org/files/ \
17 ftp://ftp.uu.net/graphics/jpeg/
18 PKG_MD5SUM:=dbd5f3b47ed13132f04c685d608a7547
19
20 PKG_FIXUP = libtool
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/jpeg/Default
25 TITLE:=The Independent JPEG Group's JPEG
26 URL:=http://www.ijg.org/
27 endef
28
29 define Package/libjpeg
30 $(call Package/jpeg/Default)
31 SECTION:=libs
32 CATEGORY:=Libraries
33 TITLE+= runtime library
34 endef
35
36 define Package/jpeg-tools
37 $(call Package/jpeg/Default)
38 SECTION:=utils
39 CATEGORY:=Utilities
40 DEPENDS:=+libjpeg
41 TITLE+= manipulation tools
42 endef
43
44 TARGET_CFLAGS += $(FPIC)
45
46 CONFIGURE_ARGS += \
47 --enable-shared \
48 --enable-static \
49
50 define Build/Prepare
51 $(call Build/Prepare/Default)
52 # replace the old upstream libtool stuff with our own
53 ln -sf $(STAGING_DIR)/host/bin/libtool $(PKG_BUILD_DIR)/
54 ln -sf $(STAGING_DIR)/host/share/libtool/config.sub $(PKG_BUILD_DIR)/
55 ln -sf $(STAGING_DIR)/host/share/libtool/config.guess $(PKG_BUILD_DIR)/
56 ln -sf $(STAGING_DIR)/host/share/libtool/ltmain.sh $(PKG_BUILD_DIR)/
57 ln -sf /bin/true $(PKG_BUILD_DIR)/ltconfig
58 endef
59
60 define Build/Compile
61 rm -rf $(PKG_INSTALL_DIR)
62 mkdir -p $(PKG_INSTALL_DIR)/usr/{include,lib,bin,man/man1}
63 $(MAKE) -C $(PKG_BUILD_DIR) \
64 LIBTOOL="./libtool --tag=CC" \
65 prefix="$(PKG_INSTALL_DIR)/usr" \
66 exec_prefix="$(PKG_INSTALL_DIR)/usr" \
67 all install install-headers install-lib
68 endef
69
70 define Build/InstallDev
71 mkdir -p $(1)/usr/include
72 $(CP) $(PKG_INSTALL_DIR)/usr/include/jpeglib.h $(1)/usr/include/
73 $(CP) $(PKG_BUILD_DIR)/jpegint.h $(1)/usr/include/
74 $(CP) $(PKG_INSTALL_DIR)/usr/include/j{config,error,morecfg}.h $(1)/usr/include/
75 mkdir -p $(1)/usr/lib
76 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.{a,so*} $(1)/usr/lib/
77 endef
78
79 define Package/libjpeg/install
80 $(INSTALL_DIR) $(1)/usr/lib
81 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.so.* $(1)/usr/lib/
82 endef
83
84 define Package/jpeg-tools/install
85 $(INSTALL_DIR) $(1)/usr/bin
86 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/*jpeg* $(1)/usr/bin/
87 endef
88
89 $(eval $(call BuildPackage,libjpeg))
90 $(eval $(call BuildPackage,jpeg-tools))