Home | History | Annotate | Download | only in chre_api
      1 #
      2 # CHRE API Version Makefile
      3 #
      4 # Defines the default version of CHRE to target.
      5 
      6 # Default CHRE API Version #####################################################
      7 
      8 PRINT_CURRENT_CHRE_API_VERSION_SRCS = $(CHRE_PREFIX)/build/print_current_chre_api_version.c
      9 PRINT_CURRENT_CHRE_API_VERSION_BIN = $(OUT)/print_current_chre_api_version
     10 CURRENT_CHRE_API_VERSION_MK = $(OUT)/current_chre_api_version.mk
     11 
     12 $(PRINT_CURRENT_CHRE_API_VERSION_BIN): $(PRINT_CURRENT_CHRE_API_VERSION_SRCS)
     13 	mkdir -p $(OUT)
     14 	$(CHRE_HOST_CC) -I$(CHRE_PREFIX)/chre_api/include/chre_api $^ -o $@
     15 
     16 $(CURRENT_CHRE_API_VERSION_MK): $(PRINT_CURRENT_CHRE_API_VERSION_BIN)
     17 	./$< > $@
     18 
     19 # Only include default version if this is not a clean operation.
     20 ifeq ($(filter clean, $(MAKECMDGOALS)),)
     21 include $(CURRENT_CHRE_API_VERSION_MK)
     22 endif
     23 
     24 # Target CHRE API Version ######################################################
     25 
     26 ifeq ($(CHRE_API_VERSION_MAJOR),)
     27 TARGET_CHRE_API_VERSION_MAJOR = $(DEFAULT_CHRE_API_VERSION_MAJOR)
     28 endif
     29 
     30 ifeq ($(CHRE_API_VERSION_MINOR),)
     31 TARGET_CHRE_API_VERSION_MINOR = $(DEFAULT_CHRE_API_VERSION_MINOR)
     32 endif
     33