rsimd

Make SIMD instruction sets easier to use
git clone git://git.meso-star.fr/rsimd.git
Log | Files | Refs | README | LICENSE

commit 3442ad84df86404f40442dd7aaa87089bb2ddbe1
parent 432fcaaf5d2550bf6b2360317083a6e056980176
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 19 Jul 2023 11:32:36 +0200

Update Makefile targets of tests and .d files

The tests depend on the linker flags set in the config.mk file. This
dependency is not really necessary since these executables depend on
their object file which themselves depend on the config.mk file. So in
any case, their linking would be redone even without this change which
in all rigor remains necessary.

Like .o files, the .d files depend on the contents of the config.mk
file, including the value of build flags such as include directories to
search for headers and macro definitions. In addition, the .d files of the
tests no longer use the inference rule defined for the library and now
rely on its own targets with its own compilation flags used for its
compilation. If in practice this does not change anything, it is more
rigorous.

Diffstat:
MMakefile | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile @@ -41,7 +41,7 @@ build_library__: .config $(DEP) echo "$(LIBNAME_SHARED)";\ fi) -$(OBJ): config.mk +$(DEP) $(OBJ): config.mk $(LIBNAME_SHARED): $(OBJ) $(CC) -std=c99 $(CFLAGS) $(DPDC_CFLAGS) -o $@ $(OBJ) $(LDFLAGS) $(SOFLAGS) $(DPDC_LIBS) @@ -195,11 +195,14 @@ test__: build_tests__ @$(SHELL) make.sh run_test $(TEST_SRC) .test__: Makefile make.sh - $(SHELL) make.sh config_test $(TEST_SRC) > .test + @$(SHELL) make.sh config_test $(TEST_SRC) > .test clean_test: @$(SHELL) make.sh clean_test $(TEST_SRC) +$(TEST_DEP): config.mk rsimd-local.pc + @$(CC) -std=c89 $(CFLAGS) $(RSIMD_CFLAGS) $(RSYS_CFLAGS) -MM -MT "$(@:.d=.o) $@" $(@:.d=.c) -MF $@ + $(TEST_OBJ): config.mk rsimd-local.pc $(CC) -std=c89 $(CFLAGS) $(RSIMD_CFLAGS) $(RSYS_CFLAGS) -c $(@:.o=.c) -o $@ @@ -214,10 +217,10 @@ test_soa8f3 \ test_soa8f4 \ test_v4f \ test_v4i \ -: rsimd-local.pc +: config.mk rsimd-local.pc $(CC) -o $@ src/$@.o $(LDFLAGS) $(RSIMD_LIBS) $(RSYS_LIBS) test_math4 \ test_math8 \ -: rsimd-local.pc +: config.mk rsimd-local.pc $(CC) -o $@ src/$@.o $(LDFLAGS) $(RSIMD_LIBS) $(RSYS_LIBS) -lm