diff options
author | Jack Humbert <jack.humb@gmail.com> | 2017-07-07 11:55:23 -0400 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2017-07-07 11:55:23 -0400 |
commit | 8655d4f4948b2deef7844503c8d690f23ac1a062 (patch) | |
tree | b2c6effc9d6cd5b5b43933a1e53b8bf17e9e82cf /lib/lufa/Projects/makefile | |
parent | 1896c76a2928c96f9ab7947bec2ef8dd37623cff (diff) | |
parent | 60b30c036397cb5627fa374bb930794b225daa29 (diff) | |
download | qmk_firmware-8655d4f4948b2deef7844503c8d690f23ac1a062.tar.gz qmk_firmware-8655d4f4948b2deef7844503c8d690f23ac1a062.zip |
Merge commit '60b30c036397cb5627fa374bb930794b225daa29' as 'lib/lufa'
Diffstat (limited to 'lib/lufa/Projects/makefile')
-rw-r--r-- | lib/lufa/Projects/makefile | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/lib/lufa/Projects/makefile b/lib/lufa/Projects/makefile new file mode 100644 index 0000000000..1681584244 --- /dev/null +++ b/lib/lufa/Projects/makefile @@ -0,0 +1,47 @@ +# +# LUFA Library +# Copyright (C) Dean Camera, 2017. +# +# dean [at] fourwalledcubicle [dot] com +# www.lufa-lib.org +# + +# Makefile to build all the LUFA Projects. Call with "make all" to +# rebuild all projects. + +# Projects are pre-cleaned before each one is built, to ensure any +# custom LUFA library build options are reflected in the compiled +# code. + +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 + +# Need to special-case building without a per-project object directory +ifeq ($(OBJDIR),) + # If no target specified, force "clean all" and disallow parallel build + ifeq ($(MAKECMDGOALS),) + MAKECMDGOALS := clean all + .NOTPARALLEL: + endif + + # If one of the targets is to build, force "clean" beforehand and disallow parallel build + ifneq ($(findstring all, $(MAKECMDGOALS)),) + MAKECMDGOALS := clean $(MAKECMDGOALS) + .NOTPARALLEL: + endif +endif + +%: $(PROJECT_DIRECTORIES) + @echo . > /dev/null + +$(PROJECT_DIRECTORIES): + @$(MAKE) -C $@ $(MAKECMDGOALS) + +.PHONY: $(PROJECT_DIRECTORIES) + |