• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# CHRE Makefile
3#
4
5# 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# Build Configuration ##########################################################
12
13OUTPUT_NAME = libchre
14
15# Compiler Flags ###############################################################
16
17# Symbols required by the runtime for conditional compilation.
18COMMON_CFLAGS += -DCHRE_MINIMUM_LOG_LEVEL=CHRE_LOG_LEVEL_DEBUG
19COMMON_CFLAGS += -DNANOAPP_MINIMUM_LOG_LEVEL=CHRE_LOG_LEVEL_DEBUG
20COMMON_CFLAGS += -DCHRE_ASSERTIONS_ENABLED
21
22# Place nanoapps in a namespace.
23COMMON_CFLAGS += -DCHRE_NANOAPP_INTERNAL
24
25ifeq ($(CHRE_PATCH_VERSION),)
26# Compute the patch version as the number of hours since the start of some
27# arbitrary epoch. This will roll over 16 bits after ~7 years, but patch version
28# is scoped to the API version, so we can adjust the offset when a new API
29# version is released.
30EPOCH=$(shell date --date='2017-01-01' +%s)
31CHRE_PATCH_VERSION = $(shell echo $$(((`date +%s` - $(EPOCH)) / (60 * 60))))
32endif
33
34COMMON_CFLAGS += -DCHRE_PATCH_VERSION=$(CHRE_PATCH_VERSION)
35
36# Hexagon Flags ################################################################
37
38# Define CUST_H to allow including the customer header file.
39HEXAGON_CFLAGS += -DCUST_H
40
41# Include paths.
42HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/build/ms
43HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/build/cust
44HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/debugtools
45HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/services
46HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/kernel/devcfg
47HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/kernel/qurt
48HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/dal
49HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/mproc
50HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/systemdrivers
51HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/platform/inc
52HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/platform/inc/HAP
53HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/platform/inc/stddef
54HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/platform/rtld/inc
55HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/api
56HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/common/idl/inc
57HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/common/inc
58HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/common/smr/inc
59HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/common/util/mathtools/inc
60HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/goog/api
61HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/pm/inc
62
63# Makefile Includes ############################################################
64
65# Variant-specific includes.
66include $(CHRE_VARIANT_MK_INCLUDES)
67
68# CHRE Implementation includes.
69include apps/apps.mk
70include ash/ash.mk
71include chre_api/chre_api.mk
72include core/core.mk
73include external/external.mk
74include pal/pal.mk
75include platform/platform.mk
76include util/util.mk
77
78# Common includes.
79include build/common.mk
80
81# Supported Variants Includes. Not all CHRE variants are supported by this
82# implementation of CHRE. Example: this CHRE implementation is never built for
83# google_cm4_nanohub as Nanohub itself is a CHRE implementation.
84include $(CHRE_PREFIX)/build/variant/google_hexagonv60_slpi.mk
85include $(CHRE_PREFIX)/build/variant/google_hexagonv62_slpi.mk
86include $(CHRE_PREFIX)/build/variant/google_hexagonv62_slpi-uimg.mk
87include $(CHRE_PREFIX)/build/variant/google_x86_linux.mk
88include $(CHRE_PREFIX)/build/variant/google_x86_googletest.mk
89