Port palantir to -ng
[openwrt/svn-archive/archive.git] / libs / libjpeg / 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: Makefile 4153 2006-07-18 16:58:52Z florian $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=jpeg
12 PKG_VERSION:=6b
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)src.v$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://www.ijg.org/files/ \
18 ftp://ftp.uu.net/graphics/jpeg/
19 PKG_MD5SUM:=dbd5f3b47ed13132f04c685d608a7547
20 PKG_CAT:=zcat
21
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Build/Configure
27 $(call Build/Configure/Default,--disable-shared --enable-static)
28 endef
29
30 define Build/Compile
31 rm -rf $(PKG_INSTALL_DIR)
32 mkdir -p $(PKG_INSTALL_DIR)/usr/{include,lib}
33 $(MAKE) -C $(PKG_BUILD_DIR) \
34 prefix="$(PKG_INSTALL_DIR)/usr" \
35 exec_prefix="$(PKG_INSTALL_DIR)/usr" \
36 all install-headers install-lib
37 endef
38
39 define Build/InstallDev
40 mkdir -p $(STAGING_DIR)/usr/include
41 $(CP) $(PKG_INSTALL_DIR)/usr/include/jpeglib.h $(STAGING_DIR)/usr/include/
42 $(CP) $(PKG_BUILD_DIR)/jpegint.h $(STAGING_DIR)/usr/include
43 $(CP) $(PKG_INSTALL_DIR)/usr/include/j{config,error,morecfg}.h $(STAGING_DIR)/usr/include
44 mkdir -p $(STAGING_DIR)/usr/lib
45 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.a $(STAGING_DIR)/usr/lib/
46 endef
47
48 define Build/UninstallDev
49 rm -rf $(STAGING_DIR)/usr/include/jpeg{int,lib}.h \
50 $(STAGING_DIR)/usr/include/j{config,error,morecfg}.h \
51 $(STAGING_DIR)/usr/lib/libjpeg.{a,so*}
52 endef
53
54 $(eval $(call Build/DefaultTargets))