aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile11
1 files changed, 8 insertions, 3 deletions
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 ---------------------------------------------------------------------