aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2023-10-29 14:44:47 +0100
committerJohannes Stoelp <johannes.stoelp@gmail.com>2023-10-29 14:44:47 +0100
commitf0646cfa16d909b107e81dafd2f3c8f80d28a5f8 (patch)
treec1bcfd60317a29d68865ab374972420724338884 /Makefile
parent1cbbafd61cc912015925e69016b357e4f0a800cc (diff)
downloadsysc-playground-f0646cfa16d909b107e81dafd2f3c8f80d28a5f8.tar.gz
sysc-playground-f0646cfa16d909b107e81dafd2f3c8f80d28a5f8.zip
make: add V parameter to control verbose build
Diffstat (limited to 'Makefile')
-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 ---------------------------------------------------------------------