2017-09-24 20:00:50 +00:00
|
|
|
JARG =
|
|
|
|
GMAKE = "gmake"
|
2017-10-12 17:48:15 +00:00
|
|
|
#When gmake is called from another make instance, -w is automatically added
|
|
|
|
#which causes extraneous messages about directory changes to be emitted.
|
|
|
|
#--no-print-directory silences these messages.
|
|
|
|
GARGS = "--no-print-directory"
|
|
|
|
|
2017-09-24 20:00:50 +00:00
|
|
|
.if "$(.MAKE.JOBS)" != ""
|
|
|
|
JARG = -j$(.MAKE.JOBS)
|
|
|
|
.endif
|
2017-09-14 19:29:20 +00:00
|
|
|
|
2017-09-24 20:00:50 +00:00
|
|
|
#by default bmake will cd into ./obj first
|
|
|
|
.OBJDIR: ./
|
|
|
|
|
2017-10-12 17:45:10 +00:00
|
|
|
.PHONY: FRC
|
|
|
|
$(.TARGETS): FRC
|
2017-10-12 17:48:15 +00:00
|
|
|
$(GMAKE) $(GARGS) $(.TARGETS:S,.DONE,,) $(JARG)
|
2017-10-12 17:45:10 +00:00
|
|
|
|
2017-09-24 20:00:50 +00:00
|
|
|
.DONE .DEFAULT: .SILENT
|
2017-10-12 17:48:15 +00:00
|
|
|
$(GMAKE) $(GARGS) $(.TARGETS:S,.DONE,,) $(JARG)
|
2017-09-24 20:00:50 +00:00
|
|
|
|
|
|
|
.ERROR: .SILENT
|
|
|
|
if ! which $(GMAKE) > /dev/null; then \
|
|
|
|
echo "GNU Make is required!"; \
|
|
|
|
fi
|