X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/56e792c95b1a29e61d9204a8f7f305d7f33261f1..refs/heads/master:/Demos/Host/LowLevel/makefile diff --git a/Demos/Host/LowLevel/makefile b/Demos/Host/LowLevel/makefile index 8c32dc327..6efcb7dd3 100644 --- a/Demos/Host/LowLevel/makefile +++ b/Demos/Host/LowLevel/makefile @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2012. +# Copyright (C) Dean Camera, 2021. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org @@ -13,36 +13,23 @@ # custom LUFA library build options are reflected in the compiled # code. -all: - $(MAKE) -s -C AndroidAccessoryHost clean all - $(MAKE) -s -C AudioInputHost clean all - $(MAKE) -s -C AudioOutputHost clean all - $(MAKE) -s -C GenericHIDHost clean all - $(MAKE) -s -C JoystickHostWithParser clean all - $(MAKE) -s -C KeyboardHost clean all - $(MAKE) -s -C MassStorageHost clean all - $(MAKE) -s -C MIDIHost clean all - $(MAKE) -s -C MouseHost clean all - $(MAKE) -s -C MouseHostWithParser clean all - $(MAKE) -s -C PrinterHost clean all - $(MAKE) -s -C RNDISEthernetHost clean all - $(MAKE) -s -C StillImageHost clean all - $(MAKE) -s -C VirtualSerialHost clean all - -%: - $(MAKE) -s -C AndroidAccessoryHost $@ - $(MAKE) -s -C AudioInputHost $@ - $(MAKE) -s -C AudioOutputHost $@ - $(MAKE) -s -C GenericHIDHost $@ - $(MAKE) -s -C JoystickHostWithParser $@ - $(MAKE) -s -C KeyboardHost $@ - $(MAKE) -s -C KeyboardHostWithParser $@ - $(MAKE) -s -C MassStorageHost $@ - $(MAKE) -s -C MIDIHost $@ - $(MAKE) -s -C MouseHost $@ - $(MAKE) -s -C MouseHostWithParser $@ - $(MAKE) -s -C PrinterHost $@ - $(MAKE) -s -C RNDISEthernetHost $@ - $(MAKE) -s -C StillImageHost $@ - $(MAKE) -s -C VirtualSerialHost $@ +PROJECT_DIRECTORIES := $(shell ls -d */) +# 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 + +# Build each directory sequentially, even if we are building using multiple +# cores within each project +.NOTPARALLEL: + +%: $(PROJECT_DIRECTORIES) + @echo . > /dev/null + +$(PROJECT_DIRECTORIES): + @$(MAKE) -C $@ $(MAKECMDGOALS) + +.PHONY: $(PROJECT_DIRECTORIES)