commit 8580d0eb70ea9f9158f602f4627105e54dd74a3d
parent 1ea55be296262d86c55ed841f230e150b3969870
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Thu, 19 Oct 2023 11:13:52 +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, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
@@ -148,5 +148,5 @@ src/test_s3dstl.d: config.mk s3dstl-local.pc
src/test_s3dstl.o: config.mk s3dstl-local.pc
$(CC) $(CFLAGS_EXE) $(RSYS_CFLAGS) $(S3D_CFLAGS) $(S3DSTL_CFLAGS) $(SSTL_CFLAGS) -c $(@:.o=.c) -o $@
-test_s3dstl: src/test_s3dstl.o config.mk s3dstl-local.pc
- $(CC) $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(RSYS_LIBS) $(S3D_LIBS) $(S3DSTL_LIBS) $(SSTL_LIBS)
+test_s3dstl: src/test_s3dstl.o config.mk s3dstl-local.pc $(LIBNAME)
+ $(CC) $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(S3DSTL_LIBS) $(RSYS_LIBS) $(S3D_LIBS) $(SSTL_LIBS)