This repository has been archived by the owner on Jan 31, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
libpcap.mk
52 lines (40 loc) · 1.44 KB
/
libpcap.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#########################################################
# libpcap for uClinux and Asterisk,
# Ming C. Li April 2008
#
# usage: make -f libpcap.mk libpcap
#
# Run after building uClinux-dist, copies shared libs to
# uClinux-dist/staging, ready for use in Asterisk if
# required.
#########################################################
include rules.mk
LIBPCAP_SITE=http://www.tcpdump.org/release
LIBPCAP_VERSION=0.9.8
LIBPCAP_SOURCE=libpcap-0.9.8.tar.gz
LIBPCAP_UNZIP=zcat
LIBPCAP_DIR=$(BUILD_DIR)/libpcap-$(LIBPCAP_VERSION)
LIBPCAP_CONFIGURE_OPTS=--host=bfin-linux-uclibc \
--prefix=$(TARGET_DIR) \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var/lib \
--with-pcap=linux \
$(DL_DIR)/$(LIBPCAP_SOURCE):
$(WGET) -P $(DL_DIR) $(LIBPCAP_SITE)/$(LIBPCAP_SOURCE)
libpcap-source: $(DL_DIR)/$(LIBPCAP_SOURCE)
$(LIBPCAP_DIR)/.unpacked: $(DL_DIR)/$(LIBPCAP_SOURCE)
$(LIBPCAP_UNZIP) $(DL_DIR)/$(LIBPCAP_SOURCE) | \
tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
find $(LIBPCAP_DIR) '(' -name '*.orig' -o -name '*.rej' ')' -exec rm -f {} \;
$(PATCH_KERNEL) $(LIBPCAP_DIR) patch libpcap.patch
touch $(LIBPCAP_DIR)/.unpacked
$(LIBPCAP_DIR)/.configured: $(LIBPCAP_DIR)/.unpacked
cd $(LIBPCAP_DIR); ./configure $(LIBPCAP_CONFIGURE_OPTS)
touch $(LIBPCAP_DIR)/.configured
libpcap: $(LIBPCAP_DIR)/.configured
make -C $(LIBPCAP_DIR)/ STAGEDIR=$(STAGING_DIR)
cp -f $(LIBPCAP_DIR)/libpcap.a $(STAGING_DIR)/usr/lib
all: libpcap
dirclean:
rm -rf $(LIBPCAP_DIR)