Fix compilation when modules are selected or not, should fix buildbot spam :p
[openwrt/svn-archive/archive.git] / libs / expat / 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:=expat
12 PKG_VERSION:=1.95.8
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_MD5SUM:=aff487543845a82fe262e6e2922b4c8e
17 PKG_SOURCE_URL:=@SF/expat
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libexpat
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=An XML parsing library
29 DESCRIPTION:=\
30 A fast, non-validating, stream-oriented XML parsing library.
31 URL:=http://expat.sourceforge.net/
32 endef
33
34 define Build/Configure
35 $(call Build/Configure/Default, \
36 --enable-shared \
37 --enable-static \
38 )
39 endef
40
41 define Build/Compile
42 $(MAKE) -C $(PKG_BUILD_DIR) \
43 DESTDIR="$(PKG_INSTALL_DIR)" \
44 all install
45 endef
46
47 define Build/InstallDev
48 mkdir -p $(STAGING_DIR)/usr/bin
49 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmlwf $(STAGING_DIR)/usr/bin/
50 mkdir -p $(STAGING_DIR)/usr/include
51 $(CP) $(PKG_INSTALL_DIR)/usr/include/expat*.h $(STAGING_DIR)/usr/include/
52 mkdir -p $(STAGING_DIR)/usr/lib
53 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.{a,so*} $(STAGING_DIR)/usr/lib/
54 endef
55
56 define Build/UninstallDev
57 rm -rf \
58 $(STAGING_DIR)/usr/bin/xmlwf \
59 $(STAGING_DIR)/usr/include/expat*.h \
60 $(STAGING_DIR)/usr/lib/libexpat.{a,so*}
61 endef
62
63 define Package/libexpat/install
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.so.* $(1)/usr/lib/
66 endef
67
68 $(eval $(call BuildPackage,libexpat))