diff options
Diffstat (limited to 'roms/openbios/Makefile')
-rw-r--r-- | roms/openbios/Makefile | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/roms/openbios/Makefile b/roms/openbios/Makefile index 74e462c8c..172f4507b 100644 --- a/roms/openbios/Makefile +++ b/roms/openbios/Makefile @@ -1,5 +1,4 @@ -ODIRS=$(wildcard obj-*) -TARGETS=$(subst obj-,,$(ODIRS)) +include config-host.mak all: requirements info build @@ -16,18 +15,24 @@ clean: $(MAKE) -C $$dir clean; \ done -build: - @printf "Building..." +build: start-build @for dir in $(ODIRS); do \ $(MAKE) -C $$dir > $$dir/build.log 2>&1 && echo "ok." || \ ( echo "error:"; tail -15 $$dir/build.log; exit 1 ) \ done -build-verbose: +SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGETS)) +SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory) + +quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1)) + +build-verbose: start-build $(SUBDIR_RULES) + +subdir-%: + $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C obj-$* V="$(V)" all,) + +start-build: @echo "Building..." - @for dir in $(ODIRS); do \ - $(MAKE) -C $$dir || exit 1; \ - done run: @echo "Running..." |