Home | History | Annotate | Download | only in chre
      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 # Build Configuration ##########################################################
     12 
     13 OUTPUT_NAME = libchre
     14 
     15 # Compiler Flags ###############################################################
     16 
     17 # Symbols required by the runtime for conditional compilation.
     18 COMMON_CFLAGS += -DCHRE_MINIMUM_LOG_LEVEL=CHRE_LOG_LEVEL_DEBUG
     19 COMMON_CFLAGS += -DNANOAPP_MINIMUM_LOG_LEVEL=CHRE_LOG_LEVEL_DEBUG
     20 COMMON_CFLAGS += -DCHRE_ASSERTIONS_ENABLED
     21 
     22 # Place nanoapps in a namespace.
     23 COMMON_CFLAGS += -DCHRE_NANOAPP_INTERNAL
     24 
     25 ifeq ($(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.
     30 EPOCH=$(shell date --date='2017-01-01' +%s)
     31 CHRE_PATCH_VERSION = $(shell echo $$(((`date +%s` - $(EPOCH)) / (60 * 60))))
     32 endif
     33 
     34 COMMON_CFLAGS += -DCHRE_PATCH_VERSION=$(CHRE_PATCH_VERSION)
     35 
     36 # Hexagon Flags ################################################################
     37 
     38 # Define CUST_H to allow including the customer header file.
     39 HEXAGON_CFLAGS += -DCUST_H
     40 
     41 # Include paths.
     42 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/build/ms
     43 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/build/cust
     44 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/debugtools
     45 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/services
     46 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/kernel/devcfg
     47 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/kernel/qurt
     48 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/dal
     49 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/mproc
     50 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/core/api/systemdrivers
     51 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/platform/inc
     52 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/platform/inc/HAP
     53 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/platform/inc/stddef
     54 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/platform/rtld/inc
     55 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/api
     56 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/common/idl/inc
     57 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/common/inc
     58 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/common/smr/inc
     59 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/common/util/mathtools/inc
     60 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/goog/api
     61 HEXAGON_CFLAGS += -I$(SLPI_PREFIX)/Sensors/pm/inc
     62 
     63 # Makefile Includes ############################################################
     64 
     65 # Variant-specific includes.
     66 include $(CHRE_VARIANT_MK_INCLUDES)
     67 
     68 # CHRE Implementation includes.
     69 include apps/apps.mk
     70 include ash/ash.mk
     71 include chre_api/chre_api.mk
     72 include core/core.mk
     73 include external/external.mk
     74 include pal/pal.mk
     75 include platform/platform.mk
     76 include util/util.mk
     77 
     78 # Common includes.
     79 include 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.
     84 include $(CHRE_PREFIX)/build/variant/google_hexagonv60_slpi.mk
     85 include $(CHRE_PREFIX)/build/variant/google_hexagonv62_slpi.mk
     86 include $(CHRE_PREFIX)/build/variant/google_hexagonv62_slpi-uimg.mk
     87 include $(CHRE_PREFIX)/build/variant/google_x86_linux.mk
     88 include $(CHRE_PREFIX)/build/variant/google_x86_googletest.mk
     89