1ifndef NANOAPP_NAME 2$(error NANOAPP_NAME unset) 3endif 4 5ifndef NANOAPP_SRC_FILES 6$(error NANOAPP_SRC_FILES unset) 7endif 8 9ifndef ANDROID_BUILD_TOP 10$(error Must set Android build environment first) 11endif 12 13NANOAPP_DIR_NAME ?= $(NANOAPP_NAME) 14 15# This path is actually relative to one level deeper as this file 16# gets included from Makefile of each test subdirectory 17NANOAPP_SRC_PATH = ../../src 18 19SHARED_LIB_FILES = abort.cc \ 20 dumb_allocator.cc \ 21 nano_endian.cc \ 22 nano_string.cc \ 23 send_message.cc \ 24 test_success_marker.cc 25 26COMMON_SRCS += \ 27 $(addprefix $(NANOAPP_SRC_PATH)/$(NANOAPP_DIR_NAME)/, $(NANOAPP_SRC_FILES)) \ 28 $(addprefix $(NANOAPP_SRC_PATH)/shared/, $(SHARED_LIB_FILES)) 29 30COMMON_CFLAGS += -DCHRE_NO_ENDIAN_H \ 31 -D__LITTLE_ENDIAN=1 \ 32 -D__BYTE_ORDER=1 \ 33 -D__BIG_ENDIAN=2 34 35COMMON_CFLAGS += -I$(NANOAPP_SRC_PATH) 36 37OPT_LEVEL=2 38 39include ${ANDROID_BUILD_TOP}/system/chre/build/nanoapp/app.mk 40