1#
2# Permission Test Nanoapp Makefile
3#
4# Environment Checks ###########################################################
5ifeq ($(CHRE_PREFIX),)
6  ifneq ($(ANDROID_BUILD_TOP),)
7    CHRE_PREFIX = $(ANDROID_BUILD_TOP)/system/chre
8  else
9    $(error "You must run 'lunch' to setup ANDROID_BUILD_TOP, or explicitly \
10    define the CHRE_PREFIX environment variable to point to the CHRE root \
11    directory.")
12  endif
13endif
14
15# Nanoapp Configuration ########################################################
16
17NANOAPP_NAME = permission_test
18NANOAPP_ID = 0x476f6f6754000009
19NANOAPP_NAME_STRING = \"Permission\ Test\"
20NANOAPP_VERSION = 0x00000001
21
22NANOAPP_PATH = $(CHRE_PREFIX)/apps/test/common/permission_test
23TEST_SHARED_PATH = $(CHRE_PREFIX)/apps/test/common/shared
24
25# Protobuf Sources #############################################################
26
27NANOPB_EXTENSION = nanopb
28
29NANOPB_SRCS += $(NANOAPP_PATH)/../proto/chre_test_common.proto
30NANOPB_SRCS += $(NANOAPP_PATH)/../proto/permission_test.proto
31NANOPB_PROTO_PATH = $(NANOAPP_PATH)/../proto
32NANOPB_INCLUDES = $(NANOPB_PROTO_PATH)
33NANOPB_FLAGS += --proto_path=$(NANOPB_PROTO_PATH)
34
35# Source Code ##################################################################
36
37COMMON_SRCS += $(NANOAPP_PATH)/src/permission_test.cc
38COMMON_SRCS += $(TEST_SHARED_PATH)/src/send_message.cc
39COMMON_SRCS += $(CHRE_PREFIX)/util/nanoapp/callbacks.cc
40
41# Compiler Flags ###############################################################
42
43# Defines
44COMMON_CFLAGS += -DNANOAPP_MINIMUM_LOG_LEVEL=CHRE_LOG_LEVEL_INFO
45
46# Includes
47COMMON_CFLAGS += -I$(TEST_SHARED_PATH)/inc
48
49# DO NOT USE. This macro is only meant to be used in this test nanoapp and
50# should never be used in production nanoapps. Please use the
51# CHRE_NANOAPP_USES_X macros there instead to ensure the right permissions are
52# declared.
53COMMON_CFLAGS += -DCHRE_TEST_NANOAPP_PERMS=0
54
55# Permission declarations ######################################################
56
57CHRE_NANOAPP_USES_AUDIO = true
58CHRE_NANOAPP_USES_GNSS = true
59CHRE_NANOAPP_USES_WIFI = true
60CHRE_NANOAPP_USES_WWAN = true
61
62# Makefile Includes ############################################################
63
64include $(CHRE_PREFIX)/build/nanoapp/app.mk
65