From 486d6fdd590270c925b4306096ba8bf6d69125ef Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Sun, 27 Aug 2023 21:19:41 +0200 Subject: make: rename build folder and use cmake cache files as make output/deps --- Makefile | 18 +++++++++--------- 1 file 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 -- cgit v1.2.3