From f0646cfa16d909b107e81dafd2f3c8f80d28a5f8 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Sun, 29 Oct 2023 14:44:47 +0100 Subject: make: add V parameter to control verbose build --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b9aeba2..ec155df 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,11 @@ export CXX = clang++ export SYSTEMC_HOME := $(PWD)/INSTALL +V ?= 0 +ifeq ($V,1) + NINJA_FLAGS += --verbose +endif + SRCS = $(wildcard src/*.cc) BINS = $(SRCS:src/%.cc=BUILD/PLAYGROUND/%) @@ -15,7 +20,7 @@ run: build done build: INSTALL/lib/libsystemc.a BUILD/PLAYGROUND/CMakeCache.txt $(SRCS) - ninja -C BUILD/PLAYGROUND + ninja -C BUILD/PLAYGROUND $(NINJA_FLAGS) BUILD/PLAYGROUND/CMakeCache.txt: CMakeLists.txt cmake -B BUILD/PLAYGROUND $@ -S . \ @@ -28,7 +33,7 @@ BUILD/PLAYGROUND/CMakeCache.txt: CMakeLists.txt # -- SYSTEMC ------------------------------------------------------------------- INSTALL/lib/libsystemc.a: BUILD/SYSC/CMakeCache.txt - ninja -C BUILD/SYSC install + ninja -C BUILD/SYSC install $(NINJA_FLAGS) BUILD/SYSC/CMakeCache.txt: systemc cmake -B BUILD/SYSC -S systemc \ @@ -45,7 +50,7 @@ systemc: # -- UTIL ---------------------------------------------------------------------- fmt: - clang-format -i src/*.cc src/*.h + clang-format -i $(shell find src -type f) # -- CLEAN --------------------------------------------------------------------- -- cgit v1.2.3