package: add module for the RB750 LED driver
[openwrt.git] / package / libpcap / Makefile
1 #
2 # Copyright (C) 2006-2010 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:=libpcap
11 PKG_VERSION:=1.0.0
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.tcpdump.org/release/
16 PKG_MD5SUM:=9ad1358c5dec48456405eac197a46d3d
17
18 PKG_INSTALL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21 include $(INCLUDE_DIR)/kernel.mk
22
23 define Package/libpcap
24 SECTION:=libs
25 CATEGORY:=Libraries
26 TITLE:=Low-level packet capture library
27 URL:=http://www.tcpdump.org/
28 endef
29
30 define Package/libpcap/description
31 This package contains a system-independent library for user-level network packet
32 capture.
33 endef
34
35 define Package/libpcap/config
36 source "$(SOURCE)/Config.in"
37 endef
38
39 TARGET_CFLAGS += \
40 -ffunction-sections \
41 -fdata-sections
42
43 CONFIGURE_VARS += \
44 ac_cv_linux_vers=$(LINUX_VERSION)
45
46 CONFIGURE_ARGS += \
47 --enable-shared \
48 --enable-static \
49 --disable-yydebug \
50 --enable-ipv6 \
51 --with-build-cc="$(HOSTCC)" \
52 --with-pcap=linux \
53 --without-septel \
54 --without-dag
55
56 MAKE_FLAGS += \
57 CCOPT="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include"
58
59 define Build/Configure
60 $(call Build/Configure/Default)
61 $(if $(CONFIG_PCAP_HAS_USB),,$(SED) '/^#define PCAP_SUPPORT_USB/D' $(PKG_BUILD_DIR)/config.h)
62 $(if $(CONFIG_PCAP_HAS_USB),,$(SED) 's/pcap-usb-linux.c *//' $(PKG_BUILD_DIR)/Makefile)
63 $(if $(CONFIG_PCAP_HAS_BT),,$(SED) '/^#define PCAP_SUPPORT_BT/D' $(PKG_BUILD_DIR)/config.h)
64 $(if $(CONFIG_PCAP_HAS_BT),,$(SED) 's/pcap-bt-linux.c *//' $(PKG_BUILD_DIR)/Makefile)
65 endef
66
67 define Build/InstallDev
68 $(INSTALL_DIR) $(1)/usr/include
69 $(CP) $(PKG_INSTALL_DIR)/usr/include/pcap* $(1)/usr/include/
70
71 $(INSTALL_DIR) $(1)/usr/lib
72 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.{a,so*} $(1)/usr/lib/
73 endef
74
75 define Package/libpcap/install
76 $(INSTALL_DIR) $(1)/usr/lib
77 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so* $(1)/usr/lib/
78 endef
79
80 $(eval $(call BuildPackage,libpcap))
This page took 0.05449 seconds and 5 git commands to generate.