build: allow -j on top level makefile

By using $(MAKE) variable we allow to pass down to the called makefile
the number of jobs we want to compile with. The flags are communicated
to the next level via MAKEFLAGS variable.

Reference:
https://www.gnu.org/software/make/manual/html_node/Options_002fRecursion.html#Options_002fRecursion
This commit is contained in:
Lucas De Marchi 2015-10-27 17:04:49 -02:00 committed by Andrew Tridgell
parent 178bbb080b
commit 3d8211696c
1 changed files with 4 additions and 4 deletions

View File

@ -15,13 +15,13 @@ clean: plane copter rover antennatracker
.PHONY: plane copter rover antennatracker
plane:
make -C ArduPlane $(TARGET)
$(MAKE) -C ArduPlane $(TARGET)
copter:
make -C ArduCopter $(TARGET)
$(MAKE) -C ArduCopter $(TARGET)
rover:
make -C APMrover2 $(TARGET)
$(MAKE) -C APMrover2 $(TARGET)
antennatracker:
make -C AntennaTracker $(TARGET)
$(MAKE) -C AntennaTracker $(TARGET)