1*84e33947SAndroid Build Coastguard Worker# 2*84e33947SAndroid Build Coastguard Worker# Google Reference CHRE Implementation for Linux on x86 3*84e33947SAndroid Build Coastguard Worker# 4*84e33947SAndroid Build Coastguard Worker 5*84e33947SAndroid Build Coastguard Workerinclude $(CHRE_PREFIX)/build/clean_build_template_args.mk 6*84e33947SAndroid Build Coastguard Worker 7*84e33947SAndroid Build Coastguard WorkerTARGET_NAME = google_x86_linux 8*84e33947SAndroid Build Coastguard WorkerTARGET_CFLAGS = -DCHRE_MESSAGE_TO_HOST_MAX_SIZE=2048 9*84e33947SAndroid Build Coastguard WorkerTARGET_VARIANT_SRCS = $(GOOGLE_X86_LINUX_SRCS) 10*84e33947SAndroid Build Coastguard WorkerTARGET_BIN_LDFLAGS = $(GOOGLE_X86_LINUX_BIN_LDFLAGS) 11*84e33947SAndroid Build Coastguard WorkerTARGET_SO_EARLY_LIBS = $(GOOGLE_X86_LINUX_EARLY_LIBS) 12*84e33947SAndroid Build Coastguard WorkerTARGET_SO_LATE_LIBS = $(GOOGLE_X86_LINUX_LATE_LIBS) 13*84e33947SAndroid Build Coastguard WorkerTARGET_PLATFORM_ID = 0x476f6f676c000001 14*84e33947SAndroid Build Coastguard WorkerTARGET_CFLAGS += -DCHRE_FIRST_SUPPORTED_API_VERSION=CHRE_API_VERSION_1_1 15*84e33947SAndroid Build Coastguard Worker 16*84e33947SAndroid Build Coastguard WorkerTARGET_CFLAGS += $(SIM_CFLAGS) 17*84e33947SAndroid Build Coastguard WorkerTARGET_VARIANT_SRCS += $(SIM_SRCS) 18*84e33947SAndroid Build Coastguard Worker 19*84e33947SAndroid Build Coastguard Worker# Enable conversion warnings for the simulator. Since this is a platform 100% 20*84e33947SAndroid Build Coastguard Worker# within our control we expect that there will be no conversion issues. It would 21*84e33947SAndroid Build Coastguard Worker# be nice to enable this globally in the tools_config.mk but some vendor header 22*84e33947SAndroid Build Coastguard Worker# files do not compile cleanly with it. 23*84e33947SAndroid Build Coastguard WorkerTARGET_CFLAGS += -Wconversion 24*84e33947SAndroid Build Coastguard Worker 25*84e33947SAndroid Build Coastguard Worker# Add the target CFLAGS after the -Wconversion warning to allow targets to 26*84e33947SAndroid Build Coastguard Worker# disable it. 27*84e33947SAndroid Build Coastguard WorkerTARGET_CFLAGS += $(GOOGLE_X86_LINUX_CFLAGS) 28*84e33947SAndroid Build Coastguard Worker 29*84e33947SAndroid Build Coastguard Workerifneq ($(filter $(TARGET_NAME)% all, $(MAKECMDGOALS)),) 30*84e33947SAndroid Build Coastguard Workerifneq ($(IS_NANOAPP_BUILD),) 31*84e33947SAndroid Build Coastguard Workerinclude $(CHRE_PREFIX)/build/nanoapp/google_linux.mk 32*84e33947SAndroid Build Coastguard Workerelse 33*84e33947SAndroid Build Coastguard Worker# Instruct the build to link a final executable. 34*84e33947SAndroid Build Coastguard WorkerTARGET_BUILD_BIN = true 35*84e33947SAndroid Build Coastguard Worker 36*84e33947SAndroid Build Coastguard Worker# Add CFLAGS for the simulator. 37*84e33947SAndroid Build Coastguard WorkerTARGET_CFLAGS += $(shell pkg-config --cflags tclap) 38*84e33947SAndroid Build Coastguard WorkerTARGET_CFLAGS += $(shell pkg-config --cflags sndfile) 39*84e33947SAndroid Build Coastguard Worker 40*84e33947SAndroid Build Coastguard Worker# Link in libraries for the final executable and export symbols to dynamically 41*84e33947SAndroid Build Coastguard Worker# loaded objects. 42*84e33947SAndroid Build Coastguard WorkerTARGET_BIN_LDFLAGS += -lpthread -lrt -ldl -Wl,--export-dynamic 43*84e33947SAndroid Build Coastguard WorkerTARGET_BIN_LDFLAGS += $(shell pkg-config --libs sndfile) 44*84e33947SAndroid Build Coastguard Workerendif 45*84e33947SAndroid Build Coastguard Worker 46*84e33947SAndroid Build Coastguard Workerinclude $(CHRE_PREFIX)/build/arch/x86.mk 47*84e33947SAndroid Build Coastguard Workerinclude $(CHRE_PREFIX)/build/build_template.mk 48*84e33947SAndroid Build Coastguard Workerendif 49