1#
2# Common Makefile Rules
3#
4
5# Environment Checks ###########################################################
6
7ifeq ($(OPT_LEVEL),)
8$(warning The OPT_LEVEL variable is unset. Defaulting to 0.)
9OPT_LEVEL = 0
10endif
11
12ifeq ($(OUTPUT_NAME),)
13$(error "The OUTPUT_NAME variable must be set to the name of the desired \
14         binary. Example: OUTPUT_NAME = my_nanoapp")
15endif
16
17# Define all ###################################################################
18
19# All is defined here as the first target which causes make to build all by
20# default when no targets are supplied.
21.PHONY: all
22all:
23
24# If no make command goals are specified, default to all. At least one target
25# is required for environment checks. Building all will require toolchains for
26# all supported architectures which may not be desirable.
27ifeq ($(MAKECMDGOALS),)
28MAKECMDGOALS = all
29endif
30
31# Makefile Includes ############################################################
32
33# Common Includes
34include $(CHRE_PREFIX)/build/clean.mk
35include $(CHRE_PREFIX)/build/tools_config.mk
36