Makefile cleanups, round 5
[openwrt/svn-archive/archive.git] / libs / libol / 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:=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
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libol
22 SECTION:=libs
23 CATEGORY:=Libraries
24 TITLE:=Support library for syslog-ng
25 URL:=http://www.balabit.com/products/syslog_ng/
26 endef
27
28 define Build/Configure
29 $(call Build/Configure/Default, \
30 --enable-shared \
31 --enable-static \
32 )
33 endef
34
35 define Build/Compile
36 # pass CFLAGS again to override -O2 set by configure
37 $(MAKE) -C $(PKG_BUILD_DIR) \
38 CFLAGS="$(TARGET_CFLAGS)" \
39 DESTDIR="$(PKG_INSTALL_DIR)" \
40 all install
41 endef
42
43 define Build/InstallDev
44 mkdir -p $(1)/usr/bin
45 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libol-config $(1)/usr/bin/
46 mkdir -p $(1)/usr/include
47 $(CP) $(PKG_INSTALL_DIR)/usr/include/libol $(1)/usr/include/
48 mkdir -p $(1)/usr/lib
49 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libol.{*a,so*} $(1)/usr/lib/
50 endef
51
52 define Package/libol/install
53 $(INSTALL_DIR) $(1)/usr/lib
54 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libol.so.* $(1)/usr/lib/
55 endef
56
57 $(eval $(call BuildPackage,libol))