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. 9 CHRE_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. 15 ifeq ($(HEXAGON_SDK_PREFIX),) 16 $(error "You must supply a HEXAGON_SDK_PREFIX environment variable \ 17 containing a path to the hexagon SDK. Example: \ 18 export HEXAGON_SDK_PREFIX=$$HOME/Qualcomm/Hexagon_SDK/3.0") 19 endif 20 21 ifeq ($(SLPI_PREFIX),) 22 $(error "You must supply an SLPI_PREFIX environment variable \ 23 containing a path to the SLPI source tree. Example: \ 24 export SLPI_PREFIX=$$HOME/slpi_proc") 25 endif 26 27 # Build Configuration ########################################################## 28 29 OUTPUT_NAME = libchre 30 31 # Include Paths ################################################################ 32 33 # Hexagon Include Paths 34 HEXAGON_CFLAGS += -I$(HEXAGON_SDK_PREFIX)/incs 35 HEXAGON_CFLAGS += -I$(HEXAGON_SDK_PREFIX)/incs/stddef 36 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/build/ms 37 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/build/cust 38 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/services 39 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/kernel/devcfg 40 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/kernel/qurt 41 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/dal 42 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/mproc 43 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/systemdrivers 44 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/platform/rtld/inc 45 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/api 46 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/common/idl/inc 47 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/common/util/mathtools/inc 48 49 # Compiler Flags ############################################################### 50 51 # Symbols required by the runtime for conditional compilation. 52 COMMON_CFLAGS += -DCHRE_MINIMUM_LOG_LEVEL=CHRE_LOG_LEVEL_DEBUG 53 COMMON_CFLAGS += -DNANOAPP_MINIMUM_LOG_LEVEL=CHRE_LOG_LEVEL_DEBUG 54 COMMON_CFLAGS += -DCHRE_ASSERTIONS_ENABLED 55 56 # Place nanoapps in a namespace. 57 COMMON_CFLAGS += -DCHRE_NANOAPP_INTERNAL 58 59 # Define CUST_H to allow including the customer header file. 60 HEXAGON_CFLAGS += -DCUST_H 61 62 # Makefile Includes ############################################################ 63 64 include apps/apps.mk 65 include apps/gnss_world/gnss_world.mk 66 include apps/hello_world/hello_world.mk 67 include apps/imu_cal/imu_cal.mk 68 include apps/message_world/message_world.mk 69 include apps/sensor_world/sensor_world.mk 70 include apps/timer_world/timer_world.mk 71 include apps/wifi_world/wifi_world.mk 72 include apps/wwan_world/wwan_world.mk 73 include chre_api/chre_api.mk 74 include core/core.mk 75 include external/external.mk 76 include pal/pal.mk 77 include platform/platform.mk 78 include util/util.mk 79 80 # Common Includes 81 include build/common.mk 82 83 # Supported Variants Includes. Not all CHRE variants are supported by this 84 # implementation of CHRE. Example: this CHRE implementation is never built for 85 # google_cm4_nanohub as Nanohub itself is a CHRE implementation. 86 include $(CHRE_PREFIX)/build/variant/google_hexagonv60_slpi.mk 87 include $(CHRE_PREFIX)/build/variant/google_hexagonv62_slpi.mk 88 include $(CHRE_PREFIX)/build/variant/google_x86_linux.mk 89 include $(CHRE_PREFIX)/build/variant/google_x86_googletest.mk 90