Makefile.include: added target 'boards' to show the list of boards available for the current target

This commit is contained in:
Simon Duquennoy 2017-10-10 10:50:27 +02:00
parent 3117296ffc
commit 91b8ee860e
3 changed files with 44 additions and 39 deletions

View File

@ -42,39 +42,6 @@ ifdef CI
endif
endif
usage:
@echo "make MAKETARGETS... [TARGET=(TARGET)] [BOARD=(BOARD)] [savetarget] [targets]"
targets:
@ls -1 $(CONTIKI)/arch/platform $(TARGETDIRS)
savetarget:
-@rm -f Makefile.target
@echo "saving Makefile.target"
@echo >Makefile.target "TARGET = $(TARGET)"
ifneq ($(BOARD),)
@echo >>Makefile.target "BOARD = $(BOARD)"
endif
savedefines:
-@rm -f Makefile.$(TARGET).defines
@echo "saving Makefile.$(TARGET).defines"
@echo >Makefile.$(TARGET).defines "DEFINES = $(DEFINES)"
viewconf:
@echo "----------------- Make variables: --------------"
@echo "##### \"TARGET\": ________________________________ $(TARGET)"
@echo "##### \"BOARD\": _________________________________ $(BOARD)"
@echo "##### \"MAKE_MAC\": ______________________________ $(MAKE_MAC)"
@echo "##### \"MAKE_NET\": ______________________________ $(MAKE_NET)"
@echo "##### \"CONTIKI_WITH_RPL\": ______________________ $(CONTIKI_WITH_RPL)"
@echo "##### \"CONTIKI_WITH_RPL_LITE\": _________________ $(CONTIKI_WITH_RPL_LITE)"
@echo "----------------- C variables: -----------------"
$(Q)$(CC) $(CFLAGS) -E $(CONTIKI)/tools/viewconf.c | grep \#\#\#\#\#
@echo "------------------------------------------------"
@echo "To view more Make variables, edit $(CONTIKI)/Makefile.include, rule 'viewconf'"
@echo "To view more C variables, edit $(CONTIKI)/tools/viewconf.c"
OBJECTDIR = obj_$(TARGET)
LOWERCASE = -abcdefghijklmnopqrstuvwxyz/
@ -364,6 +331,46 @@ endif
%.flashprof: %.$(TARGET)
$(NM) -S -td --size-sort $< | grep -i " [t] " | cut -d' ' -f2,4
usage:
@echo "make MAKETARGETS... [TARGET=(TARGET)] [BOARD=(BOARD)] [savetarget] [targets]"
targets:
@ls $(CONTIKI)/arch/platform $(TARGETDIRS)
boards:
ifdef BOARD
@echo "$(BOARDS) (current: $(BOARD))"
else
@echo "Platform has no boards"
endif
savetarget:
-@rm -f Makefile.target
@echo "saving Makefile.target"
@echo >Makefile.target "TARGET = $(TARGET)"
ifneq ($(BOARD),)
@echo >>Makefile.target "BOARD = $(BOARD)"
endif
savedefines:
-@rm -f Makefile.$(TARGET).defines
@echo "saving Makefile.$(TARGET).defines"
@echo >Makefile.$(TARGET).defines "DEFINES = $(DEFINES)"
viewconf:
@echo "----------------- Make variables: --------------"
@echo "##### \"TARGET\": ________________________________ $(TARGET)"
@echo "##### \"BOARD\": _________________________________ $(BOARD)"
@echo "##### \"MAKE_MAC\": ______________________________ $(MAKE_MAC)"
@echo "##### \"MAKE_NET\": ______________________________ $(MAKE_NET)"
@echo "##### \"CONTIKI_WITH_RPL\": ______________________ $(CONTIKI_WITH_RPL)"
@echo "##### \"CONTIKI_WITH_RPL_LITE\": _________________ $(CONTIKI_WITH_RPL_LITE)"
@echo "----------------- C variables: -----------------"
$(Q)$(CC) $(CFLAGS) -E $(CONTIKI)/tools/viewconf.c | grep \#\#\#\#\#
@echo "------------------------------------------------"
@echo "To view more Make variables, edit $(CONTIKI)/Makefile.include, rule 'viewconf'"
@echo "To view more C variables, edit $(CONTIKI)/tools/viewconf.c"
# Don't treat %.$(TARGET) as an intermediate file because it is
# in fact the primary target.
.PRECIOUS: %.$(TARGET)

View File

@ -5,9 +5,8 @@ ifndef CONTIKI
endif
### Board and BSP selection
ifeq ($(BOARD),)
BOARD=srf06/cc26xx
endif
BOARD ?= srf06/cc26xx
BOARDS = srf06/cc26xx srf06/cc13xx launchpad/cc26xx launchpad/cc13xx sensortag/cc26xx sensortag/cc13xx
CONTIKI_TARGET_DIRS += .

View File

@ -5,9 +5,8 @@ ifndef CONTIKI
endif
### If no board is specified the default option is the RE-Mote revision B
ifeq ($(BOARD),)
BOARD = remote-revb
endif
BOARD ?= remote-revb
BOARDS = remote-reva remote-revb firefly-reva firefly orion
### As previously the RE-Mote revision A was plainly defined as remote, keep for
### backward compatibility