[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/liblog/Makefile b/ap/lib/binder/liblog/Makefile
new file mode 100755
index 0000000..3df98e3
--- /dev/null
+++ b/ap/lib/binder/liblog/Makefile
@@ -0,0 +1,69 @@
+include $(COMMON_MK)
+
+TARGET_USES_LOGD = true
+
+ifneq ($(TARGET_USES_LOGD),false)
+liblog_sources := logd_write.c
+else
+liblog_sources := logd_write_kern.c
+endif
+
+liblog_sources += logprint.c event_tag_map.c
+
+liblog_target_sources := $(liblog_sources)
+
+ifneq ($(TARGET_USES_LOGD),false)
+liblog_target_sources += log_read.c
+else
+liblog_target_sources += log_read_kern.c
+endif
+
+LOCAL_SRC_FILES = $(liblog_target_sources)
+
+LOCAL_SRC_CPP_FILES = log_time.cpp
+
+LOCAL_MODULE := liblog.so
+
+LOCAL_C_INCLUDES = -I../include
+LOCAL_C_INCLUDES += -I../include/log
+LOCAL_C_INCLUDES += -I../include/cutils
+LOCAL_C_INCLUDES += -I../include/utils
+#-I$(STAGEDIR)
+
+LOCAL_CFLAGS += -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_CFLAGS += -Werror
+# -nostartfiles
+
+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 += -std=c++11
+
+LOCAL_LDLIBS +=
+#LOCAL_LDFLAGS += -shared
+LDFLAGS += -shared
+
+ALL_OBJS = $(subst .c,.o, $(LOCAL_SRC_FILES))
+
+ALL_CPP_OBJS = $(subst .cpp,.o, $(LOCAL_SRC_CPP_FILES))
+
+all : $(LOCAL_MODULE)
+ @echo "Compile $(LOCAL_MODULE) done!"
+
+clean :
+ @rm -rvf $(ALL_OBJS) $(LOCAL_MODULE)
+
+$(LOCAL_MODULE) : $(ALL_OBJS) $(ALL_CPP_OBJS)
+# $(CXX) $(LOCAL_LDFLAGS) $(LOCAL_CPPFLAGS) -o $@ $^ $(LOCAL_LDLIBS)
+ $(CXX) $(LDFLAGS) $(LOCAL_CPPFLAGS) -o $@ $^ $(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:
+ $(ROMFSINST) $(LOCAL_MODULE) /lib/$(LOCAL_MODULE)
+ @echo $(LOCAL_MODULE) has been installed!
+