From 2868547e751ae5c4d14a821d0e6f604f32c3ada3 Mon Sep 17 00:00:00 2001 From: osnwt Date: Tue, 25 Jan 2011 09:23:54 +0000 Subject: [PATCH] Windows flight batch build script: added more options for selective building. SYNTAX: Makefile.cmd [build / clean / help] - build: builds all flight targets including uavobjects, bootloaders and firmware - clean: cleans all flight targets including bootloaders and firmware - help: this help Environment variables: - TARGETS_FW - list of target (default is all flight targets) - TARGETS_BL - list of target (default is all flight bootloader targets) - TARGET_FW_SUBDIR - subdirectory of build/ to build targets (default is .) - TARGET_BL_SUBDIR - subdirectory of build/ to build bootloaders (default is bootloaders) Example usage (from a batch file with .cmd extension): set PATH=D:\Work\OpenPilot\Apps\CodeSourcery\bin\;%PATH% set TARGETS_FW=ahrs openpilot set TARGETS_BL=%TARGETS_FW% call svn\trunk\Makefile.cmd build git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2590 ebee16cc-31ac-478f-84a7-5cbb03baadba --- Makefile.cmd | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Makefile.cmd b/Makefile.cmd index 5eb0a45df..302b9642d 100644 --- a/Makefile.cmd +++ b/Makefile.cmd @@ -12,6 +12,19 @@ for %%F in (%0) do echo SYNTAX: %%~nF%%~xF [build / clean / help] echo - build: builds all flight targets including uavobjects, bootloaders and firmware echo - clean: cleans all flight targets including bootloaders and firmware echo - help: this help +echo: +echo Environment variables: +echo - TARGETS_FW - list of target (default is all flight targets) +echo - TARGETS_BL - list of target (default is all flight bootloader targets) +echo - TARGET_FW_SUBDIR - subdirectory of build/ to build targets (default is .) +echo - TARGET_BL_SUBDIR - subdirectory of build/ to build bootloaders (default is bootloaders) +echo: +echo Example usage (from a batch file with .cmd extension): +echo set PATH=D:\Work\OpenPilot\Apps\CodeSourcery\bin\;%%PATH%% +echo set TARGETS_FW=ahrs openpilot +echo set TARGETS_BL=%%TARGETS_FW%% +echo call svn\trunk\Makefile.cmd build +echo: goto Abort @@ -21,10 +34,10 @@ rem Settings and definitions rem ------------------------------------------------------------------- rem Set desired targets and paths -set TARGETS_FW=ahrs openpilot pipxtreme coptercontrol -set TARGETS_BL=ahrs openpilot pipxtreme -set TARGET_FW_SUBDIR=. -set TARGET_BL_SUBDIR=bootloaders +if "%TARGETS_FW%" == "" set TARGETS_FW=ahrs openpilot pipxtreme coptercontrol +if "%TARGETS_BL%" == "" set TARGETS_BL=ahrs openpilot pipxtreme +if "%TARGET_FW_SUBDIR%" == "" set TARGET_FW_SUBDIR=. +if "%TARGET_BL_SUBDIR%" == "" set TARGET_BL_SUBDIR=bootloaders rem Set toolset paths (if you don't have them added permanently) rem set PATH=D:\Work\OpenPilot\Apps\CodeSourcery\bin\;%PATH%