commit bbc4ea300b4c41211a319fb0fe0f9b146922fbb1
parent c39b3c9f5bf6e902652b81e231e4b35775b3295f
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Thu, 19 Oct 2023 10:36:31 +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
@@ -152,5 +152,5 @@ src/test_s3daw.d: config.mk s3daw-local.pc
src/test_s3daw.o: config.mk s3daw-local.pc
$(CC) $(CFLAGS_EXE) $(S3D_CFLAGS) $(S3DAW_CFLAGS) $(RSYS_CFLAGS) -c $(@:.o=.c) -o $@
-test_s3daw: src/test_s3daw.o config.mk s3daw-local.pc
- $(CC) $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(S3D_LIBS) $(S3DAW_LIBS) $(RSYS_LIBS)
+test_s3daw: src/test_s3daw.o config.mk s3daw-local.pc $(LIBNAME)
+ $(CC) $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(S3DAW_LIBS) $(S3D_LIBS) $(RSYS_LIBS)