aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2023-10-29 23:33:36 +0100
committerJohannes Stoelp <johannes.stoelp@gmail.com>2023-10-29 23:33:36 +0100
commitc1a82d50ef1d8adc4bdc5bd95c6777ae74f16b3b (patch)
treea4636f890fead0f03c37d460b6154dcea1134b7a /Makefile
parentb0b6a7d7f4de63fba2ba91a98cecec1bd57d03f1 (diff)
downloadsysc-playground-c1a82d50ef1d8adc4bdc5bd95c6777ae74f16b3b.tar.gz
sysc-playground-c1a82d50ef1d8adc4bdc5bd95c6777ae74f16b3b.zip
make: make build default target, link compile commands
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index ea6e11f..6e41117 100644
--- a/Makefile
+++ b/Makefile
@@ -13,15 +13,15 @@ BINS = $(SRCS:src/%.cc=BUILD/PLAYGROUND/%)
# -- SYSTEMC PLAYGROUND --------------------------------------------------------
+build: INSTALL/lib/libsystemc.a BUILD/PLAYGROUND/CMakeCache.txt $(SRCS)
+ ninja -C BUILD/PLAYGROUND $(NINJA_FLAGS)
+
run: build
@for B in $(BINS); do \
echo "==> $$B"; \
$$B; \
done
-build: INSTALL/lib/libsystemc.a BUILD/PLAYGROUND/CMakeCache.txt $(SRCS)
- ninja -C BUILD/PLAYGROUND $(NINJA_FLAGS)
-
test: build
cd BUILD/PLAYGROUND && ctest --output-on-failure
@@ -31,6 +31,7 @@ BUILD/PLAYGROUND/CMakeCache.txt: CMakeLists.txt
-DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
-DCMAKE_BUILD_TYPE=DEBUG \
#-DCMAKE_FIND_DEBUG_MODE=ON
+ ln -sfn BUILD/PLAYGROUND/compile_commands.json
#ninja -C $@ -t compdb > compile_commands.json
# -- SYSTEMC -------------------------------------------------------------------