commit 98e45be161ed9cc2e8d263e0a4a6f91a71b68230
parent 89dfc4131442c9ce403cb02930d5f516c5be8eae
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Mon, 3 Jul 2023 08:19:19 +0200
Fix default and distclean make targets
These targets use the DEP macros defined from the SIMD_WIDTH macro which
is set dynamically when invoking make. They therefore depend on the
.simd file which stores the current value of SIMD_WIDTH. This
commit adds this missing dependency.
Diffstat:
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
@@ -31,7 +31,9 @@ SRC = $(SRC_SIMD$(SIMD_WIDTH))
OBJ = $(SRC:.c=.o)
DEP = $(SRC:.c=.d)
-build_library: .simd .pkg $(DEP)
+build_library:
+
+build_library__: .pkg $(DEP)
@$(MAKE) -f.simd -fMakefile $$(for i in $(DEP); do echo -f $${i}; done) \
$$(if [ -n "$(LIBNAME)" ]; then\
echo "$(LIBNAME)";\
@@ -73,13 +75,13 @@ all: build_library build_tests
clean__: clean_test
rm -f $(OBJ) $(TEST_OBJ) $(LIBNAME) rsimd.pc .pkg .simd
-distclean: clean
- @rm -f $(DEP) $(TEST_DEP) .test
+distclean__: clean__
+ rm -f $(DEP) $(TEST_DEP) .test
lint:
shellcheck -o all make.sh
-build_tests clean install .test test uninstall: .simd
+build_library build_tests clean distclean install .test test uninstall: .simd
@$(MAKE) -f.simd -fMakefile $@__
################################################################################