[Feature][ZXW-237]merge P54U03 version

Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No

Change-Id: Id39ef8b992af691eab09c01d4ea26da89e5f4049
diff --git a/ap/app/clatd/Android.mk b/ap/app/clatd/Android.mk
new file mode 100755
index 0000000..cae37fc
--- /dev/null
+++ b/ap/app/clatd/Android.mk
@@ -0,0 +1,52 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:=clatd.c dump.c checksum.c translate.c icmp.c ipv4.c ipv6.c config.c dns64.c logging.c getaddr.c netlink_callbacks.c netlink_msg.c setif.c mtu.c tun.c ring.c
+
+LOCAL_CFLAGS := -Wall -Werror -Wunused-parameter
+# Bug: http://b/33566695
+LOCAL_CFLAGS += -Wno-address-of-packed-member
+LOCAL_C_INCLUDES := external/libnl/include bionic/libc/dns/include system/netd/include
+LOCAL_STATIC_LIBRARIES := libnl
+LOCAL_SHARED_LIBRARIES := libcutils liblog libnetutils
+
+# The clat daemon.
+LOCAL_MODULE := clatd
+
+include $(BUILD_EXECUTABLE)
+
+
+# The configuration file.
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := clatd.conf
+LOCAL_MODULE_CLASS := ETC
+LOCAL_MODULE_PATH := $(TARGET_OUT)/etc
+LOCAL_SRC_FILES := $(LOCAL_MODULE)
+
+include $(BUILD_PREBUILT)
+
+
+# Unit tests.
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := clatd_test
+LOCAL_CFLAGS := -Wall -Werror -Wunused-parameter
+# Bug: http://b/33566695
+LOCAL_CFLAGS += -Wno-address-of-packed-member
+LOCAL_SRC_FILES := clatd_test.cpp checksum.c translate.c icmp.c ipv4.c ipv6.c logging.c config.c tun.c
+LOCAL_MODULE_TAGS := eng tests
+LOCAL_SHARED_LIBRARIES := liblog libnetutils
+
+include $(BUILD_NATIVE_TEST)
+
+# Microbenchmark.
+include $(CLEAR_VARS)
+
+LOCAL_CLANG := true
+LOCAL_MODULE := clatd_microbenchmark
+LOCAL_CFLAGS := -Wall -Werror -Wunused-parameter
+LOCAL_SRC_FILES := clatd_microbenchmark.c checksum.c tun.c
+LOCAL_MODULE_TAGS := eng tests
+
+include $(BUILD_NATIVE_TEST)