Home | History | Annotate | Download | only in build
      1 #
      2 # Common Makefile Rules
      3 #
      4 
      5 # Environment Checks ###########################################################
      6 
      7 ifeq ($(OPT_LEVEL),)
      8 $(warning The OPT_LEVEL variable is unset. Defaulting to 0.)
      9 OPT_LEVEL = 0
     10 endif
     11 
     12 ifeq ($(OUTPUT_NAME),)
     13 $(error "The OUTPUT_NAME variable must be set to the name of the desired \
     14          binary. Example: OUTPUT_NAME = my_nanoapp")
     15 endif
     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
     22 all:
     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.
     27 ifeq ($(MAKECMDGOALS),)
     28 MAKECMDGOALS = all
     29 endif
     30 
     31 # Makefile Includes ############################################################
     32 
     33 # Common Includes
     34 include $(CHRE_PREFIX)/build/clean.mk
     35 include $(CHRE_PREFIX)/build/tools_config.mk
     36