aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: c00d47f22fb988130567f0567be34c402347fe1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#
# CHRE Makefile
#

# Environment Setup ############################################################

# Building CHRE is always done in-tree so the CHRE_PREFIX can be assigned to the
# current directory.
CHRE_PREFIX = .

# Environment Checks ###########################################################

# Ensure that the user has specified a path to the Hexagon SDK and SLPI tree
# which are required build the runtime.
ifeq ($(HEXAGON_SDK_PREFIX),)
$(error "You must supply a HEXAGON_SDK_PREFIX environment variable \
         containing a path to the hexagon SDK. Example: \
         $$HOME/Qualcomm/Hexagon_SDK/3.0")
endif

ifeq ($(SLPI_PREFIX),)
$(error "You must supply an SLPI_PREFIX environemnt variable \
         containing a path to the SLPI source tree. Example: \
         $$HOME/slpi_proc")
endif

# Build Configuration ##########################################################

OUTPUT_NAME = libchre

# Include Paths ################################################################

# Hexagon Include Paths
HEXAGON_CFLAGS += -I$(HEXAGON_SDK_PREFIX)/incs
HEXAGON_CFLAGS += -I$(HEXAGON_SDK_PREFIX)/incs/stddef
HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/build/ms
HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/build/cust
HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/services
HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/kernel/devcfg
HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/kernel/qurt
HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/dal
HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/mproc
HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/systemdrivers
HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/api
HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/common/util/mathtools/inc

# Compiler Flags ###############################################################

# Define CUST_H to allow including the customer header file.
HEXAGON_CFLAGS += -DCUST_H

# Makefile Includes ############################################################

include apps/hello_world/hello_world.mk
include apps/sensor_world/sensor_world.mk
include apps/timer_world/timer_world.mk
include chre_api/chre_api.mk
include core/core.mk
include pal/pal.mk
include platform/platform.mk
include util/util.mk

# Common Includes
include build/common.mk

# Supported Variants Includes. Not all CHRE variants are supported by this
# implementation of CHRE. Example: this CHRE implementation is never built for
# google_cm4_nanohub as Nanohub itself is a CHRE implementation.
include $(CHRE_PREFIX)/build/variant/google_hexagonv60_slpi.mk
include $(CHRE_PREFIX)/build/variant/google_hexagonv62_slpi.mk
include $(CHRE_PREFIX)/build/variant/google_x86_linux.mk