[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/libutils/Makefile b/ap/lib/binder/libutils/Makefile
new file mode 100755
index 0000000..38466cb
--- /dev/null
+++ b/ap/lib/binder/libutils/Makefile
@@ -0,0 +1,69 @@
+include $(COMMON_MK)
+
+commonSources:= \
+ BasicHashtable.cpp \
+ BlobCache.cpp \
+ FileMap.cpp \
+ LinearAllocator.cpp \
+ LinearTransform.cpp \
+ Log.cpp \
+ NativeHandle.cpp \
+ RefBase.cpp \
+ SharedBuffer.cpp \
+ Static.cpp \
+ String8.cpp \
+ String16.cpp \
+ SystemClock.cpp \
+ Threads.cpp \
+ Timers.cpp \
+ Unicode.cpp \
+ VectorImpl.cpp \
+ misc.cpp
+
+
+LOCAL_SRC_FILES = $(commonSources)
+
+LOCAL_MODULE := libutils.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
+
+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 += -lpthread
+LOCAL_LDLIBS += -L../liblog -llog
+LOCAL_LDLIBS += -L../libcutils -lcutils
+#LOCAL_LDFLAGS += -shared
+LDFLAGS += -shared
+
+ALL_OBJS = $(subst .cpp,.o, $(LOCAL_SRC_FILES))
+
+all : $(LOCAL_MODULE)
+ @echo "Compile $(LOCAL_MODULE) done!"
+
+clean :
+ @rm -rvf $(ALL_OBJS) $(LOCAL_MODULE)
+
+$(LOCAL_MODULE) : $(ALL_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!
+