diff --git a/Makefile.include b/Makefile.include index 6aeae3858515..77f021992dd9 100644 --- a/Makefile.include +++ b/Makefile.include @@ -14,8 +14,9 @@ GITCACHE ?= $(RIOTBASE)/dist/tools/git/git-cache APPDIR ?= $(CURDIR) BINDIRBASE ?= $(APPDIR)/bin BINDIR ?= $(BINDIRBASE)/$(BOARD) +PKGDIRBASE ?= $(BINDIRBASE)/pkg/$(BOARD) -__DIRECTORY_VARIABLES := RIOTBASE CCACHE_BASEDIR RIOTCPU RIOTBOARD RIOTPKG GITCACHE RIOTPROJECT APPDIR BINDIRBASE BINDIR +__DIRECTORY_VARIABLES := RIOTBASE CCACHE_BASEDIR RIOTCPU RIOTBOARD RIOTPKG GITCACHE RIOTPROJECT APPDIR BINDIRBASE BINDIR PKGDIRBASE # Make all paths absolute. override RIOTBASE := $(abspath $(RIOTBASE)) @@ -28,6 +29,7 @@ override GITCACHE := $(abspath $(GITCACHE)) override APPDIR := $(abspath $(APPDIR)) override BINDIRBASE := $(abspath $(BINDIRBASE)) override BINDIR := $(abspath $(BINDIR)) +override PKGDIRBASE := $(abspath $(PKGDIRBASE)) # Ensure that all directories are set and don't contain spaces. ifneq (, $(filter-out 1, $(foreach v,${__DIRECTORY_VARIABLES},$(words ${${v}})))) diff --git a/Makefile.vars b/Makefile.vars index 39e3abf0921d..e71f2f09c0e7 100644 --- a/Makefile.vars +++ b/Makefile.vars @@ -22,6 +22,7 @@ export RIOTPROJECT # Top level git root of the project being built, or 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 +export PKGDIRBASE # The base folder for building packages export TARGET_ARCH # The target platform name, in GCC triple notation, e.g. "arm-none-eabi", "i686-elf", "avr" export PREFIX # The prefix of the toolchain commands, usually "$(TARGET_ARCH)-", e.g. "arm-none-eabi-" or "msp430-".