1#
2# Nanoapp Makefile
3#
4# Include this file in your nanoapp Makefile to produce binary nanoapps to
5# target a variety of architectures.
6#
7
8# Nanoapp Build Configuration Checks ###########################################
9
10ifeq ($(NANOAPP_NAME),)
11$(error "The NANOAPP_NAME variable must be set to the name of the nanoapp. \
12         This should be assigned by the Makefile that includes app.mk.")
13endif
14
15ifeq ($(NANOAPP_ID),)
16$(error "The NANOAPP_ID variable must be set to the ID of the nanoapp. \
17         This should be assigned by the Makefile that includes app.mk.")
18endif
19
20ifeq ($(NANOAPP_VERSION),)
21$(error "The NANOAPP_VERSION variable must be set to the version of the nanoapp. \
22         This should be assigned by the Makefile that includes app.mk.")
23endif
24
25ifeq ($(NANOAPP_NAME_STRING),)
26$(error The NANOAPP_NAME_STRING variable must be set to the friendly name of \
27        the nanoapp. This should be assigned by the Makefile that includes \
28        app.mk.)
29endif
30
31ifeq ($(NANOAPP_VENDOR_STRING),)
32$(info NANOAPP_VENDOR_STRING not supplied, defaulting to "Google".)
33NANOAPP_VENDOR_STRING = \"Google\"
34endif
35
36ifeq ($(NANOAPP_IS_SYSTEM_NANOAPP),)
37$(info NANOAPP_IS_SYSTEM_NANOAPP not supplied, defaulting to 0.)
38NANOAPP_IS_SYSTEM_NANOAPP = 0
39endif
40
41# Nanoapp Build ################################################################
42
43# This variable indicates to the variants that some post-processing may be
44# required as the target is a nanoapp.
45IS_NANOAPP_BUILD = true
46
47# Common App Build Configuration ###############################################
48
49OUTPUT_NAME = $(NANOAPP_NAME)
50
51# Common Compiler Flags ########################################################
52
53# Add the CHRE API to the include search path.
54COMMON_CFLAGS += -I$(CHRE_PREFIX)/chre_api/include/chre_api
55
56# Variant-specific Nanoapp Support Source Files ################################
57
58APP_SUPPORT_PATH = $(CHRE_PREFIX)/build/app_support
59DSO_SUPPORT_LIB_PATH = $(CHRE_PREFIX)/platform/shared/nanoapp
60
61GOOGLE_HEXAGONV60_SLPI_SRCS += $(DSO_SUPPORT_LIB_PATH)/nanoapp_support_lib_dso.c
62GOOGLE_HEXAGONV62_SLPI_SRCS += $(DSO_SUPPORT_LIB_PATH)/nanoapp_support_lib_dso.c
63QCOM_HEXAGONV60_NANOHUB_SRCS += $(APP_SUPPORT_PATH)/qcom_nanohub/app_support.cc
64
65# Makefile Includes ############################################################
66
67# Common includes
68include $(CHRE_PREFIX)/build/common.mk
69
70# Supported variants includes
71include $(CHRE_PREFIX)/build/variant/google_cm4_nanohub.mk
72include $(CHRE_PREFIX)/build/variant/google_hexagonv60_slpi.mk
73include $(CHRE_PREFIX)/build/variant/google_hexagonv62_slpi.mk
74include $(CHRE_PREFIX)/build/variant/qcom_hexagonv60_nanohub.mk
75