aboutsummaryrefslogtreecommitdiffstats
path: root/Maintenance
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2012-07-23 19:04:01 +0000
committerDean Camera <dean@fourwalledcubicle.com>2012-07-23 19:04:01 +0000
commit8820b1f6cce9a37fbe959cf7c756aed29bfd134f (patch)
tree4591e2458b2ab61d4d23e6bd1a196f86ff62f275 /Maintenance
parentc0da7660fc48a76bea93d3f6ccb373c316f90d13 (diff)
downloadlufa-8820b1f6cce9a37fbe959cf7c756aed29bfd134f.tar.gz
lufa-8820b1f6cce9a37fbe959cf7c756aed29bfd134f.tar.bz2
lufa-8820b1f6cce9a37fbe959cf7c756aed29bfd134f.zip
Add a "make_bootloaders" target to the Maintenance makefile, to generate all possible bootloaders and archive them for separate distribution.
Diffstat (limited to 'Maintenance')
-rw-r--r--Maintenance/makefile43
1 files changed, 37 insertions, 6 deletions
diff --git a/Maintenance/makefile b/Maintenance/makefile
index ca3059996..b5a3b7bcd 100644
--- a/Maintenance/makefile
+++ b/Maintenance/makefile
@@ -67,15 +67,46 @@ make-as4-projects:
fi; \
done;
@echo AVR Studio 4 project generation complete.
+
+# Make all possible bootloaders for all targets and configurations as set by the BootloaderTest build test
+# and store them in a seperate directory called "Bootloaders"
+make_bootloaders:
+ @echo "build_bootloaders:" > BuildMakefile
+ @printf "\t-mkdir Bootloaders 2>/dev/null\n\n" >> BuildMakefile
+ @while read line; \
+ do \
+ build_cfg=`echo $$line | grep -v "#" | sed 's/ //g'`; \
+ \
+ if ( test -n "$$build_cfg" ); then \
+ build_bootloader=`echo $$build_cfg | cut -d'=' -f1`; \
+ build_cfg=`echo $$build_cfg | cut -d'=' -f2-`; \
+ \
+ build_arch=`echo $$build_cfg | cut -d':' -f1`; \
+ build_mcu=`echo $$build_cfg | cut -d':' -f2`; \
+ build_board=`echo $$build_cfg | cut -d':' -f3`; \
+ build_flashsize=`echo $$build_cfg | cut -d':' -f4`; \
+ build_bootsize=`echo $$build_cfg | cut -d':' -f5`; \
+ \
+ printf "Found '%s' with FLASH: %3s KB, BOOT: %3s KB, MCU: %12s / %4s, BOARD: %s\n" $$build_bootloader $$build_flashsize $$build_bootsize $$build_mcu $$build_arch $$build_board; \
+ \
+ printf "\t@echo Building '%s' with FLASH: %3s KB, BOOT: %3s KB, MCU: %12s / %4s, BOARD: %s\n" $$build_bootloader $$build_flashsize $$build_bootsize $$build_mcu $$build_arch $$build_board >> BuildMakefile; \
+ printf "\t$(MAKE) -C $(patsubst %/,%,$(LUFA_ROOT))/Bootloaders/%s/ clean hex ARCH=%s MCU=%s BOARD=%s FLASH_SIZE_KB=%s BOOT_SECTION_SIZE_KB=%s DEBUG_LEVEL=0\n" $$build_bootloader $$build_arch $$build_mcu $$build_board $$build_flashsize $$build_bootsize >> BuildMakefile; \
+ printf "\tmv $(patsubst %/,%,$(LUFA_ROOT))/Bootloaders/%s/Bootloader%s.hex Bootloaders/%s-%s-%s-BOARD_%s-BOOT_%sKB.hex\n\n" $$build_bootloader $$build_bootloader $$build_bootloader $$build_arch $$build_mcu $$build_board $$build_bootsize >> BuildMakefile; \
+ fi; \
+ done < $(patsubst %/,%,$(LUFA_ROOT))/BuildTests/BootloaderTest/BootloaderDeviceMap.cfg
+
+ $(MAKE) -f BuildMakefile build_bootloaders
+ rm -f BuildMakefile
+
# Check the working branch documentation, ensure no placeholder values
check-documentation-placeholders:
@echo Checking for release suitability...
- @if ( grep "XXXXXX" $(LUFA_ROOT)/LUFA/DoxygenPages/*.txt > /dev/null ;); then \
+ @if ( grep "XXXXXX" $(patsubst %/,%,$(LUFA_ROOT))/LUFA/DoxygenPages/*.txt > /dev/null ;); then \
echo " ERROR: Doxygen documentation has not been updated for release!"; \
exit 1; \
fi;
- @if ( grep "000000" $(LUFA_ROOT)/LUFA/Version.h > /dev/null ;); then \
+ @if ( grep "000000" $(patsubst %/,%,$(LUFA_ROOT))/LUFA/Version.h > /dev/null ;); then \
echo " ERROR: Version header has not been updated for release!"; \
exit 1; \
fi;
@@ -83,12 +114,12 @@ check-documentation-placeholders:
# Validate the working branch - compile all documentation, demos/projects/examples and run build tests
validate-branch:
- $(MAKE) -C $(LUFA_ROOT) doxygen
- $(MAKE) -C $(LUFA_ROOT) all DEBUG_LEVEL=0
- $(MAKE) -C $(LUFA_ROOT)/BuildTests all
+ $(MAKE) -C $(patsubst %/,%,$(LUFA_ROOT)) doxygen
+ $(MAKE) -C $(patsubst %/,%,$(LUFA_ROOT)) all DEBUG_LEVEL=0
+ $(MAKE) -C $(patsubst %/,%,$(LUFA_ROOT))/BuildTests all
# Validate the working branch for general release, check for placeholder documentation then build and test everything
validate-release: check-documentation-placeholders validate-branch
-.PHONY: all upgrade-doxygen make-as4-projects check-documentation-placeholders validate-branch \ No newline at end of file
+.PHONY: all upgrade-doxygen make-as4-projects make_bootloaders check-documentation-placeholders validate-branch \ No newline at end of file