1ifndef NANOAPP_NAME 2$(error NANOAPP_NAME unset) 3endif 4 5ifndef NANOAPP_SRC_FILES 6$(error NANOAPP_SRC_FILES unset) 7endif 8 9ifndef CHRE_PREFIX 10ifndef ANDROID_BUILD_TOP 11$(error Must supply CHRE_PREFIX or set Android build environment first) 12else 13CHRE_PREFIX = $(ANDROID_BUILD_TOP)/system/chre 14endif 15endif 16 17NANOAPP_DIR_NAME ?= $(NANOAPP_NAME) 18NANOAPP_SRC_PATH = $(CHRE_PREFIX)/apps/test/chqts/src 19 20SHARED_LIB_FILES = abort.cc \ 21 chunk_allocator.cc \ 22 nano_endian.cc \ 23 nano_string.cc \ 24 send_message.cc \ 25 test_success_marker.cc 26 27COMMON_SRCS += \ 28 $(addprefix $(NANOAPP_SRC_PATH)/$(NANOAPP_DIR_NAME)/, $(NANOAPP_SRC_FILES)) \ 29 $(addprefix $(NANOAPP_SRC_PATH)/shared/, $(SHARED_LIB_FILES)) 30 31# Add util srcs since they may be included by the tests 32COMMON_SRCS += $(CHRE_PREFIX)/util/buffer_base.cc 33COMMON_SRCS += $(CHRE_PREFIX)/util/dynamic_vector_base.cc 34 35COMMON_CFLAGS += -DCHRE_NO_ENDIAN_H \ 36 -D__LITTLE_ENDIAN=1 \ 37 -D__BYTE_ORDER=1 \ 38 -D__BIG_ENDIAN=2 39 40COMMON_CFLAGS += -I$(NANOAPP_SRC_PATH) 41COMMON_CFLAGS += -I$(CHRE_PREFIX)/util/include 42 43OPT_LEVEL=2 44 45# Permission declarations ###################################################### 46 47CHRE_NANOAPP_USES_AUDIO = true 48CHRE_NANOAPP_USES_GNSS = true 49CHRE_NANOAPP_USES_WIFI = true 50CHRE_NANOAPP_USES_WWAN = true 51 52include $(CHRE_PREFIX)/build/nanoapp/app.mk 53