diff --git a/Makefile b/Makefile index ca0ccbee60f7..dcf2fb6a1660 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 3c19baad5d82..902a30950aba 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 14eaf5001406..759cf37a4df5 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 08c0eefea7ca..a943e194c3cc 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 83a0716a484f..d8a948a8074e 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 d9c05ab559bc..3d131cdeda04 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 d1352658650f..ccdd448d0eaa 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 aecba3b4f00c..25258b561424 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 373406db2e4a..d29ea94951a2 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 19d12fd50ec9..7ddb27bf609f 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 d7955baeaa0e..30ea92248759 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 8e063b292efd..e624601ea00b 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 43974f6d6e5a..93260391c7c0 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 40636539362b..1855b1f352cb 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 9ca99b8298e2..ba4a3e1b7528 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 e6c64263cb4c..58f1721a7bd1 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 57822ccd2a7c..4c566a29d453 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 71bc5200b909..51ed1df09a27 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 1df898f14cf5..d87c020ab074 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 67890b37f596..a4bb2aca4cfc 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 53810879fd45..089340c484e1 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 b646f3e6fd8f..40df3b3f96cc 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 6db9e3a7bd61..7a1e1dec76fa 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 781d8d0a46b2..1c5e4d00d0ba 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 4c1dfda5de64..18b0b6cffa42 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 f4eb8415a48c..549c7476f88e 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 3340ebf4196b..97d6a7192be7 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 7b11716814e5..55826907c0bb 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 202562d2d316..4c62ef1f6b93 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 b6901b8d89dc..9f3e9fca7621 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 fb6a6119fce8..c96d71bec7df 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 3502134f1a63..7f68e0eaa1bf 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 ae3f48f8e764..73f97a001bc8 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 991661748adf..1fb937e0d046 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 8949df181a61..83eb6a03145a 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 7ff46a018372..0710da46ef60 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 f0a04d1444c6..628b16fa30e6 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 4389d6e7d918..6e6ca2a41996 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 221cfa97578b..def388e08d6f 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 c84cacd0bd53..7d062b427460 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 c73286148526..f566c727b518 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 766053b7ca91..188b5a13021f 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 9daf460eb24a..024d09c76785 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 14eaf5001406..759cf37a4df5 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 fa3dea543cba..a215e48f14ff 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 3c829bccf014..bc93aaa0ebb0 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 507f47d21b0d..7a03b807df95 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 eb5d45d59681..1e08098b245c 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 a71bcf13c52e..7864add139fe 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 fd234523cc4d..1ef70e6970b2 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 76e3daea5db1..e194a2124d04 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 50e87844f296..e038dd686daf 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 04c2fd5dd48a..26110583850b 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 f16ada89b8a3..259ee2a90e08 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 644a65df40d3..40fa8dbf3604 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 c7d6b8849552..6626e67c8e65 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 7a36d5131e4e..30524b94972c 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 b0f3d009a6dc..ca676e5065a9 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 a3b630b9b55c..b182bf12fa38 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 073024aac611..196831749b8c 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 ea9548deba40..7a2337733e92 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 a95fff8036ba..e5486c8a8901 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 3ff606767e84..951564302b56 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 daa2827f9393..18fc5c661dc2 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 ca6dcc210905..abe4696648ee 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 9271fa2774a1..453f82cd4602 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 b733349beeb2..3ad9e9546cfe 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 bf4156f52dce..c88560db69f7 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 8814ecd40595..42b0a85b6621 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 2eeadee455d2..3d6f379e13b4 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 f5c37b0a6ee9..82e28ee689ac 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 88b0450cfa22..e892289c8ec8 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 c882b0fe3c1c..6419ab26ee26 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 e4267d1d5c18..a6404a347d8b 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