Cleanup libol Makefile.
[openwrt/svn-archive/archive.git] / libs / libol / Makefile
1 #
2 # Copyright (C) 2006-2008 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:=libol
12 PKG_VERSION:=0.3.18
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.balabit.com/downloads/libol/0.3
17 PKG_MD5SUM:=cbadf4b7ea276dfa85acc38a1cc5ff17
18 PKG_FIXUP:=libtool
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/libol
23 SECTION:=libs
24 CATEGORY:=Libraries
25 TITLE:=Support library for syslog-ng
26 URL:=http://www.balabit.com/products/syslog_ng/
27 endef
28
29 define Build/Configure
30 $(call Build/Configure/Default, \
31 --enable-shared \
32 --enable-static \
33 )
34 endef
35
36 TARGET_CFLAGS += $(FPIC)
37
38 define Build/Compile
39 # pass CFLAGS again to override -O2 set by configure
40 $(MAKE) -C $(PKG_BUILD_DIR) \
41 CFLAGS="$(TARGET_CFLAGS)" \
42 DESTDIR="$(PKG_INSTALL_DIR)" \
43 all install
44 endef
45
46 define Build/InstallDev
47 $(INSTALL_DIR) $(2)/bin
48 $(INSTALL_BIN) \
49 $(PKG_INSTALL_DIR)/usr/bin/libol-config \
50 $(2)/bin/
51
52 $(INSTALL_DIR) $(1)/usr/include/libol
53 $(INSTALL_DATA) \
54 $(PKG_INSTALL_DIR)/usr/include/libol/*.h \
55 $(1)/usr/include/libol/
56
57 $(INSTALL_DIR) $(1)/usr/lib
58 $(INSTALL_DATA) \
59 $(PKG_INSTALL_DIR)/usr/lib/libol.{la,so*} \
60 $(1)/usr/lib/
61 endef
62
63 define Package/libol/install
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(INSTALL_DATA) \
66 $(PKG_INSTALL_DIR)/usr/lib/libol.{a,so*} \
67 $(1)/usr/lib/
68 endef
69
70 $(eval $(call BuildPackage,libol))