diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2012-06-07 01:18:01 -0400 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2012-06-07 03:40:08 -0400 |
commit | 8652d6c517d18422a4e02fdc125c7b13787af709 (patch) | |
tree | 32d714f97cb6d3de3cd62a2c78dfd9e5936584ea | |
parent | 9d5c8a6b9a880db7d41fdd0fcf29f7d0eac823fd (diff) | |
download | librambutan-8652d6c517d18422a4e02fdc125c7b13787af709.tar.gz librambutan-8652d6c517d18422a4e02fdc125c7b13787af709.zip |
Makefile: add list-boards target.
As the number of boards increases, it's less practical to keep a list
of them in the help target output (notice also that some have been
forgotten). This target can't get out of date unless we change how the
board-includes/ directory works.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | support/make/target-config.mk | 2 |
2 files changed, 7 insertions, 2 deletions
@@ -19,6 +19,7 @@ SUPPORT_PATH := $(SRCROOT)/support LDDIR := $(SUPPORT_PATH)/ld # Support files for this Makefile MAKEDIR := $(SUPPORT_PATH)/make +BOARD_INCLUDE_DIR := $(MAKEDIR)/board-includes ## ## Target-specific configuration. This determines some compiler and @@ -92,7 +93,7 @@ $(foreach m,$(LIBMAPLE_MODULES),$(eval $(call LIBMAPLE_MODULE_template,$(m)))) # main target include $(SRCROOT)/build-targets.mk -.PHONY: install sketch clean help debug cscope tags ctags ram flash jtag doxygen mrproper +.PHONY: install sketch clean help debug cscope tags ctags ram flash jtag doxygen mrproper list-boards # Target upload commands # USB ID for DFU upload -- FIXME: do something smarter with this @@ -182,3 +183,7 @@ jtag: doxygen: doxygen $(SUPPORT_PATH)/doxygen/Doxyfile + +# This output is kind of ugly, but I don't understand make very well. +list-boards: + @echo " $(addsuffix "\\n",$(basename $(notdir $(wildcard $(BOARD_INCLUDE_DIR)/*.mk))))" diff --git a/support/make/target-config.mk b/support/make/target-config.mk index e13504d..a04ca38 100644 --- a/support/make/target-config.mk +++ b/support/make/target-config.mk @@ -5,7 +5,7 @@ TARGET_FLAGS := # Board-specific configuration values. Punt these to board-specific # include files. -include $(MAKEDIR)/board-includes/$(BOARD).mk +include $(BOARD_INCLUDE_DIR)/$(BOARD).mk TARGET_FLAGS += -DBOARD_$(BOARD) -DMCU_$(MCU) \ -DERROR_LED_PORT=$(ERROR_LED_PORT) \ |