diff --git a/tools/Makefile.unix b/tools/Makefile.unix index 0d6ebd1990..ba5ebe5708 100644 --- a/tools/Makefile.unix +++ b/tools/Makefile.unix @@ -117,7 +117,7 @@ LINKLIBS = $(patsubst staging/%,%,$(NUTTXLIBS)) # Export tool definitions MKEXPORT= tools/mkexport.sh -MKEXPORT_ARGS = -w$(CONFIG_CYGWIN_WINTOOL) -t "$(TOPDIR)" +MKEXPORT_ARGS = -w$(CONFIG_CYGWIN_WINTOOL) -t "$(TOPDIR)" -b "$(BOARD_DIR)" ifneq ($(CONFIG_BUILD_FLAT),y) MKEXPORT_ARGS += -u diff --git a/tools/mkexport.sh b/tools/mkexport.sh index e8f3bd9011..c10e9170a7 100755 --- a/tools/mkexport.sh +++ b/tools/mkexport.sh @@ -39,6 +39,7 @@ unset TOPDIR unset LIBLIST unset TGZ unset APPDIR +unset BOARDDIR USRONLY=n WINTOOL=n @@ -50,6 +51,10 @@ while [ ! -z "$1" ]; do shift APPDIR="$1" ;; + -b ) + shift + BOARDDIR="$1" + ;; -d ) set -x ;; @@ -201,6 +206,12 @@ cp "${TOPDIR}/tools/incdir.c" "${EXPORTDIR}/tools/." cp -f "${TOPDIR}/binfmt/libelf/gnu-elf.ld" "${EXPORTDIR}/scripts/." +# Copy the board config script + +if [ -f "${BOARDDIR}/scripts/Config.mk" ]; then + cp -f "${BOARDDIR}/scripts/Config.mk" "${EXPORTDIR}/scripts/." +fi + # Is there a linker script in this configuration? if [ "X${USRONLY}" != "Xy" ]; then