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