X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/e331b531c6e6d93eb0eee42b9002074e8090ad18..21a6acff834a05b0c061764afa90eb80f3be461e:/Demos/Device/LowLevel/makefile diff --git a/Demos/Device/LowLevel/makefile b/Demos/Device/LowLevel/makefile index ed0dc3f36..99e7c24a1 100644 --- a/Demos/Device/LowLevel/makefile +++ b/Demos/Device/LowLevel/makefile @@ -1,9 +1,9 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2010. -# +# Copyright (C) Dean Camera, 2012. +# # dean [at] fourwalledcubicle [dot] com -# www.fourwalledcubicle.com +# www.lufa-lib.org # # Makefile to build all the LUFA Device Demos. Call with "make all" to @@ -13,53 +13,17 @@ # custom LUFA library build options are reflected in the compiled # code. -all: - $(MAKE) -C AudioInput clean - $(MAKE) -C AudioInput all - - $(MAKE) -C AudioOutput clean - $(MAKE) -C AudioOutput all - - $(MAKE) -C DualVirtualSerial clean - $(MAKE) -C DualVirtualSerial all - - $(MAKE) -C GenericHID clean - $(MAKE) -C GenericHID all - - $(MAKE) -C Joystick clean - $(MAKE) -C Joystick all +PROJECT_DIRECTORIES = $(shell ls -d */) - $(MAKE) -C Keyboard clean - $(MAKE) -C Keyboard all +# This makefile is potentially infinitely recursive if something really bad +# happens when determining the set of project directories - hard-abort if +# more than 10 levels deep to avoid angry emails. +ifeq ($(MAKELEVEL), 10) + $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED) +endif - $(MAKE) -C KeyboardMouse clean - $(MAKE) -C KeyboardMouse all - - $(MAKE) -C MassStorage clean - $(MAKE) -C MassStorage all - - $(MAKE) -C MIDI clean - $(MAKE) -C MIDI all - - $(MAKE) -C Mouse clean - $(MAKE) -C Mouse all - - $(MAKE) -C RNDISEthernet clean - $(MAKE) -C RNDISEthernet all - - $(MAKE) -C VirtualSerial clean - $(MAKE) -C VirtualSerial all +all: + @$(foreach PROJECT, $(PROJECT_DIRECTORIES), $(MAKE) -s -C $(PROJECT) clean all;) %: - $(MAKE) -C AudioInput $@ - $(MAKE) -C AudioOutput $@ - $(MAKE) -C DualVirtualSerial $@ - $(MAKE) -C GenericHID $@ - $(MAKE) -C Joystick $@ - $(MAKE) -C Keyboard $@ - $(MAKE) -C KeyboardMouse $@ - $(MAKE) -C MassStorage $@ - $(MAKE) -C MIDI $@ - $(MAKE) -C Mouse $@ - $(MAKE) -C RNDISEthernet $@ - $(MAKE) -C VirtualSerial $@ + @$(foreach PROJECT, $(PROJECT_DIRECTORIES), $(MAKE) -s -C $(PROJECT) $@;)