aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2023-08-27 21:19:41 +0200
committerJohannes Stoelp <johannes.stoelp@gmail.com>2023-08-27 21:19:41 +0200
commit486d6fdd590270c925b4306096ba8bf6d69125ef (patch)
tree0435a869414ea9a9668dbd5d719cdc977d5270fd
parentf396fab26611d6107e223a6a3f41c9dff3e2ee9e (diff)
downloadsysc-playground-486d6fdd590270c925b4306096ba8bf6d69125ef.tar.gz
sysc-playground-486d6fdd590270c925b4306096ba8bf6d69125ef.zip
make: rename build folder and use cmake cache files as make output/deps
-rw-r--r--Makefile18
1 files changed, 9 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 3631e55..b9aeba2 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ export SYSTEMC_HOME := $(PWD)/INSTALL
SRCS = $(wildcard src/*.cc)
BINS = $(SRCS:src/%.cc=BUILD/PLAYGROUND/%)
-# -- SYSTEMC UTILS -------------------------------------------------------------
+# -- SYSTEMC PLAYGROUND --------------------------------------------------------
run: build
@for B in $(BINS); do \
@@ -14,11 +14,11 @@ run: build
$$B; \
done
-build: INSTALL/lib/libsystemc.a BUILD/UTIL $(SRCS)
- ninja -C BUILD/UTIL
+build: INSTALL/lib/libsystemc.a BUILD/PLAYGROUND/CMakeCache.txt $(SRCS)
+ ninja -C BUILD/PLAYGROUND
-BUILD/UTIL: CMakeLists.txt
- cmake -B $@ -S . \
+BUILD/PLAYGROUND/CMakeCache.txt: CMakeLists.txt
+ cmake -B BUILD/PLAYGROUND $@ -S . \
-G Ninja \
-DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
-DCMAKE_BUILD_TYPE=DEBUG \
@@ -27,11 +27,11 @@ BUILD/UTIL: CMakeLists.txt
# -- SYSTEMC -------------------------------------------------------------------
-INSTALL/lib/libsystemc.a: BUILD/SYSC
+INSTALL/lib/libsystemc.a: BUILD/SYSC/CMakeCache.txt
ninja -C BUILD/SYSC install
-BUILD/SYSC: systemc
- cmake -B $@ -S systemc \
+BUILD/SYSC/CMakeCache.txt: systemc
+ cmake -B BUILD/SYSC -S systemc \
-G Ninja \
-DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
-DCMAKE_BUILD_TYPE=DEBUG \
@@ -50,7 +50,7 @@ fmt:
# -- CLEAN ---------------------------------------------------------------------
clean:
- $(RM) -r BUILD/UTIL compile_commands.json
+ $(RM) -r BUILD/PLAYGROUND compile_commands.json
distclean: clean
$(RM) -r BUILD INSTALL systemc