From c1a82d50ef1d8adc4bdc5bd95c6777ae74f16b3b Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Sun, 29 Oct 2023 23:33:36 +0100 Subject: make: make build default target, link compile commands --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Makefile') 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 ------------------------------------------------------------------- -- cgit v1.2.3