ucmb: Fix compile on 2.6.36
[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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=expat
11 PKG_VERSION:=2.0.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_MD5SUM:=ee8b492592568805593f81f8cdf2a04c
16 PKG_SOURCE_URL:=@SF/expat
17
18 PKG_FIXUP:=libtool
19 PKG_BUILD_PARALLEL:=1
20
21 include $(INCLUDE_DIR)/host-build.mk
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libexpat
25 SECTION:=libs
26 CATEGORY:=Libraries
27 TITLE:=An XML parsing library
28 URL:=http://expat.sourceforge.net/
29 endef
30
31 define Package/libexpat/description
32 A fast, non-validating, stream-oriented XML parsing library.
33 endef
34
35
36 TARGET_CFLAGS += $(FPIC)
37
38 CONFIGURE_ARGS += \
39 --enable-shared \
40 --enable-static
41
42 define Build/Compile
43 $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
44 endef
45
46 define Host/Install
47 $(MAKE) -C $(HOST_BUILD_DIR) install
48 endef
49
50 define Build/InstallDev
51 $(INSTALL_DIR) $(1)/usr/include
52 $(CP) $(PKG_INSTALL_DIR)/usr/include/expat{,_external}.h $(1)/usr/include/
53 $(INSTALL_DIR) $(1)/usr/lib
54 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.{a,so*} $(1)/usr/lib/
55 endef
56
57 define Package/libexpat/install
58 $(INSTALL_DIR) $(1)/usr/lib
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.so.* $(1)/usr/lib/
60 endef
61
62 $(eval $(call HostBuild))
63 $(eval $(call BuildPackage,libexpat))
64