2017-09-25 04:00:50 +08:00
|
|
|
JARG =
|
|
|
|
GMAKE = "gmake"
|
2017-10-13 01:48:15 +08: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-25 04:00:50 +08:00
|
|
|
.if "$(.MAKE.JOBS)" != ""
|
|
|
|
JARG = -j$(.MAKE.JOBS)
|
|
|
|
.endif
|
2017-09-15 03:29:20 +08:00
|
|
|
|
2017-09-25 04:00:50 +08:00
|
|
|
#by default bmake will cd into ./obj first
|
|
|
|
.OBJDIR: ./
|
|
|
|
|
2017-10-13 01:45:10 +08:00
|
|
|
.PHONY: FRC
|
|
|
|
$(.TARGETS): FRC
|
2017-10-13 01:48:15 +08:00
|
|
|
$(GMAKE) $(GARGS) $(.TARGETS:S,.DONE,,) $(JARG)
|
2017-10-13 01:45:10 +08:00
|
|
|
|
2017-09-25 04:00:50 +08:00
|
|
|
.DONE .DEFAULT: .SILENT
|
2017-10-13 01:48:15 +08:00
|
|
|
$(GMAKE) $(GARGS) $(.TARGETS:S,.DONE,,) $(JARG)
|
2017-09-25 04:00:50 +08:00
|
|
|
|
|
|
|
.ERROR: .SILENT
|
|
|
|
if ! which $(GMAKE) > /dev/null; then \
|
|
|
|
echo "GNU Make is required!"; \
|
|
|
|
fi
|