From 2f011257299cc7d7073b752453dcac254df7a018 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Wed, 1 Nov 2023 19:09:54 +0100 Subject: cmake/make: minor cleanups and fixes --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 83d3544..54ac0ae 100644 --- a/Makefile +++ b/Makefile @@ -9,12 +9,12 @@ ifeq ($V,1) CCTEST_FLAGS += --verbose endif -SRCS = $(wildcard src/*.cc) +SRCS = $(shell find src test -type f -name \*.h -or -name \*.cc) BINS = $(SRCS:src/%.cc=BUILD/PLAYGROUND/%) # -- SYSTEMC PLAYGROUND -------------------------------------------------------- -build: INSTALL/lib/libsystemc.a BUILD/PLAYGROUND/CMakeCache.txt $(SRCS) +build: $(SYSTEMC_HOME)/lib/libsystemc.a BUILD/PLAYGROUND/CMakeCache.txt $(SRCS) ninja -C BUILD/PLAYGROUND $(NINJA_FLAGS) run: build @@ -37,7 +37,7 @@ BUILD/PLAYGROUND/CMakeCache.txt: CMakeLists.txt # -- SYSTEMC ------------------------------------------------------------------- -INSTALL/lib/libsystemc.a: BUILD/SYSC/CMakeCache.txt +$(SYSTEMC_HOME)/lib/libsystemc.a: BUILD/SYSC/CMakeCache.txt ninja -C BUILD/SYSC install $(NINJA_FLAGS) BUILD/SYSC/CMakeCache.txt: systemc @@ -45,7 +45,7 @@ BUILD/SYSC/CMakeCache.txt: systemc -G Ninja \ -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \ -DCMAKE_BUILD_TYPE=DEBUG \ - -DCMAKE_INSTALL_PREFIX=$(PWD)/INSTALL \ + -DCMAKE_INSTALL_PREFIX=$(SYSTEMC_HOME) \ -DBUILD_SHARED_LIBS=OFF \ -DCMAKE_CXX_STANDARD=14 @@ -63,4 +63,4 @@ clean: $(RM) -r BUILD/PLAYGROUND compile_commands.json distclean: clean - $(RM) -r BUILD INSTALL systemc + $(RM) -r BUILD $(SYSTEMC_HOME) systemc -- cgit v1.2.3