2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=@SF
/libpng
16 PKG_MD5SUM
:=2faa7f8d81e6a35beb991cb75edbf056
21 include $(INCLUDE_DIR
)/host-build.mk
22 include $(INCLUDE_DIR
)/package.mk
24 TARGET_CFLAGS
+= $(FPIC
)
30 TITLE
:=A PNG format files handling library
31 URL
:=http
://www.libpng.org
/pub
/png
/libpng.html
34 define Build
/Configure
35 $(call Build
/Configure
/Default
, \
38 --with-zlib
="$(STAGING_DIR)/usr" \
42 define Build
/InstallDev
43 $(INSTALL_DIR
) $(2)/bin
44 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/libpng
{,12}-config
$(2)/bin
/
45 $(INSTALL_DIR
) $(1)/usr
/include
46 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/png
{,conf
}.h
$(1)/usr
/include/
47 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/libpng12
$(1)/usr
/include/
48 $(INSTALL_DIR
) $(1)/usr
/lib
49 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpng
{,12}.
{a
,so
*} $(1)/usr
/lib
/
50 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
51 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libpng
{,12}.
pc $(1)/usr
/lib
/pkgconfig
/
52 $(SED
) 's,^[ILR]_opts=".\+",,g' $(2)/bin
/libpng
*-config
55 define Package
/libpng
/install
56 $(INSTALL_DIR
) $(1)/usr
/lib
57 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpng
{,12}.so.
* $(1)/usr
/lib
/
60 $(eval
$(call HostBuild
))
61 $(eval
$(call BuildPackage
,libpng
))