nes-proj/arch/platform/simplelink/Makefile.simplelink

41 lines
1.5 KiB
Makefile
Raw Normal View History

2018-05-08 19:39:20 +00:00
################################################################################
### SimpleLink MCU platform makefile
2018-02-02 14:31:37 +00:00
2018-05-08 19:39:20 +00:00
################################################################################
### Sanity check of expected symbols
2018-05-08 19:39:20 +00:00
2018-02-02 14:31:37 +00:00
ifndef CONTIKI
2018-07-24 15:46:42 +00:00
$(error 'CONTIKI' not defined! You must specify where CONTIKI resides!)
2018-02-02 14:31:37 +00:00
endif
ifndef BOARD
2018-07-24 15:46:42 +00:00
$(error 'BOARD' not defined! You must specify which board you are using!)
endif
2018-05-08 19:39:20 +00:00
################################################################################
### Defines
2018-07-24 16:27:49 +00:00
SIMPLELINK_FAMILIES := cc13xx-cc26xx
2018-02-02 14:31:37 +00:00
2018-07-24 16:27:49 +00:00
# Given a SimpleLink family as argument, check if it has the Board file and if so return itself.
verify_family = $(shell [ -d $(CONTIKI)/arch/platform/simplelink/$(1)/$(BOARD) ] && echo $(1))
2018-07-24 16:27:49 +00:00
# Test each supported SimpleLink family and see if it contains the specified Board.
# Throw an error if it isn't found.
FAMILY := $(firstword $(foreach FAMILY, $(SIMPLELINK_FAMILIES), $(call verify_family,$(FAMILY))))
ifeq ($(FAMILY),)
$(error Board '$(BOARD)' does not corresponding to any SimpleLink family. Make sure your BOARD variable is correct.)
endif
FAMILY_PATH := $(realpath $(CONTIKI)/arch/platform/simplelink/$(FAMILY))
2018-02-02 14:31:37 +00:00
CLEAN += *.simplelink
### Include the Simplelink Family specific Makefile
include $(FAMILY_PATH)/Makefile.$(FAMILY)
################################################################################
# Display all supported SimpleLink Families
simplelink_families:
2018-07-24 16:27:49 +00:00
@echo "$(SIMPLELINK_FAMILIES) (current: $(FAMILY))"