| LOCAL_PATH:= $(call my-dir) |
| |
| commonFlags:= \ |
| -Wno-missing-field-initializers \ |
| -Wno-sign-compare \ |
| -Wno-pointer-arith \ |
| -Wno-unused-parameter \ |
| -Wno-parentheses-equality \ |
| -Werror |
| |
| #---------------------------------------------------------------- |
| # The iptables lock file |
| include $(CLEAR_VARS) |
| |
| LOCAL_MODULE := xtables.lock |
| LOCAL_MODULE_CLASS := ETC |
| LOCAL_MODULE_PATH := $(TARGET_OUT)/etc |
| LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| |
| include $(BUILD_PREBUILT) |
| |
| #---------------------------------------------------------------- |
| # iptables |
| |
| include $(CLEAR_VARS) |
| |
| LOCAL_C_INCLUDES:= \ |
| $(LOCAL_PATH)/../include/ \ |
| $(LOCAL_PATH)/../ |
| |
| LOCAL_CFLAGS:=-DNO_SHARED_LIBS=1 |
| LOCAL_CFLAGS+=-DALL_INCLUSIVE |
| LOCAL_CFLAGS+=-DXTABLES_INTERNAL |
| LOCAL_CFLAGS+=-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DENABLE_IPV4 -DENABLE_IPV6 |
| # Accommodate arm-eabi-4.4.3 tools that don't set __ANDROID__ |
| LOCAL_CFLAGS+=-D__ANDROID__ |
| LOCAL_CFLAGS += $(commonFlags) |
| |
| LOCAL_REQUIRED_MODULES := xtables.lock |
| |
| LOCAL_SRC_FILES:= \ |
| xtables-legacy-multi.c iptables-xml.c xshared.c \ |
| iptables-save.c iptables-restore.c \ |
| iptables-standalone.c iptables.c \ |
| ip6tables-standalone.c ip6tables.c |
| |
| LOCAL_MODULE_TAGS := optional |
| LOCAL_MODULE:=iptables |
| |
| LOCAL_STATIC_LIBRARIES := \ |
| libext \ |
| libext4 \ |
| libext6 \ |
| libip4tc \ |
| libip6tc \ |
| libxtables |
| |
| include $(BUILD_EXECUTABLE) |
| |
| IPTABLES_SUBCOMMANDS := \ |
| iptables-restore \ |
| iptables-save \ |
| ip6tables \ |
| ip6tables-restore \ |
| ip6tables-save |
| |
| SYMLINKS := $(addprefix $(TARGET_OUT)/bin/,$(IPTABLES_SUBCOMMANDS)) |
| $(SYMLINKS): $(LOCAL_INSTALLED_MODULE) $(LOCAL_PATH)/Android.mk |
| @echo "Symlink: $@ -> iptables" |
| @mkdir -p $(dir $@) |
| @rm -rf $@ |
| $(hide) ln -sf iptables $@ |
| |
| include $(CLEAR_VARS) |
| LOCAL_MODULE := iptables_symlinks |
| LOCAL_MODULE_TAGS := optional |
| LOCAL_REQUIRED_MODULES := iptables |
| include $(BUILD_PHONY_PACKAGE) |
| $(LOCAL_BUILT_MODULE): $(SYMLINKS) |