1#
2# Power Test Makefile
3#
4
5# Environment Checks ###########################################################
6
7ifeq ($(CHRE_PREFIX),)
8ifneq ($(ANDROID_BUILD_TOP),)
9CHRE_PREFIX = $(ANDROID_BUILD_TOP)/system/chre
10else
11$(error "You must run 'lunch' to setup ANDROID_BUILD_TOP, or explicitly define \
12         the CHRE_PREFIX environment variable to point to the CHRE root \
13         directory.")
14endif
15endif
16
17# Nanoapp Configuration ########################################################
18
19NANOAPP_VERSION = 0x00020000
20
21# Common Compiler Flags ########################################################
22
23# Include paths.
24COMMON_CFLAGS += -I$(CHRE_PREFIX)/apps/power_test/common/include
25COMMON_CFLAGS += -I$(CHRE_PREFIX)/external/flatbuffers/include
26COMMON_CFLAGS += -I$(CHRE_PREFIX)/util/include
27
28# Defines
29COMMON_CFLAGS += -DNANOAPP_MINIMUM_LOG_LEVEL=CHRE_LOG_LEVEL_DEBUG
30
31# Flatbuffers configuration
32include $(CHRE_PREFIX)/external/flatbuffers/flatbuffers.mk
33COMMON_CFLAGS += $(FLATBUFFERS_CFLAGS)
34
35# Common Source Files ##########################################################
36
37COMMON_SRCS += $(CHRE_PREFIX)/apps/power_test/common/power_test.cc
38COMMON_SRCS += $(CHRE_PREFIX)/apps/power_test/common/request_manager.cc
39COMMON_SRCS += $(CHRE_PREFIX)/util/dynamic_vector_base.cc
40COMMON_SRCS += $(CHRE_PREFIX)/util/nanoapp/audio.cc
41COMMON_SRCS += $(CHRE_PREFIX)/util/nanoapp/callbacks.cc
42
43# Permission declarations ######################################################
44
45CHRE_NANOAPP_USES_AUDIO = true
46CHRE_NANOAPP_USES_GNSS = true
47CHRE_NANOAPP_USES_WIFI = true
48CHRE_NANOAPP_USES_WWAN = true
49
50# Makefile Includes ############################################################
51
52include $(CHRE_PREFIX)/build/nanoapp/app.mk
53