commit fd58ed0204dccb73827ddab5cbaa85517f25d98c
parent 56f0b759acee0915a292f39bd6266e6e5c826700
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 27 Oct 2023 11:26:02 +0200
Updated test link edition
Add the library as a dependency of the tests that must be linked to it.
This forces make to rerun the linker if the library is changed.
Make sure that the pkg-config directive for the local library appears as
the first library to be linked, to ensure that libraries are searched
for in the local path first. This is because the linker will search
directories in the left-to-right order in which the -L option appears.
So, to force link editing with the local version of the local library,
the -L./ directive must appear first on the link-editing command line.
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
@@ -168,8 +168,8 @@ src/suvm_voxelize.o: config.mk suvm-local.pc
test_suvm_device \
test_suvm_volume \
test_suvm_primitive_intersection \
-: config.mk suvm-local.pc
- $(CC) -std=c89 $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(RSYS_LIBS) $(SUVM_LIBS) -lm
+: config.mk suvm-local.pc $(LIBNAME)
+ $(CC) -std=c89 $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(SUVM_LIBS) $(RSYS_LIBS) -lm
-suvm_voxelize: config.mk suvm-local.pc
- $(CC) -std=c89 $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(RSYS_LIBS) $(SUVM_LIBS) $(SMSH_LIBS) -lm
+suvm_voxelize: config.mk suvm-local.pc $(LIBNAME)
+ $(CC) -std=c89 $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(SUVM_LIBS) $(RSYS_LIBS) $(SMSH_LIBS) -lm