blob: c00d47f22fb988130567f0567be34c402347fe1f [file] [log] [blame]
Andrew Rossignol0d6761f2016-12-19 14:51:00 -08001#
Andrew Rossignolcb0ca9c2017-02-09 19:35:02 -08002# CHRE Makefile
Andrew Rossignol0d6761f2016-12-19 14:51:00 -08003#
4
Andrew Rossignolcb0ca9c2017-02-09 19:35:02 -08005# Environment Setup ############################################################
6
7# Building CHRE is always done in-tree so the CHRE_PREFIX can be assigned to the
8# current directory.
9CHRE_PREFIX = .
10
11# Environment Checks ###########################################################
12
13# Ensure that the user has specified a path to the Hexagon SDK and SLPI tree
14# which are required build the runtime.
15ifeq ($(HEXAGON_SDK_PREFIX),)
16$(error "You must supply a HEXAGON_SDK_PREFIX environment variable \
17 containing a path to the hexagon SDK. Example: \
18 $$HOME/Qualcomm/Hexagon_SDK/3.0")
19endif
20
21ifeq ($(SLPI_PREFIX),)
22$(error "You must supply an SLPI_PREFIX environemnt variable \
23 containing a path to the SLPI source tree. Example: \
24 $$HOME/slpi_proc")
25endif
26
27# Build Configuration ##########################################################
28
29OUTPUT_NAME = libchre
30
31# Include Paths ################################################################
32
33# Hexagon Include Paths
34HEXAGON_CFLAGS += -I$(HEXAGON_SDK_PREFIX)/incs
35HEXAGON_CFLAGS += -I$(HEXAGON_SDK_PREFIX)/incs/stddef
36HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/build/ms
37HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/build/cust
38HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/services
39HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/kernel/devcfg
40HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/kernel/qurt
41HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/dal
42HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/mproc
43HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/systemdrivers
44HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/api
45HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/common/util/mathtools/inc
46
47# Compiler Flags ###############################################################
48
49# Define CUST_H to allow including the customer header file.
50HEXAGON_CFLAGS += -DCUST_H
51
52# Makefile Includes ############################################################
53
54include apps/hello_world/hello_world.mk
55include apps/sensor_world/sensor_world.mk
56include apps/timer_world/timer_world.mk
57include chre_api/chre_api.mk
58include core/core.mk
59include pal/pal.mk
60include platform/platform.mk
61include util/util.mk
62
63# Common Includes
64include build/common.mk
65
66# Supported Variants Includes. Not all CHRE variants are supported by this
67# implementation of CHRE. Example: this CHRE implementation is never built for
68# google_cm4_nanohub as Nanohub itself is a CHRE implementation.
Andrew Rossignol27126372017-02-23 11:50:18 -080069include $(CHRE_PREFIX)/build/variant/google_hexagonv60_slpi.mk
70include $(CHRE_PREFIX)/build/variant/google_hexagonv62_slpi.mk
Andrew Rossignold67589d2017-02-24 11:09:35 -080071include $(CHRE_PREFIX)/build/variant/google_x86_linux.mk