[Feature][ZXW-88]merge P50 version

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

Change-Id: I34667719d9e0e7e29e8e4368848601cde0a48408
diff --git a/ap/lib/binder/Makefile b/ap/lib/binder/Makefile
new file mode 100755
index 0000000..3770eef
--- /dev/null
+++ b/ap/lib/binder/Makefile
@@ -0,0 +1,103 @@
+include $(COMMON_MK)
+
+sources := \
+    Binder.cpp \
+    BpBinder.cpp \
+    BufferedTextOutput.cpp \
+    Debug.cpp \
+    IInterface.cpp \
+    IMemory.cpp \
+    IPCThreadState.cpp \
+    IPermissionController.cpp \
+    IServiceManager.cpp \
+    MemoryDealer.cpp \
+    MemoryBase.cpp \
+    MemoryHeapBase.cpp \
+    Parcel.cpp \
+    PermissionCache.cpp \
+    ProcessState.cpp \
+    Static.cpp \
+    TextOutput.cpp \
+
+LOCAL_SRC_FILES = $(sources)
+
+LOCAL_MODULE := libbinder.so
+
+LOCAL_C_INCLUDES = -I./include
+LOCAL_C_INCLUDES += -I./include/log
+LOCAL_C_INCLUDES += -I./include/cutils
+LOCAL_C_INCLUDES += -I./include/utils
+
+LOCAL_CFLAGS += -fPIC -g -O   -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0 
+LOCAL_CFLAGS += -Werror
+
+LOCAL_CPPFLAGS += -fPIC -g -O2 -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
+#LOCAL_CPPFLAGS += -Werror 
+LOCAL_CPPFLAGS += -std=c++11
+
+LOCAL_LDLIBS  += -lpthread
+LOCAL_LDLIBS  += -L./libcutils -lcutils 
+LOCAL_LDLIBS  += -L./liblog    -llog 
+LOCAL_LDLIBS  += -L./libutils  -lutils
+#LOCAL_LDFLAGS += -shared
+LDFLAGS += -Wl,--no-undefined
+LDFLAGS += -shared
+
+LIB_LOG_MODULE = m_liblog
+LIB_UTILS_MODULE = m_libutils
+LIB_CUTILS_MODULE = m_libcutils
+
+ALL_OBJS = $(subst .cpp,.o, $(LOCAL_SRC_FILES))
+
+all : $(LOCAL_MODULE)
+	@echo "Compile $(LOCAL_MODULE) done!"
+
+#clean : $(LIB_UTILS_MODULE)_clean $(LIB_CUTILS_MODULE)_clean $(LIB_LOG_MODULE)_clean
+#	@rm -rvf $(ALL_OBJS) $(LOCAL_MODULE)
+
+#$(LOCAL_MODULE) : $(ALL_OBJS) $(LIB_CUTILS_MODULE) $(LIB_LOG_MODULE) $(LIB_UTILS_MODULE)
+#	$(CXX) $(LOCAL_LDFLAGS) $(LOCAL_CPPFLAGS) -o $@ $^ $(LOCAL_LDLIBS)
+#	$(CXX) $(LDFLAGS) $(LOCAL_CPPFLAGS) -o $@ $(ALL_OBJS) $(LOCAL_LDLIBS)
+
+#%.o:%.c
+#	@echo Compile $< 
+#	$(CC) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -c $< -o $@
+
+#%.o:%.cpp
+#	@echo Compile $< 
+#	$(CXX) $(LOCAL_CPPFLAGS) $(LOCAL_C_INCLUDES) -c $< -o $@
+
+romfs: $(LIB_UTILS_MODULE)_install $(LIB_CUTILS_MODULE)_install $(LIB_LOG_MODULE)_install
+	$(ROMFSINST) $(LOCAL_MODULE) /lib/$(LOCAL_MODULE)
+	@echo $(LOCAL_MODULE) has been installed!
+
+#Make shared library.
+#$(LIB_UTILS_MODULE):
+#	$(MAKE) -C libutils all
+
+#$(LIB_CUTILS_MODULE):
+#	$(MAKE) -C libcutils all
+
+#$(LIB_LOG_MODULE):
+#	$(MAKE) -C liblog all
+
+#Clean shared library.
+#$(LIB_UTILS_MODULE)_clean:
+#	$(MAKE) -C libutils clean
+
+#$(LIB_CUTILS_MODULE)_clean:
+#	$(MAKE) -C libcutils clean
+
+#$(LIB_LOG_MODULE)_clean:
+#	$(MAKE) -C liblog clean
+
+#Install shared library.
+$(LIB_UTILS_MODULE)_install:
+	$(MAKE) -C libutils romfs
+
+$(LIB_CUTILS_MODULE)_install:
+	$(MAKE) -C libcutils romfs
+
+$(LIB_LOG_MODULE)_install:
+	$(MAKE) -C liblog romfs
+