aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaekyun Seok <jaekyun@google.com>2016-12-12 13:49:05 +0900
committerJaekyun Seok <jaekyun@google.com>2016-12-14 10:11:44 +0900
commit472c347a799a650c9ed569ec0fa0fd18067124c5 (patch)
treee5614c4724d4f2bdeb08aad548799a2d835a8d4b
parent8a06d9fe1e7f36901c2764446a1a4203a4c531a1 (diff)
downloadlibpcap-472c347a799a650c9ed569ec0fa0fd18067124c5.tar.gz
Support shared lib for libpcap.
libpcap is linked by netd (system/netd/server/Android.mk), tcpdump (/external/tcpdump/Android.mk) and some verdors' components. So using it as shared lib will be good for easy update and size reduction. Test: building succeeded, and the image was tested on angler. Bug: 33056637 Change-Id: I1f346970ab69839155550bbc46fc89461679de1e
-rw-r--r--Android.mk9
1 files changed, 8 insertions, 1 deletions
diff --git a/Android.mk b/Android.mk
index 9e27ce84..8c691bfe 100644
--- a/Android.mk
+++ b/Android.mk
@@ -9,7 +9,7 @@ libpcap_cflags := \
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
- pcap-linux.c pcap-usb-linux.c pcap-can-linux.c pcap-netfilter-linux.c pcap-netfilter-linux-android.c \
+ pcap-linux.c pcap-usb-linux.c pcap-can-linux.c pcap-netfilter-linux-android.c \
fad-gifc.c \
pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \
savefile.c sf-pcap.c sf-pcap-ng.c pcap-common.c \
@@ -31,6 +31,13 @@ LOCAL_MODULE:= libpcap
include $(BUILD_STATIC_LIBRARY)
+include $(CLEAR_VARS)
+
+LOCAL_WHOLE_STATIC_LIBRARIES := libpcap
+LOCAL_MODULE := libpcap
+
+include $(BUILD_SHARED_LIBRARY)
+
libpcap_tests := \
tests/capturetest.c \
tests/filtertest.c \