diff --git a/Makefile b/Makefile index ca0ccbee60f7e8d084b336471be75cf45756323f..dcf2fb6a16605b81d6b8682bd237cb3f32bcac70 100644 --- a/Makefile +++ b/Makefile @@ -37,4 +37,4 @@ welcome: @echo "Or ask questions on our mailing list:" @echo " users@riot-os.org (http://lists.riot-os.org/mailman/listinfo/users)" --include Makefile.tests +-include makefiles/tests.inc.mk diff --git a/Makefile.include b/Makefile.include index 3c19baad5d823333e142215cd46ae3e701569952..902a30950aba1d9cd46db761f403328358e6fc56 100644 --- a/Makefile.include +++ b/Makefile.include @@ -8,6 +8,7 @@ RIOTBASE ?= $(dir $(lastword $(MAKEFILE_LIST))) CCACHE_BASEDIR ?= $(RIOTBASE) RIOTCPU ?= $(RIOTBASE)/cpu RIOTBOARD ?= $(RIOTBASE)/boards +RIOTMAKE ?= $(RIOTBASE)/makefiles RIOTPKG ?= $(RIOTBASE)/pkg RIOTPROJECT ?= $(shell git rev-parse --show-toplevel 2>/dev/null || pwd) GITCACHE ?= $(RIOTBASE)/dist/tools/git/git-cache @@ -16,13 +17,27 @@ BINDIRBASE ?= $(APPDIR)/bin BINDIR ?= $(BINDIRBASE)/$(BOARD) PKGDIRBASE ?= $(BINDIRBASE)/pkg/$(BOARD) -__DIRECTORY_VARIABLES := RIOTBASE CCACHE_BASEDIR RIOTCPU RIOTBOARD RIOTPKG GITCACHE RIOTPROJECT APPDIR BINDIRBASE BINDIR PKGDIRBASE +__DIRECTORY_VARIABLES := \ + RIOTBASE \ + RIOTCPU \ + RIOTBOARD \ + RIOTMAKE \ + RIOTPKG \ + RIOTPROJECT \ + APPDIR \ + BINDIRBASE \ + BINDIR \ + CCACHE_BASEDIR \ + GITCACHE \ + PKGDIRBASE \ + # # Make all paths absolute. override RIOTBASE := $(abspath $(RIOTBASE)) override CCACHE_BASEDIR := $(abspath $(CCACHE_BASEDIR)) override RIOTCPU := $(abspath $(RIOTCPU)) override RIOTBOARD := $(abspath $(RIOTBOARD)) +override RIOTMAKE := $(abspath $(RIOTMAKE)) override RIOTPKG := $(abspath $(RIOTPKG)) override RIOTPROJECT := $(abspath $(RIOTPROJECT)) override GITCACHE := $(abspath $(GITCACHE)) @@ -47,10 +62,10 @@ BUILDRELPATH ?= ${PWD:${RIOTPROJECT}/%=%}/ # Include Docker settings near the top because we need to build the environment # command line before some of the variable origins are overwritten below when # using abspath, strip etc. -include $(RIOTBASE)/Makefile.docker +include $(RIOTMAKE)/docker.inc.mk # Static code analysis tools provided by LLVM -include $(RIOTBASE)/Makefile.scan-build +include $(RIOTMAKE)/scan-build.inc.mk export RIOTBUILD_CONFIG_HEADER_C = $(BINDIR)/riotbuild/riotbuild.h @@ -190,13 +205,13 @@ INCLUDES += -I$(RIOTCPU)/$(CPU)/include INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include # mandatory includes! -include $(RIOTBASE)/Makefile.pseudomodules -include $(RIOTBASE)/Makefile.defaultmodules +include $(RIOTMAKE)/pseudomodules.inc.mk +include $(RIOTMAKE)/defaultmodules.inc.mk include $(RIOTBOARD)/$(BOARD)/Makefile.include include $(RIOTCPU)/$(CPU)/Makefile.include # Import all toolchain settings -include $(RIOTCPU)/Makefile.include.$(TOOLCHAIN) +include $(RIOTMAKE)/toolchain/$(TOOLCHAIN).inc.mk # get number of interfaces straight before resolving dependencies GNRC_NETIF_NUMOF ?= 1 @@ -239,7 +254,7 @@ ifneq (0, $(shell mkdir -p $(BINDIR); $(AR) rc $(BINDIR)/empty-archive.a 2> /dev endif # Feature test default CFLAGS and LINKFLAGS for the set compiled. -include $(RIOTBASE)/Makefile.cflags +include $(RIOTMAKE)/cflags.inc.mk # make the RIOT version available to the program ifeq ($(origin RIOT_VERSION), undefined) @@ -279,7 +294,7 @@ all: ..in-docker-container else ## make script for your application. Build RIOT-base here! all: ..compiler-check ..build-message $(RIOTBUILD_CONFIG_HEADER_C) $(USEPKG:%=${BINDIR}/%.a) $(APPDEPS) - $(Q)DIRS="$(DIRS)" "$(MAKE)" -C $(APPDIR) -f $(RIOTBASE)/Makefile.application + $(Q)DIRS="$(DIRS)" "$(MAKE)" -C $(APPDIR) -f $(RIOTMAKE)/application.inc.mk ifeq (,$(RIOTNOLINK)) ifeq ($(BUILDOSXNATIVE),1) $(Q)$(if $(CPPMIX),$(CXX),$(LINK)) $(UNDEF) -o $(ELFFILE) $$(find $(BASELIBS) -size +8c) $(LINKFLAGS) $(LINKFLAGPREFIX)-no_pie @@ -407,13 +422,13 @@ $(CURDIR)/eclipsesym.xml: $(RIOTBASE)/dist/tools/eclipsesym/cmdline2xml.sh > $@ # Extra make goals for testing and comparing changes. -include $(RIOTBASE)/Makefile.buildtests +include $(RIOTMAKE)/buildtests.inc.mk # process provided features -include $(RIOTBASE)/Makefile.features +include $(RIOTMAKE)/features.inc.mk # Export variables used throughout the whole make system: -include $(RIOTBASE)/Makefile.vars +include $(RIOTMAKE)/vars.inc.mk # Warn if the selected board and drivers don't provide all needed features: ifneq (, $(filter all, $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all))) @@ -517,10 +532,10 @@ endif include $(RIOTBASE)/dist/tools/desvirt/Makefile.desvirt # include bindist target -include $(RIOTBASE)/Makefile.bindist +include $(RIOTMAKE)/bindist.inc.mk # Add all USEMODULE modules to CFLAGS -include $(RIOTBASE)/Makefile.modules +include $(RIOTMAKE)/modules.inc.mk # Build a header file with all common macro definitions and undefinitions # make it phony to force re-run of the script every time even if the file exists diff --git a/boards/airfy-beacon/Makefile.include b/boards/airfy-beacon/Makefile.include index 14eaf500140682e889ceb5a65231a07a2f0846ee..759cf37a4df56fb2e480efe7aa68dd1ca878d25a 100644 --- a/boards/airfy-beacon/Makefile.include +++ b/boards/airfy-beacon/Makefile.include @@ -7,7 +7,7 @@ PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/arduino-due/Makefile.include b/boards/arduino-due/Makefile.include index 08c0eefea7ca3f1137ade50161c70ede07a01fcb..a943e194c3cc2eba5c6f7c9ba9e4f3ccb26ef031 100644 --- a/boards/arduino-due/Makefile.include +++ b/boards/arduino-due/Makefile.include @@ -11,4 +11,4 @@ export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh export OFLAGS = -O binary # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk diff --git a/boards/arduino-zero/Makefile.include b/boards/arduino-zero/Makefile.include index 83a0716a484fc8d72a6eaa053074181c5bd4837b..d8a948a8074efaaaab3fe510b130428c3751a2d3 100644 --- a/boards/arduino-zero/Makefile.include +++ b/boards/arduino-zero/Makefile.include @@ -7,7 +7,7 @@ export PORT_LINUX ?= /dev/ttyACM0 export PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # Add board selector (USB serial) to OpenOCD options if specified. # Use /dist/tools/usb-serial/list-ttys.sh to find out serial number. @@ -22,4 +22,4 @@ ifneq (,$(SERIAL)) endif # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/calliope-mini/Makefile.include b/boards/calliope-mini/Makefile.include index d9c05ab559bc9ea96ab5eba6e8f24119dca292c9..3d131cdeda0459d29d45035f1df8b4169042ce35 100644 --- a/boards/calliope-mini/Makefile.include +++ b/boards/calliope-mini/Makefile.include @@ -7,7 +7,7 @@ PORT_LINUX ?= /dev/ttyACM0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # we support flashing through plain fscopy or using JLink FLASHTOOL ?= fscopy @@ -22,7 +22,7 @@ ifeq (fscopy,$(FLASHTOOL)) export DEBUGSERVER = else ifeq (jlink,$(FLASHTOOL)) export JLINK_DEVICE := nrf51822 - include $(RIOTBOARD)/Makefile.include.jlink + include $(RIOTMAKE)/tools/jlink.inc.mk else $(info ERROR: invalid flash tool specified) endif diff --git a/boards/cc2538dk/Makefile.include b/boards/cc2538dk/Makefile.include index d1352658650fa87bdc7bf365655fa8ad68a9cd51..ccdd448d0eaacbee97bd43619bdcdad6d9b83988 100644 --- a/boards/cc2538dk/Makefile.include +++ b/boards/cc2538dk/Makefile.include @@ -9,7 +9,7 @@ export PROGRAMMER_SERIAL ?= 06EB # the debug UART is always the second tty with the matching serial number: PORT_LINUX ?= $(word 2,$(shell $(RIOTBASE)/dist/tools/usb-serial/find-tty.sh '^$(PROGRAMMER_SERIAL)')) PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*))) -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # debugger config export DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh diff --git a/boards/cc2650stk/Makefile.include b/boards/cc2650stk/Makefile.include index aecba3b4f00cad1f07ca0cfd78ac39ad5f774bf2..25258b561424982a4b183673d8563162b6aea620 100644 --- a/boards/cc2650stk/Makefile.include +++ b/boards/cc2650stk/Makefile.include @@ -7,7 +7,7 @@ PORT_LINUX ?= /dev/ttyACM0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # configure the flash tool export UNIFLASH_PATH ?= "UNIFLASH_PATH unconfigured" diff --git a/boards/ek-lm4f120xl/Makefile.include b/boards/ek-lm4f120xl/Makefile.include index 373406db2e4a5bd04d8b6741d94a74428f0c4aa7..d29ea94951a2bc4a2d9df8ba9350a35743211cc7 100644 --- a/boards/ek-lm4f120xl/Makefile.include +++ b/boards/ek-lm4f120xl/Makefile.include @@ -7,7 +7,7 @@ PORT_LINUX ?= /dev/ttyACM0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/f4vi1/Makefile.include b/boards/f4vi1/Makefile.include index 19d12fd50ec9a268e25699846d6dac8cecd53d02..7ddb27bf609f2c8219f9aec36ccfb96f1fb4951b 100644 --- a/boards/f4vi1/Makefile.include +++ b/boards/f4vi1/Makefile.include @@ -7,7 +7,7 @@ PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # st-flash export FLASHER = st-flash diff --git a/boards/fox/Makefile.include b/boards/fox/Makefile.include index d7955baeaa0ef68eb86d2f787c2692125d25bac1..30ea92248759a70b9b185c180db253e4c0596060 100644 --- a/boards/fox/Makefile.include +++ b/boards/fox/Makefile.include @@ -4,10 +4,10 @@ export CPU_MODEL = stm32f103re # set default port depending on operating system PORT_LINUX ?= /dev/ttyUSB1 -PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*B))) +PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/frdm-k64f/Makefile.include b/boards/frdm-k64f/Makefile.include index 8e063b292efde1f85fe0cbcc58b2d5494822c5c4..e624601ea00b525a96c1eb31294363e349fd48e1 100644 --- a/boards/frdm-k64f/Makefile.include +++ b/boards/frdm-k64f/Makefile.include @@ -24,7 +24,7 @@ export OPENOCD_EXTRA_INIT export PRE_FLASH_CHECK_SCRIPT = $(RIOTCPU)/kinetis_common/dist/check-fcfield-elf.sh # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/iotlab-common/Makefile.include b/boards/iotlab-common/Makefile.include index 43974f6d6e5a997fb2ef04246c6ab882ce38ac6d..93260391c7c07d5e9f2da9360af009b4daf4e092 100644 --- a/boards/iotlab-common/Makefile.include +++ b/boards/iotlab-common/Makefile.include @@ -8,10 +8,10 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*B))) # setup serial terminal export BAUD = 500000 -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk # add the common header files to the include path INCLUDES += -I$(RIOTBOARD)/iotlab-common/include diff --git a/boards/limifrog-v1/Makefile.include b/boards/limifrog-v1/Makefile.include index 40636539362b8fa8a9b5cf5be938807dd9ec93e2..1855b1f352cb61bd62a6db524a890cf91ba29bde 100644 --- a/boards/limifrog-v1/Makefile.include +++ b/boards/limifrog-v1/Makefile.include @@ -7,7 +7,7 @@ PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/maple-mini/Makefile.include b/boards/maple-mini/Makefile.include index 9ca99b8298e298310e0a21ffae95ac42e284c7cb..ba4a3e1b7528a5133a75d2efff4e6c777e851126 100644 --- a/boards/maple-mini/Makefile.include +++ b/boards/maple-mini/Makefile.include @@ -7,7 +7,7 @@ PORT_LINUX ?= /dev/ttyACM0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/mbed_lpc1768/Makefile.include b/boards/mbed_lpc1768/Makefile.include index e6c64263cb4c7c03f427eedfa3236c533e79b97f..58f1721a7bd18dabd9ed3a5b8cf37fde9e434fbc 100644 --- a/boards/mbed_lpc1768/Makefile.include +++ b/boards/mbed_lpc1768/Makefile.include @@ -15,4 +15,4 @@ PORT_LINUX ?= /dev/ttyACM0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk diff --git a/boards/microbit/Makefile.include b/boards/microbit/Makefile.include index 57822ccd2a7c297fa1700dfbb78b60d414feadb7..4c566a29d4534089327cd96751886ed7944d89be 100644 --- a/boards/microbit/Makefile.include +++ b/boards/microbit/Makefile.include @@ -7,7 +7,7 @@ PORT_LINUX ?= /dev/ttyACM0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # we support flashing through plain fscopy or using JLink FLASHTOOL ?= fscopy @@ -22,7 +22,7 @@ ifeq (fscopy,$(FLASHTOOL)) export DEBUGSERVER = else ifeq (jlink,$(FLASHTOOL)) export JLINK_DEVICE := nrf51822 - include $(RIOTBOARD)/Makefile.include.jlink + include $(RIOTMAKE)/tools/jlink.inc.mk else $(info ERROR: invalid flash tool specified) endif diff --git a/boards/msb-430-common/Makefile.include b/boards/msb-430-common/Makefile.include index 71bc5200b909b683df530cff8eab1c93723cde6a..51ed1df09a27f72b44d85755e7b486930d49b627 100644 --- a/boards/msb-430-common/Makefile.include +++ b/boards/msb-430-common/Makefile.include @@ -6,7 +6,7 @@ export CPU_MODEL = msp430f1612 PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # setup flash tool export OFLAGS = -O ihex diff --git a/boards/msbiot/Makefile.include b/boards/msbiot/Makefile.include index 1df898f14cf5db6e207ccbb5019998b986fe2768..d87c020ab07457e09e78c3af8349952c74b7a361 100644 --- a/boards/msbiot/Makefile.include +++ b/boards/msbiot/Makefile.include @@ -7,7 +7,7 @@ PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/mulle/Makefile.include b/boards/mulle/Makefile.include index 67890b37f59698375819af2876e167b7bf1b4192..a4bb2aca4cfc06662f9dd72ff591e38d130dc60b 100644 --- a/boards/mulle/Makefile.include +++ b/boards/mulle/Makefile.include @@ -111,7 +111,7 @@ flash: $(RIOTCPU)/kinetis_common/dist/wdog-disable.bin .DEFAULT_GOAL := # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk diff --git a/boards/nrf51dongle/Makefile.include b/boards/nrf51dongle/Makefile.include index 53810879fd45ebb1429e96c04b4fb7fcec7ed1fb..089340c484e10f670bd8b2a361afbac7efda51ea 100644 --- a/boards/nrf51dongle/Makefile.include +++ b/boards/nrf51dongle/Makefile.include @@ -8,7 +8,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup JLink for flashing export JLINK_DEVICE := nrf51822 -include $(RIOTBOARD)/Makefile.include.jlink +include $(RIOTMAKE)/tools/jlink.inc.mk # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk diff --git a/boards/nrf52dk/Makefile.include b/boards/nrf52dk/Makefile.include index b646f3e6fd8f2394d6d2b39f949597714382a308..40df3b3f96cc17687a1a570ad379ccf30375139c 100644 --- a/boards/nrf52dk/Makefile.include +++ b/boards/nrf52dk/Makefile.include @@ -15,7 +15,7 @@ export JLINK_PRE_FLASH := erase\nloadfile $(BINDIR)/softdevice.hex export JLINK_FLASH_ADDR := 0x1f000 export LINKER_SCRIPT ?= $(RIOTCPU)/$(CPU)/ldscripts/$(CPU_MODEL)_sd.ld endif -include $(RIOTBOARD)/Makefile.include.jlink +include $(RIOTMAKE)/tools/jlink.inc.mk # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk diff --git a/boards/nrf6310/Makefile.include b/boards/nrf6310/Makefile.include index 6db9e3a7bd61063aa3992931b10983ada8653d6d..7a1e1dec76faa4e71d68230358b10f47e30b6695 100644 --- a/boards/nrf6310/Makefile.include +++ b/boards/nrf6310/Makefile.include @@ -20,4 +20,4 @@ export DEBUGGER_FLAGS = $(BINDIR) $(ELFFILE) export RESET_FLAGS = $(BINDIR) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk diff --git a/boards/nucleo-common/Makefile.include.serial b/boards/nucleo-common/Makefile.include.serial index 781d8d0a46b22d32e77e9c5465acfb0b3735242a..1c5e4d00d0ba320164b84f311776e3595553f4cb 100644 --- a/boards/nucleo-common/Makefile.include.serial +++ b/boards/nucleo-common/Makefile.include.serial @@ -3,7 +3,7 @@ PORT_LINUX ?= /dev/ttyACM0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/opencm904/Makefile.include b/boards/opencm904/Makefile.include index 4c1dfda5de64937bd9860c9ad906ee5967d9e985..18b0b6cffa421ce5c52de5988a0e613146f35b4c 100755 --- a/boards/opencm904/Makefile.include +++ b/boards/opencm904/Makefile.include @@ -20,4 +20,4 @@ PORT_LINUX ?= /dev/ttyACM0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk diff --git a/boards/openmote-cc2538/Makefile.include b/boards/openmote-cc2538/Makefile.include index f4eb8415a48c78dbd5e0f1223d803beb89243154..549c7476f88e98629226d55a62520012843ed96d 100644 --- a/boards/openmote-cc2538/Makefile.include +++ b/boards/openmote-cc2538/Makefile.include @@ -15,7 +15,7 @@ ifeq ($(PROGRAMMER),jlink) export JLINK_FLASH_ADDR := 200000 export JLINK_IF := JTAG export TUI := 1 - include $(RIOTBOARD)/Makefile.include.jlink + include $(RIOTMAKE)/tools/jlink.inc.mk else export OFLAGS = -O binary export HEXFILE = $(ELFFILE:.elf=.bin) @@ -24,4 +24,4 @@ else endif # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk diff --git a/boards/pba-d-01-kw2x/Makefile.include b/boards/pba-d-01-kw2x/Makefile.include index 3340ebf4196ba0c549b7e35d36da86ac68b33305..97d6a7192be771cbfaee75542014588347660040 100644 --- a/boards/pba-d-01-kw2x/Makefile.include +++ b/boards/pba-d-01-kw2x/Makefile.include @@ -40,7 +40,7 @@ ifneq (,$(SERIAL)) endif # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/pca10000/Makefile.include b/boards/pca10000/Makefile.include index 7b11716814e57b2fb9d4f5b7d5edb146353dffa4..55826907c0bbda50f15bd6d2475be603048b8118 100644 --- a/boards/pca10000/Makefile.include +++ b/boards/pca10000/Makefile.include @@ -9,7 +9,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup JLink for flashing export JLINK_DEVICE := nrf51822 export JLINK_PRE_FLASH := w4 4001e504 1 -include $(RIOTBOARD)/Makefile.include.jlink +include $(RIOTMAKE)/tools/jlink.inc.mk # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk diff --git a/boards/pca10005/Makefile.include b/boards/pca10005/Makefile.include index 202562d2d31690f98e42c69ef2ae51aee04af5a9..4c62ef1f6b93d07d012215000bf53e69c527c3e3 100644 --- a/boards/pca10005/Makefile.include +++ b/boards/pca10005/Makefile.include @@ -9,7 +9,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup JLink for flashing export JLINK_DEVICE := nrf51822 export JLINK_PRE_FLASH := w4 4001e504 1 -include $(RIOTBOARD)/Makefile.include.jlink +include $(RIOTMAKE)/tools/jlink.inc.mk # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk diff --git a/boards/remote-common/Makefile.include b/boards/remote-common/Makefile.include index b6901b8d89dc6f25ef02236371f49d0c692525c1..9f3e9fca7621b54d86b60a8bcd18816c9650ce8e 100644 --- a/boards/remote-common/Makefile.include +++ b/boards/remote-common/Makefile.include @@ -32,4 +32,4 @@ export OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb export INCLUDES += -I$(RIOTBOARD)/remote-common/include # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk diff --git a/boards/saml21-xpro/Makefile.include b/boards/saml21-xpro/Makefile.include index fb6a6119fce8cc6ebe0913c68c2e7667279c2ae8..c96d71bec7df93cb13e91e789d90e54b461723f1 100644 --- a/boards/saml21-xpro/Makefile.include +++ b/boards/saml21-xpro/Makefile.include @@ -5,7 +5,7 @@ export CFLAGS += -D__SAML21J18A__ # setup serial terminal PORT_LINUX ?= /dev/ttyACM0 -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/samr21-xpro/Makefile.include b/boards/samr21-xpro/Makefile.include index 3502134f1a63b518b9faed73d3dc8c4d329d6471..7f68e0eaa1bf70cfefc92dba352578d9d2d12274 100644 --- a/boards/samr21-xpro/Makefile.include +++ b/boards/samr21-xpro/Makefile.include @@ -7,7 +7,7 @@ PORT_LINUX ?= /dev/ttyACM0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # Add board selector (USB serial) to OpenOCD options if specified. # Use /dist/tools/usb-serial/list-ttys.sh to find out serial number. @@ -22,4 +22,4 @@ ifneq (,$(SERIAL)) endif # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/seeeduino_arch-pro/Makefile.include b/boards/seeeduino_arch-pro/Makefile.include index ae3f48f8e76450da28405ac0f3aadd3a9889c2dd..73f97a001bc841470b5050809e095a8e8610660d 100644 --- a/boards/seeeduino_arch-pro/Makefile.include +++ b/boards/seeeduino_arch-pro/Makefile.include @@ -6,10 +6,10 @@ PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk # generate image checksum from hex file export PRE_FLASH_CHECK_SCRIPT = lpc_checksum --format hex diff --git a/boards/slwstk6220a/Makefile.include b/boards/slwstk6220a/Makefile.include index 991661748adf4128b1d919d64db5d10fb577c9fa..1fb937e0d046c6612ba909a966bbd32d630aed3b 100644 --- a/boards/slwstk6220a/Makefile.include +++ b/boards/slwstk6220a/Makefile.include @@ -8,7 +8,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) # setup JLink for flashing export JLINK_DEVICE := ezr32wg330f256 -include $(RIOTBOARD)/Makefile.include.jlink +include $(RIOTMAKE)/tools/jlink.inc.mk # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk diff --git a/boards/sodaq-autonomo/Makefile.include b/boards/sodaq-autonomo/Makefile.include index 8949df181a61402c5c5309d1d3abff02f449bcd3..83eb6a03145a31fc84c0da502131f9afabc50654 100644 --- a/boards/sodaq-autonomo/Makefile.include +++ b/boards/sodaq-autonomo/Makefile.include @@ -9,7 +9,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) export OFLAGS = -O binary # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # Add board selector (USB serial) to OpenOCD options if specified. # Use /dist/tools/usb-serial/list-ttys.sh to find out serial number. @@ -24,4 +24,4 @@ ifneq (,$(SERIAL)) endif # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/spark-core/Makefile.include b/boards/spark-core/Makefile.include index 7ff46a018372d0cd0d4ed4b2bc136e5a3b916f66..0710da46ef6024c950b2678a4d1c4c8839df0360 100644 --- a/boards/spark-core/Makefile.include +++ b/boards/spark-core/Makefile.include @@ -22,7 +22,7 @@ export TERMFLAGS = -p $(PORT) export INCLUDES += -I$(RIOTCPU)/$(CPU)/include/ -I$(RIOTBOARD)/$(BOARD)/include/ # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/stm32f0discovery/Makefile.include b/boards/stm32f0discovery/Makefile.include index f0a04d1444c6bebedfc5af05fe295c090d89ab83..628b16fa30e659d6325cb93ca610523103ee9dd7 100644 --- a/boards/stm32f0discovery/Makefile.include +++ b/boards/stm32f0discovery/Makefile.include @@ -7,7 +7,7 @@ PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/stm32f3discovery/Makefile.include b/boards/stm32f3discovery/Makefile.include index 4389d6e7d91828eb303c70c53e993d375320a671..6e6ca2a41996ea8f2136fa4d37a9da4ad0865173 100644 --- a/boards/stm32f3discovery/Makefile.include +++ b/boards/stm32f3discovery/Makefile.include @@ -7,7 +7,7 @@ PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/stm32f4discovery/Makefile.include b/boards/stm32f4discovery/Makefile.include index 221cfa97578b492a6dace82dbfb196b6bb0dc4f0..def388e08d6f856d1ac964dcefcad6a28b626a90 100644 --- a/boards/stm32f4discovery/Makefile.include +++ b/boards/stm32f4discovery/Makefile.include @@ -7,7 +7,7 @@ PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/telosb/Makefile.include b/boards/telosb/Makefile.include index c84cacd0bd533a50ef9cf2757aa8e047a4e18abc..7d062b427460cbf07a7673ef80aab9bcb5505732 100644 --- a/boards/telosb/Makefile.include +++ b/boards/telosb/Makefile.include @@ -7,7 +7,7 @@ PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial-MXV*))) # setup serial terminal export BAUD ?= 9600 -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # flash tool configuration export OFLAGS = -O ihex diff --git a/boards/udoo/Makefile.include b/boards/udoo/Makefile.include index c732861485264c73513677bcf7b029195dc79b01..f566c727b51805a2d88130b3f489a0163f66ac55 100644 --- a/boards/udoo/Makefile.include +++ b/boards/udoo/Makefile.include @@ -21,4 +21,4 @@ export OFLAGS = -O binary export FFLAGS = -R -e -w -v -b bin/$(BOARD)/$(APPLICATION).hex # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk diff --git a/boards/weio/Makefile.include b/boards/weio/Makefile.include index 766053b7ca91e37052e56b775187205cdbc6bed8..188b5a13021f5ae64e12633bbf7e081361884888 100644 --- a/boards/weio/Makefile.include +++ b/boards/weio/Makefile.include @@ -15,4 +15,4 @@ PORT_LINUX ?= /dev/ttyACM0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk diff --git a/boards/wsn430-common/Makefile.include b/boards/wsn430-common/Makefile.include index 9daf460eb24af5f4024f44c164f7e29a30acaf80..024d09c76785a751e212cbcdd60fa2bd6d5c4b76 100644 --- a/boards/wsn430-common/Makefile.include +++ b/boards/wsn430-common/Makefile.include @@ -6,7 +6,7 @@ export CPU_MODEL = msp430f1611 PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # setup flash tool export OFLAGS = -O ihex diff --git a/boards/yunjia-nrf51822/Makefile.include b/boards/yunjia-nrf51822/Makefile.include index 14eaf500140682e889ceb5a65231a07a2f0846ee..759cf37a4df56fb2e480efe7aa68dd1ca878d25a 100644 --- a/boards/yunjia-nrf51822/Makefile.include +++ b/boards/yunjia-nrf51822/Makefile.include @@ -7,7 +7,7 @@ PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # this board uses openocd -include $(RIOTBOARD)/Makefile.include.openocd +include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/z1/Makefile.include b/boards/z1/Makefile.include index fa3dea543cba47481ce1c9fbec6482c659c3d6d4..a215e48f14ffe4bf4f887d15512b9122933f2566 100644 --- a/boards/z1/Makefile.include +++ b/boards/z1/Makefile.include @@ -6,7 +6,7 @@ export CPU_MODEL = msp430f2617 PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal -include $(RIOTBOARD)/Makefile.include.serial +include $(RIOTMAKE)/tools/serial.inc.mk # setup flash tool export OFLAGS = -O ihex diff --git a/cpu/cc2538/Makefile.include b/cpu/cc2538/Makefile.include index 3c829bccf014286dc40a209526ea9e9c8058474d..bc93aaa0ebb0e61fe3ef740cf7d1c77aa9594a72 100644 --- a/cpu/cc2538/Makefile.include +++ b/cpu/cc2538/Makefile.include @@ -3,4 +3,4 @@ export CPU_ARCH := cortex-m3 # include common SPI functions USEMODULE += periph_common -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/cc26x0/Makefile.include b/cpu/cc26x0/Makefile.include index 507f47d21b0db8d52986d51ce0588500b83a8966..7a03b807df956897a169f8153e5406db20f6e9bf 100644 --- a/cpu/cc26x0/Makefile.include +++ b/cpu/cc26x0/Makefile.include @@ -1,3 +1,3 @@ export CPU_ARCH := cortex-m3 -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/ezr32wg/Makefile.include b/cpu/ezr32wg/Makefile.include index eb5d45d59681fbeb1485b5a6d495372f40d57a1c..1e08098b245c79a7953751af5d0e02d3b708662b 100644 --- a/cpu/ezr32wg/Makefile.include +++ b/cpu/ezr32wg/Makefile.include @@ -1,3 +1,3 @@ export CPU_ARCH = cortex-m4f -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/k60/Makefile.include b/cpu/k60/Makefile.include index a71bcf13c52eff31c8a11265f0ee122799b04ce7..7864add139fefc9e56636f536ed1ddea6048f3f5 100644 --- a/cpu/k60/Makefile.include +++ b/cpu/k60/Makefile.include @@ -22,4 +22,4 @@ export COMMON_STARTUP = $(KINETIS_COMMON) export UNDEF += $(BINDIR)/cpu/vectors.o export UNDEF += $(BINDIR)/cpu/ssp.o -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/k64f/Makefile.include b/cpu/k64f/Makefile.include index fd234523cc4d1eb00bf1cff6c48c273334755f30..1ef70e6970b23ad0b506a6021577a67aec5ed074 100644 --- a/cpu/k64f/Makefile.include +++ b/cpu/k64f/Makefile.include @@ -21,4 +21,4 @@ export COMMON_STARTUP = $(KINETIS_COMMON) # add the CPU specific system calls implementations for the linker export UNDEF += $(BINDIR)/cpu/vectors.o -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/kw2x/Makefile.include b/cpu/kw2x/Makefile.include index 76e3daea5db17d02029358441ba4d7cd1437c610..e194a2124d04f6c82ee8b7d56aa7d97e4932d670 100644 --- a/cpu/kw2x/Makefile.include +++ b/cpu/kw2x/Makefile.include @@ -21,4 +21,4 @@ export COMMON_STARTUP = $(KINETIS_COMMON) # add the CPU specific system calls implementations for the linker export UNDEF += $(BINDIR)/cpu/vectors.o -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/lm4f120/Makefile.include b/cpu/lm4f120/Makefile.include index 50e87844f2965383554376e75e22df65caca1114..e038dd686daf0b0319492a87ef8c75c748ac35d5 100644 --- a/cpu/lm4f120/Makefile.include +++ b/cpu/lm4f120/Makefile.include @@ -1,4 +1,4 @@ export CPU_ARCH = cortex-m4f -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk include $(RIOTCPU)/stellaris_common/Makefile diff --git a/cpu/lpc11u34/Makefile.include b/cpu/lpc11u34/Makefile.include index 04c2fd5dd48ad8ff4ded99db92016deabfa7f65f..26110583850bdfa4c9eb6cf373c5d74bd12dfccb 100644 --- a/cpu/lpc11u34/Makefile.include +++ b/cpu/lpc11u34/Makefile.include @@ -1,3 +1,3 @@ export CPU_ARCH = cortex-m0 -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/lpc1768/Makefile.include b/cpu/lpc1768/Makefile.include index f16ada89b8a34e692df905a764fedbb1d10cac64..259ee2a90e08c6472fe9fcec01b78c72a7733ef4 100644 --- a/cpu/lpc1768/Makefile.include +++ b/cpu/lpc1768/Makefile.include @@ -1,3 +1,3 @@ export CPU_ARCH = cortex-m3 -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/mips32r2_common/Makefile.include b/cpu/mips32r2_common/Makefile.include index 644a65df40d3761620016848f28a1c4c355c2f87..40fa8dbf3604f3f7c5f402e605e45dde2d39c27d 100644 --- a/cpu/mips32r2_common/Makefile.include +++ b/cpu/mips32r2_common/Makefile.include @@ -2,7 +2,7 @@ export MEMORY_BASE=0x80000000 export MEMORY_SIZE=1M export APP_START=0x80000000 -include $(RIOTCPU)/Makefile.include.mips_common +include $(RIOTMAKE)/arch/mips.inc.mk export LINKFLAGS += -Tuhi32.ld export USEMODULE += periph diff --git a/cpu/mips_pic32mx/Makefile.include b/cpu/mips_pic32mx/Makefile.include index c7d6b8849552564bb852bc77f44f97a6431b7b91..6626e67c8e6517f90115397bf98c04e884801d5f 100644 --- a/cpu/mips_pic32mx/Makefile.include +++ b/cpu/mips_pic32mx/Makefile.include @@ -3,7 +3,7 @@ export MEMORY_SIZE=128K export APP_START=0x80000000 export ROMABLE = 1 -include $(RIOTCPU)/Makefile.include.mips_common +include $(RIOTMAKE)/arch/mips.inc.mk # define build specific options export CFLAGS += -march=m4k -DSKIP_COPY_TO_RAM diff --git a/cpu/mips_pic32mz/Makefile.include b/cpu/mips_pic32mz/Makefile.include index 7a36d5131e4ee3a1186f820d1d91053f76f756b6..30524b94972ce1d15b2e08f9bcefa602679c0ebd 100644 --- a/cpu/mips_pic32mz/Makefile.include +++ b/cpu/mips_pic32mz/Makefile.include @@ -3,7 +3,7 @@ export MEMORY_SIZE=512K export APP_START=0x80000000 export ROMABLE = 1 -include $(RIOTCPU)/Makefile.include.mips_common +include $(RIOTMAKE)/arch/mips.inc.mk # define build specific options export CFLAGS += -march=m5101 -mmicromips -DSKIP_COPY_TO_RAM diff --git a/cpu/msp430_common/Makefile.include b/cpu/msp430_common/Makefile.include index b0f3d009a6dc1990cbed5920cc446612118dfa21..ca676e5065a9970e57ec2616e37d72c07d8fb826 100644 --- a/cpu/msp430_common/Makefile.include +++ b/cpu/msp430_common/Makefile.include @@ -6,4 +6,4 @@ export USEMODULE += msp430_common msp430_common_periph DEFAULT_MODULE += oneway_malloc # include the msp430 common Makefile -include $(RIOTCPU)/Makefile.include.msp430_common +include $(RIOTMAKE)/arch/msp430.inc.mk diff --git a/cpu/nrf51/Makefile.include b/cpu/nrf51/Makefile.include index a3b630b9b55c8b4b61adef644af83d496fa2bbb2..b182bf12fa385f1a92514a88d937254fbdbbbd2f 100644 --- a/cpu/nrf51/Makefile.include +++ b/cpu/nrf51/Makefile.include @@ -2,4 +2,4 @@ export CPU_ARCH = cortex-m0 export CPU_FAM = nrf51 include $(RIOTCPU)/nrf5x_common/Makefile.include -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/nrf52/Makefile.include b/cpu/nrf52/Makefile.include index 073024aac611bd966ad180b93ec0d1f5b2bf940c..196831749b8c337c3b62ab12a103f1b97c443db5 100644 --- a/cpu/nrf52/Makefile.include +++ b/cpu/nrf52/Makefile.include @@ -2,4 +2,4 @@ export CPU_ARCH = cortex-m4f export CPU_FAM = nrf52 include $(RIOTCPU)/nrf5x_common/Makefile.include -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/sam3/Makefile.include b/cpu/sam3/Makefile.include index ea9548deba40fc22a820df050799f023bab91bc1..7a2337733e9258b532a6ada4df3a0d272b561635 100644 --- a/cpu/sam3/Makefile.include +++ b/cpu/sam3/Makefile.include @@ -3,4 +3,4 @@ export CPU_ARCH = cortex-m3 # include common SPI functions USEMODULE += periph_common -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/samd21/Makefile.include b/cpu/samd21/Makefile.include index a95fff8036bae32a4d85a79cd8af38de0a894e40..e5486c8a890196446d94bb1b02407ae20a4cf72a 100644 --- a/cpu/samd21/Makefile.include +++ b/cpu/samd21/Makefile.include @@ -4,4 +4,4 @@ export CPU_FAM = samd21 USEMODULE += pm_layered include $(RIOTCPU)/sam0_common/Makefile.include -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/saml21/Makefile.include b/cpu/saml21/Makefile.include index 3ff606767e84982304764ba1c9e74376e07fa35b..951564302b562cd5cfcafb1aa1d611c7b096ea39 100644 --- a/cpu/saml21/Makefile.include +++ b/cpu/saml21/Makefile.include @@ -4,4 +4,4 @@ export CPU_FAM = saml21 USEMODULE += pm_layered include $(RIOTCPU)/sam0_common/Makefile.include -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32f0/Makefile.include b/cpu/stm32f0/Makefile.include index daa2827f939358b7657bc47baa524329de086cac..18fc5c661dc298c531bdcd50a2d3bb3b71cedabe 100644 --- a/cpu/stm32f0/Makefile.include +++ b/cpu/stm32f0/Makefile.include @@ -2,4 +2,4 @@ export CPU_ARCH = cortex-m0 export CPU_FAM = stm32f0 include $(RIOTCPU)/stm32_common/Makefile.include -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32f1/Makefile.include b/cpu/stm32f1/Makefile.include index ca6dcc21090509cf3fc089f67d0912cf537877e6..abe4696648eef9b61b84646724b7c92dac097a73 100644 --- a/cpu/stm32f1/Makefile.include +++ b/cpu/stm32f1/Makefile.include @@ -4,4 +4,4 @@ export CPU_FAM = stm32f1 USEMODULE += pm_layered include $(RIOTCPU)/stm32_common/Makefile.include -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32f2/Makefile.include b/cpu/stm32f2/Makefile.include index 9271fa2774a1f3d17c9c4d36e209871a9a0332c7..453f82cd460212b5267254c7073ee2ef32d6f295 100644 --- a/cpu/stm32f2/Makefile.include +++ b/cpu/stm32f2/Makefile.include @@ -4,4 +4,4 @@ export CPU_FAM = stm32f2 USEMODULE += pm_layered include $(RIOTCPU)/stm32_common/Makefile.include -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32f3/Makefile.include b/cpu/stm32f3/Makefile.include index b733349beeb242101b01878d31b11f41f5e22d21..3ad9e9546cfe13589a920ee385b6602de4fb9502 100644 --- a/cpu/stm32f3/Makefile.include +++ b/cpu/stm32f3/Makefile.include @@ -2,4 +2,4 @@ export CPU_ARCH = cortex-m4f export CPU_FAM = stm32f3 include $(RIOTCPU)/stm32_common/Makefile.include -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32f4/Makefile.include b/cpu/stm32f4/Makefile.include index bf4156f52dce3a279d296599a0f541a2a8cb5e8f..c88560db69f7b34c88526f7e04d3ca6cc84670a2 100644 --- a/cpu/stm32f4/Makefile.include +++ b/cpu/stm32f4/Makefile.include @@ -4,5 +4,4 @@ export CPU_FAM = stm32f4 USEMODULE += pm_layered include $(RIOTCPU)/stm32_common/Makefile.include - -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32l0/Makefile.include b/cpu/stm32l0/Makefile.include index 8814ecd40595974d5211eb740c6d8d7f5da0addd..42b0a85b6621f7da99e2cabccd4b60c53c1e2a49 100644 --- a/cpu/stm32l0/Makefile.include +++ b/cpu/stm32l0/Makefile.include @@ -2,4 +2,4 @@ export CPU_ARCH = cortex-m0 export CPU_FAM = stm32l0 include $(RIOTCPU)/stm32_common/Makefile.include -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32l1/Makefile.include b/cpu/stm32l1/Makefile.include index 2eeadee455d2e8bd4a0608604609a3f125b1b77c..3d6f379e13b4e12ff21fe5ba0ee687216a082533 100644 --- a/cpu/stm32l1/Makefile.include +++ b/cpu/stm32l1/Makefile.include @@ -2,4 +2,4 @@ export CPU_ARCH = cortex-m3 export CPU_FAM = stm32l1 include $(RIOTCPU)/stm32_common/Makefile.include -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32l4/Makefile.include b/cpu/stm32l4/Makefile.include index f5c37b0a6ee9fd80094b58524e8437568fe3b32c..82e28ee689ace0e79f6c902b2d74a142fd3abaac 100644 --- a/cpu/stm32l4/Makefile.include +++ b/cpu/stm32l4/Makefile.include @@ -2,4 +2,4 @@ export CPU_ARCH = cortex-m4f export CPU_FAM = stm32l4 include $(RIOTCPU)/stm32_common/Makefile.include -include $(RIOTCPU)/Makefile.include.cortexm_common +include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/Makefile.application b/makefiles/application.inc.mk similarity index 100% rename from Makefile.application rename to makefiles/application.inc.mk diff --git a/cpu/Makefile.include.cortexm_common b/makefiles/arch/cortexm.inc.mk similarity index 100% rename from cpu/Makefile.include.cortexm_common rename to makefiles/arch/cortexm.inc.mk diff --git a/cpu/Makefile.include.mips_common b/makefiles/arch/mips.inc.mk similarity index 100% rename from cpu/Makefile.include.mips_common rename to makefiles/arch/mips.inc.mk diff --git a/cpu/Makefile.include.msp430_common b/makefiles/arch/msp430.inc.mk similarity index 88% rename from cpu/Makefile.include.msp430_common rename to makefiles/arch/msp430.inc.mk index 88b0450cfa22d9e73349a0604c1bb44a565008dd..e892289c8ec834fa00596039b2d730d399e8eff0 100644 --- a/cpu/Makefile.include.msp430_common +++ b/makefiles/arch/msp430.inc.mk @@ -12,6 +12,3 @@ export CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT) export ASFLAGS += $(CFLAGS_CPU) --defsym $(CPU_MODEL)=1 $(CFLAGS_DBG) # export linker flags export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -Wl,--gc-sections -static -lgcc - -# Import all toolchain settings -include $(RIOTCPU)/Makefile.include.gnu diff --git a/Makefile.bindist b/makefiles/bindist.inc.mk similarity index 100% rename from Makefile.bindist rename to makefiles/bindist.inc.mk diff --git a/Makefile.buildtests b/makefiles/buildtests.inc.mk similarity index 100% rename from Makefile.buildtests rename to makefiles/buildtests.inc.mk diff --git a/Makefile.cflags b/makefiles/cflags.inc.mk similarity index 100% rename from Makefile.cflags rename to makefiles/cflags.inc.mk diff --git a/Makefile.defaultmodules b/makefiles/defaultmodules.inc.mk similarity index 100% rename from Makefile.defaultmodules rename to makefiles/defaultmodules.inc.mk diff --git a/Makefile.docker b/makefiles/docker.inc.mk similarity index 97% rename from Makefile.docker rename to makefiles/docker.inc.mk index c882b0fe3c1c4e65d6b60dc08b72541b2243dafc..6419ab26ee260e22e82de5b3b5a5c7c3178a9a7e 100644 --- a/Makefile.docker +++ b/makefiles/docker.inc.mk @@ -92,12 +92,14 @@ DOCKER_OVERRIDE_CMDLINE := $(strip $(DOCKER_OVERRIDE_CMDLINE)) -v '$(RIOTBASE):$(DOCKER_BUILD_ROOT)/riotbase' \ -v '$(RIOTCPU):$(DOCKER_BUILD_ROOT)/riotcpu' \ -v '$(RIOTBOARD):$(DOCKER_BUILD_ROOT)/riotboard' \ + -v '$(RIOTMAKE):$(DOCKER_BUILD_ROOT)/riotmake' \ -v '$(RIOTPROJECT):$(DOCKER_BUILD_ROOT)/riotproject' \ -v /etc/localtime:/etc/localtime:ro \ -e 'RIOTBASE=$(DOCKER_BUILD_ROOT)/riotbase' \ -e 'CCACHE_BASEDIR=$(DOCKER_BUILD_ROOT)/riotbase' \ -e 'RIOTCPU=$(DOCKER_BUILD_ROOT)/riotcpu' \ -e 'RIOTBOARD=$(DOCKER_BUILD_ROOT)/riotboard' \ + -e 'RIOTMAKE=$(DOCKER_BUILD_ROOT)/riotmake' \ -e 'RIOTPROJECT=$(DOCKER_BUILD_ROOT)/riotproject' \ $(DOCKER_ENVIRONMENT_CMDLINE) \ -w '$(DOCKER_BUILD_ROOT)/riotproject/$(BUILDRELPATH)' \ diff --git a/Makefile.features b/makefiles/features.inc.mk similarity index 100% rename from Makefile.features rename to makefiles/features.inc.mk diff --git a/Makefile.modules b/makefiles/modules.inc.mk similarity index 100% rename from Makefile.modules rename to makefiles/modules.inc.mk diff --git a/Makefile.pseudomodules b/makefiles/pseudomodules.inc.mk similarity index 100% rename from Makefile.pseudomodules rename to makefiles/pseudomodules.inc.mk diff --git a/Makefile.scan-build b/makefiles/scan-build.inc.mk similarity index 100% rename from Makefile.scan-build rename to makefiles/scan-build.inc.mk diff --git a/Makefile.tests b/makefiles/tests.inc.mk similarity index 100% rename from Makefile.tests rename to makefiles/tests.inc.mk diff --git a/cpu/Makefile.include.gnu b/makefiles/toolchain/gnu.inc.mk similarity index 100% rename from cpu/Makefile.include.gnu rename to makefiles/toolchain/gnu.inc.mk diff --git a/cpu/Makefile.include.llvm b/makefiles/toolchain/llvm.inc.mk similarity index 100% rename from cpu/Makefile.include.llvm rename to makefiles/toolchain/llvm.inc.mk diff --git a/boards/Makefile.include.jlink b/makefiles/tools/jlink.inc.mk similarity index 100% rename from boards/Makefile.include.jlink rename to makefiles/tools/jlink.inc.mk diff --git a/boards/Makefile.include.openocd b/makefiles/tools/openocd.inc.mk similarity index 100% rename from boards/Makefile.include.openocd rename to makefiles/tools/openocd.inc.mk diff --git a/boards/Makefile.include.serial b/makefiles/tools/serial.inc.mk similarity index 100% rename from boards/Makefile.include.serial rename to makefiles/tools/serial.inc.mk diff --git a/Makefile.vars b/makefiles/vars.inc.mk similarity index 98% rename from Makefile.vars rename to makefiles/vars.inc.mk index e4267d1d5c184b2689e8b2df689110b90dad839e..a6404a347d8bfe518ec35c7a926fdad23e0beb37 100644 --- a/Makefile.vars +++ b/makefiles/vars.inc.mk @@ -19,6 +19,7 @@ export RIOTCPU # For third party CPUs this folder is the base of t export RIOTBOARD # For third party BOARDs this folder is the base of the BOARDs. export RIOTPKG # For overriding RIOT's pkg directory export RIOTPROJECT # Top level git root of the project being built, or PWD if not a git repository +export RIOTMAKE # Location of all supplemental Makefiles (such as this file) export BINDIRBASE # This is the folder where the application should be built in. For each BOARD a different subfolder is used. export BINDIR # This is the folder where the application should be built in. export APPDIR # The base folder containing the application