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 25COMMON_SRCS += \ 26 $(addprefix $(NANOAPP_SRC_PATH)/$(NANOAPP_DIR_NAME)/, $(NANOAPP_SRC_FILES)) \ 27 $(addprefix $(NANOAPP_SRC_PATH)/shared/, $(SHARED_LIB_FILES)) 28 29COMMON_CFLAGS += -DCHRE_NO_ENDIAN_H \ 30 -D__LITTLE_ENDIAN=1 \ 31 -D__BYTE_ORDER=1 \ 32 -D__BIG_ENDIAN=2 33 34COMMON_CFLAGS += -I$(NANOAPP_SRC_PATH) 35 36OPT_LEVEL=2 37 38include ${ANDROID_BUILD_TOP}/system/chre/build/nanoapp/app.mk 39