enable $(FPIC) for a few more packages
[openwrt/svn-archive/archive.git] / libs / libnfnetlink / Makefile
1 #
2 # Copyright (C) 2007 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:=libnfnetlink
12 PKG_VERSION:=0.0.39
13 PKG_RELEASE:=0
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=ftp://ftp.netfilter.org/pub/libnfnetlink/
17 PKG_MD5SUM:=348fed8c1edbe5b873ffc7b192140093
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libnfnetlink
22 SECTION:=libs
23 CATEGORY:=Libraries
24 DEPENDS:=@LINUX_2_6
25 TITLE:=libnfnetlink
26 URL:=http://netfilter.org/projects/libnfnetlink/index.html
27 endef
28
29 define Package/libnfnetlink/description
30 libnfnetlink is is the low-level library for netfilter related kernel/userspace communication.
31 It provides a generic messaging infrastructure for in-kernel netfilter subsystems
32 (such as nfnetlink_log, nfnetlink_queue, nfnetlink_conntrack) and their respective users
33 and/or management tools in userspace.
34 endef
35
36 TARGET_CFLAGS += $(FPIC)
37
38 CONFIGURE_ARGS += \
39 --enable-static \
40 --enable-shared
41
42 define Build/Compile
43 $(MAKE) -C $(PKG_BUILD_DIR) \
44 CFLAGS="$(TARGET_CFLAGS)" \
45 DESTDIR="$(PKG_INSTALL_DIR)" \
46 all install
47 endef
48
49
50 define Build/InstallDev
51 mkdir -p $(1)/usr/include/libnfnetlink
52 $(CP) $(PKG_INSTALL_DIR)/usr/include/libnfnetlink/{libnfnetlink,linux_nfnetlink,linux_nfnetlink_compat}.h $(1)/usr/include/libnfnetlink/
53 mkdir -p $(1)/usr/lib
54 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfnetlink.{a,so*} $(1)/usr/lib/
55 endef
56
57 define Package/libnfnetlink/install
58 $(INSTALL_DIR) $(1)/usr/lib
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfnetlink.so.* $(1)/usr/lib/
60 endef
61
62 $(eval $(call BuildPackage,libnfnetlink))