2018-05-08 19:39:20 +00:00
|
|
|
################################################################################
|
2018-05-28 11:17:01 +00:00
|
|
|
### SimpleLink MCU platform makefile
|
2018-02-02 14:31:37 +00:00
|
|
|
|
2018-05-08 19:39:20 +00:00
|
|
|
################################################################################
|
2018-05-28 11:17:01 +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
|
|
|
|
|
2018-05-28 11:17:01 +00:00
|
|
|
ifndef BOARD
|
2018-07-24 15:46:42 +00:00
|
|
|
$(error 'BOARD' not defined! You must specify which board you are using!)
|
2018-02-06 13:30:50 +00:00
|
|
|
endif
|
|
|
|
|
2018-05-08 19:39:20 +00:00
|
|
|
################################################################################
|
2018-05-28 11:17:01 +00:00
|
|
|
### Defines
|
2018-02-16 15:55:39 +00:00
|
|
|
|
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-05-28 11:17:01 +00:00
|
|
|
|
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.)
|
2018-05-28 11:17:01 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
FAMILY_PATH := $(realpath $(CONTIKI)/arch/platform/simplelink/$(FAMILY))
|
2018-02-02 14:31:37 +00:00
|
|
|
|
|
|
|
CLEAN += *.simplelink
|
|
|
|
|
2018-05-28 11:17:01 +00:00
|
|
|
### 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))"
|