加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Android.mk.old 13.05 KB
一键复制 编辑 原始数据 按行查看 历史
jeremy_cz 提交于 2020-07-17 14:23 . change Android.mk to Android.bp
#=====================================================================================
# makefile to build fdbus in aosp source tree |
#=====================================================================================
#=====================================================================================
# build libcommon-base.so |
#=====================================================================================
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libcommon-base
LOCAL_CPPFLAGS := -frtti -fexceptions -Wno-unused-parameter -D__LINUX__ -DFDB_CFG_SOCKET_PATH=\"/data/local/tmp\" -DCONFIG_DEBUG_LOG -DCONFIG_SOCKET_PEERCRED -DCONFIG_SOCKET_CONNECT_TIMEOUT=0 -DCONFIG_LOG_TO_STDOUT -DCONFIG_FDB_NO_RTTI -DCONFIG_FDB_MESSAGE_METADATA
LOCAL_CFLAGS := -Wno-unused-parameter -D__LINUX__ -DFDB_CFG_SOCKET_PATH=\"/data/local/tmp\" -DCONFIG_DEBUG_LOG -DCONFIG_SOCKET_PEERCRED -DCONFIG_SOCKET_CONNECT_TIMEOUT=0 -DCONFIG_LOG_TO_STDOUT -DCONFIG_FDB_MESSAGE_METADATA
SRC_FILES := fdbus/CBaseClient.cpp \
fdbus/CFdbBaseObject.cpp \
fdbus/CFdbMessage.cpp \
fdbus/CFdbSimpleSerializer.cpp \
fdbus/CBaseEndpoint.cpp \
fdbus/CFdbCJsonMsgBuilder.cpp \
fdbus/CFdbSessionContainer.cpp \
fdbus/CLogProducer.cpp \
fdbus/CBaseServer.cpp \
fdbus/CFdbContext.cpp \
fdbus/CFdbSession.cpp \
platform/CEventFd_eventfd.cpp \
platform/linux/CBaseMutexLock.cpp \
platform/linux/CBasePipe.cpp \
platform/linux/CBaseSemaphore.cpp \
platform/linux/CBaseSysDep.cpp \
platform/linux/CBaseThread.cpp \
platform/socket/CBaseSocketFactory.cpp \
platform/socket/linux/CLinuxSocket.cpp \
platform/socket/sckt-0.5/sckt.cpp \
security/CApiSecurityConfig.cpp \
security/CFdbToken.cpp \
security/CFdbusSecurityConfig.cpp \
security/CHostSecurityConfig.cpp \
security/CServerSecurityConfig.cpp \
utils/fdb_option_parser.cpp \
worker/CBaseEventLoop.cpp \
worker/CBaseWorker.cpp \
worker/CFdEventLoop.cpp \
worker/CThreadEventLoop.cpp \
server/CBaseNameProxy.cpp \
server/CIntraNameProxy.cpp \
security/cJSON/cJSON.c
LOCAL_SRC_FILES := $(SRC_FILES)
FDB_PROTO_DIR := example/idl
FDB_IDL_GEN_DIR := vendor/bosch/common-base/$(FDB_PROTO_DIR)
LOCAL_EXPORT_C_INCLUDE_DIRS := \
$(LOCAL_PATH)/public
LOCAL_C_INCLUDES += $(LOCAL_PATH)/public
include $(BUILD_SHARED_LIBRARY)
#=====================================================================================
# build libfdbus-jni.so |
#=====================================================================================
include $(CLEAR_VARS)
LOCAL_MODULE:= libfdbus-jni
LOCAL_CPPFLAGS := -frtti -fexceptions -Wno-unused-parameter -D__LINUX__ -DFDB_CFG_SOCKET_PATH=\"/data/local/tmp\" -DCONFIG_DEBUG_LOG -DCFG_JNI_ANDROID -DFDB_CFG_KEEP_ENV_TYPE
LOCAL_CFLAGS := -Wno-unused-parameter -D__LINUX__ -DFDB_CFG_SOCKET_PATH=\"/data/local/tmp\" -DCONFIG_DEBUG_LOG -DCFG_JNI_ANDROID
LOCAL_SRC_FILES:= \
jni/src/cpp/CJniClient.cpp \
jni/src/cpp/CJniMessage.cpp \
jni/src/cpp/CJniServer.cpp \
jni/src/cpp/FdbusGlobal.cpp
LOCAL_SHARED_LIBRARIES := \
libcommon-base
LOCAL_C_INCLUDES += \
frameworks/base/core/jni \
frameworks/base/core/jni/include
include $(BUILD_SHARED_LIBRARY)
#=====================================================================================
# build fdbus-jni.jar |
#=====================================================================================
include $(CLEAR_VARS)
LOCAL_SDK_VERSION := current
LOCAL_MODULE := fdbus-jni
LOCAL_SRC_FILES := $(call all-java-files-under, jni/src/java/ipc/fdbus)
include $(BUILD_JAVA_LIBRARY)
#=====================================================================================
# build fdbus-java-client.jar (java test client) |
#=====================================================================================
include $(CLEAR_VARS)
LOCAL_SDK_VERSION := current
LOCAL_MODULE := fdbus-java-client
LOCAL_PROTOC_OPTIMIZE_TYPE := lite
LOCAL_SRC_FILES := jni/test/MediaClient.java \
jni/test/FdbusProtoBuilder.java \
jni/test/CPerson.java \
$(FDB_PROTO_DIR)/common.base.Example.proto
LOCAL_JAVA_LIBRARIES := fdbus-jni \
libprotobuf-java-lite
include $(BUILD_JAVA_LIBRARY)
#=====================================================================================
# build fdbus-java-server.jar (java test server) |
#=====================================================================================
include $(CLEAR_VARS)
LOCAL_SDK_VERSION := current
LOCAL_MODULE := fdbus-java-server
LOCAL_PROTOC_OPTIMIZE_TYPE := lite
LOCAL_SRC_FILES := jni/test/MediaServer.java \
jni/test/FdbusProtoBuilder.java \
jni/test/CPerson.java \
$(FDB_PROTO_DIR)/common.base.Example.proto
LOCAL_JAVA_LIBRARIES := fdbus-jni \
libprotobuf-java-lite
include $(BUILD_JAVA_LIBRARY)
#=====================================================================================
# build name-server |
#=====================================================================================
include $(CLEAR_VARS)
LOCAL_MODULE:= name-server
#LOCAL_INIT_RC := fdbus-name-server.rc
LOCAL_CPPFLAGS := -frtti -fexceptions -Wno-unused-parameter -D__LINUX__ -DFDB_CFG_SOCKET_PATH=\"/data/local/tmp\" -DCONFIG_DEBUG_LOG
LOCAL_CFLAGS := -Wno-unused-parameter -D__LINUX__ -DFDB_CFG_SOCKET_PATH=\"/data/local/tmp\" -DCONFIG_DEBUG_LOG
LOCAL_SRC_FILES:= \
server/main_ns.cpp \
server/CNameServer.cpp \
server/CInterNameProxy.cpp \
server/CHostProxy.cpp \
security/CServerSecurityConfig.cpp
LOCAL_SHARED_LIBRARIES := \
libcommon-base
include $(BUILD_EXECUTABLE)
#=====================================================================================
# build host-server |
#=====================================================================================
include $(CLEAR_VARS)
LOCAL_MODULE:= host-server
LOCAL_CPPFLAGS := -frtti -fexceptions -Wno-unused-parameter -D__LINUX__ -DFDB_CFG_SOCKET_PATH=\"/data/local/tmp\" -DCONFIG_DEBUG_LOG
LOCAL_CFLAGS := -Wno-unused-parameter -D__LINUX__ -DFDB_CFG_SOCKET_PATH=\"/data/local/tmp\"
LOCAL_SRC_FILES:= \
server/main_hs.cpp \
server/CHostServer.cpp \
security/CHostSecurityConfig.cpp
LOCAL_SHARED_LIBRARIES := \
libcommon-base
include $(BUILD_EXECUTABLE)
#=====================================================================================
# build lssvc (list service) |
#=====================================================================================
include $(CLEAR_VARS)
LOCAL_MODULE:= lssvc
LOCAL_CPPFLAGS := -frtti -fexceptions -Wno-unused-parameter -D__LINUX__ -DCONFIG_DEBUG_LOG
LOCAL_CFLAGS := -Wno-unused-parameter -D__LINUX__ -DCONFIG_DEBUG_LOG
LOCAL_SRC_FILES:= \
server/main_ls.cpp
LOCAL_SHARED_LIBRARIES := \
libcommon-base
include $(BUILD_EXECUTABLE)
#=====================================================================================
# build lshost (list host) |
#=====================================================================================
include $(CLEAR_VARS)
LOCAL_MODULE:= lshost
LOCAL_CPPFLAGS := -frtti -fexceptions -Wno-unused-parameter -D__LINUX__ -DCONFIG_DEBUG_LOG
LOCAL_CFLAGS := -Wno-unused-parameter -D__LINUX__ -DCONFIG_DEBUG_LOG
LOCAL_SRC_FILES:= \
server/main_lh.cpp
LOCAL_SHARED_LIBRARIES := \
libcommon-base
include $(BUILD_EXECUTABLE)
#=====================================================================================
# build lsclt (list client) |
#=====================================================================================
include $(CLEAR_VARS)
LOCAL_MODULE:= lsclt
LOCAL_CPPFLAGS := -frtti -fexceptions -Wno-unused-parameter -D__LINUX__ -DCONFIG_DEBUG_LOG
LOCAL_CFLAGS := -Wno-unused-parameter -D__LINUX__ -DCONFIG_DEBUG_LOG
LOCAL_SRC_FILES:= \
server/main_lc.cpp
LOCAL_SHARED_LIBRARIES := \
libcommon-base
include $(BUILD_EXECUTABLE)
#=====================================================================================
# build logsvc (log service) |
#=====================================================================================
include $(CLEAR_VARS)
LOCAL_MODULE:= logsvc
LOCAL_CPPFLAGS := -frtti -fexceptions -Wno-unused-parameter -D__LINUX__ -DCONFIG_DEBUG_LOG
LOCAL_CFLAGS := -Wno-unused-parameter -D__LINUX__ -DCONFIG_DEBUG_LOG
LOCAL_SRC_FILES:= \
server/main_log_server.cpp \
server/CLogPrinter.cpp
LOCAL_SHARED_LIBRARIES := \
libcommon-base
include $(BUILD_EXECUTABLE)
#=====================================================================================
# build logviewer (log viewer) |
#=====================================================================================
include $(CLEAR_VARS)
LOCAL_MODULE:= logviewer
LOCAL_CPPFLAGS := -frtti -fexceptions -Wno-unused-parameter -D__LINUX__ -DCONFIG_DEBUG_LOG
LOCAL_CFLAGS := -Wno-unused-parameter -D__LINUX__ -DCONFIG_DEBUG_LOG
LOCAL_SRC_FILES:= \
server/main_log_client.cpp \
server/CLogPrinter.cpp
LOCAL_SHARED_LIBRARIES := \
libcommon-base
include $(BUILD_EXECUTABLE)
FDB_IDL_EXAMPLE_H = \<$(FDB_IDL_GEN_DIR)/common.base.Example.pb.h\>
#=====================================================================================
# build fdbtest_client (native test) |
#=====================================================================================
include $(CLEAR_VARS)
LOCAL_MODULE:= fdbtest_client
LOCAL_CPPFLAGS := -fexceptions -Wno-unused-parameter -D__LINUX__ -DCONFIG_DEBUG_LOG -DFDBUS_PROTO_FULL_FEATURE -DFDB_IDL_EXAMPLE_H=$(FDB_IDL_EXAMPLE_H)
LOCAL_CFLAGS := -Wno-unused-parameter -D__LINUX__ -DCONFIG_DEBUG_LOG
LOCAL_SRC_FILES:= \
example/fdb_test_client.cpp \
$(FDB_PROTO_DIR)/common.base.Example.proto
LOCAL_SHARED_LIBRARIES := \
libprotobuf-cpp-full \
libcommon-base
LOCAL_PROTOC_OPTIMIZE_TYPE := full
include $(BUILD_EXECUTABLE)
#=====================================================================================
# build fdbtest_server (native test) |
#=====================================================================================
include $(CLEAR_VARS)
LOCAL_MODULE:= fdbtest_server
LOCAL_CPPFLAGS := -fexceptions -Wno-unused-parameter -D__LINUX__ -DCONFIG_DEBUG_LOG -DFDBUS_PROTO_FULL_FEATURE -DFDB_IDL_EXAMPLE_H=$(FDB_IDL_EXAMPLE_H)
LOCAL_CFLAGS := -Wno-unused-parameter -D__LINUX__ -DCONFIG_DEBUG_LOG
LOCAL_SRC_FILES:= \
example/fdb_test_server.cpp \
$(FDB_PROTO_DIR)/common.base.Example.proto
LOCAL_SHARED_LIBRARIES := \
libprotobuf-cpp-full \
libcommon-base
LOCAL_PROTOC_OPTIMIZE_TYPE := full
include $(BUILD_EXECUTABLE)
#=====================================================================================
# build fdbxclient (throughput test client) |
#=====================================================================================
include $(CLEAR_VARS)
LOCAL_MODULE:= fdbxclient
LOCAL_CPPFLAGS := -fexceptions -Wno-unused-parameter -D__LINUX__ -DCONFIG_DEBUG_LOG
LOCAL_CFLAGS := -Wno-unused-parameter -D__LINUX__ -DCONFIG_DEBUG_LOG
LOCAL_SRC_FILES:= \
server/main_xclient.cpp
LOCAL_SHARED_LIBRARIES := \
libcommon-base
include $(BUILD_EXECUTABLE)
#=====================================================================================
# build fdbxserver (throughput test server) |
#=====================================================================================
include $(CLEAR_VARS)
LOCAL_MODULE:= fdbxserver
LOCAL_CPPFLAGS := -fexceptions -Wno-unused-parameter -D__LINUX__ -DCONFIG_DEBUG_LOG
LOCAL_CFLAGS := -Wno-unused-parameter -D__LINUX__ -DCONFIG_DEBUG_LOG
LOCAL_SRC_FILES:= \
server/main_xserver.cpp
LOCAL_SHARED_LIBRARIES := \
libcommon-base
include $(BUILD_EXECUTABLE)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化