diff options
author | Elliott Hughes <enh@google.com> | 2016-02-06 02:26:14 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-02-06 02:26:14 +0000 |
commit | 9636248450c1d82751e0337d4729e3c67b5c931c (patch) | |
tree | b607292bab4c9a3b34ea6cdad9ab6dc4b8451dfd | |
parent | 85dbc764c721a033af848596b1ca0fb25a5fcc9b (diff) | |
parent | 49525576a6ddfe44de9f3090e0d4a1b1a271c949 (diff) | |
download | android_external_iproute2-9636248450c1d82751e0337d4729e3c67b5c931c.tar.gz android_external_iproute2-9636248450c1d82751e0337d4729e3c67b5c931c.tar.bz2 android_external_iproute2-9636248450c1d82751e0337d4729e3c67b5c931c.zip |
Merge "Add the ability to compile ss."
-rw-r--r-- | misc/Android.mk | 37 | ||||
-rw-r--r-- | misc/ssfilter.y | 5 |
2 files changed, 41 insertions, 1 deletions
diff --git a/misc/Android.mk b/misc/Android.mk new file mode 100644 index 0000000..b09eafb --- /dev/null +++ b/misc/Android.mk @@ -0,0 +1,37 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_SRC_FILES := ss.c ssfilter.y + +LOCAL_MODULE := ss + +LOCAL_MODULE_TAGS := debug + +LOCAL_SHARED_LIBRARIES := libc + +LOCAL_SHARED_LIBRARIES += libiprouteutil libnetlink + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include + +## +# "-x c" forces the lex/yacc files to be compiled as c the build system +# otherwise forces them to be c++. +yacc_flags := -x c + +LOCAL_CFLAGS := \ + -O2 -g \ + -W -Wall \ + -Wno-missing-field-initializers \ + -Wno-sign-compare \ + -Wno-tautological-pointer-compare \ + -Wno-unused-parameter \ + -Werror \ + '-Dsethostent=cos' \ + $(yacc_flags) \ + -DHAVE_SETNS + +LOCAL_CPPFLAGS := $(yacc_flags) + +LOCAL_LDFLAGS := -Wl,-export-dynamic +include $(BUILD_EXECUTABLE) + diff --git a/misc/ssfilter.y b/misc/ssfilter.y index a258d04..9906ad8 100644 --- a/misc/ssfilter.y +++ b/misc/ssfilter.y @@ -4,7 +4,10 @@ #include <stdlib.h> #include <malloc.h> #include <string.h> -#include "ssfilter.h" +/* NOTE: Android yacc build rules transform ssfilter.y into ssfilter.h, and + * #include "ssfilter.h" gets this file instead of the ssfilter.h in the + * source tree. This does not work. #include <ssfilter.h> instead. */ +#include <ssfilter.h> typedef struct ssfilter * ssfilter_t; |