rnsf

Define and load a phase function data format
git clone git://git.meso-star.fr/rnsf.git
Log | Files | Refs | README | LICENSE

commit 2c5b5fbad8b6831e295c976a8f13b579710ee42d
parent 41f1cd43f1003d655d1fb7905b27f64632cad2c8
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Tue, 31 Oct 2023 12:01:37 +0100

Update test compilation and 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 compiler flag to be used and the first library to be linked,
to ensure that headers and libraries are searched for first in the local
path. This is because the compiler and linker look for directories in
the left-to-right order in which the -I and -L options appear.  So, to
force inclusion of local headers and link editing with the local version
of the library, the -I./src and -L./ directives must appear first when
compiling and linking.

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

diff --git a/Makefile b/Makefile @@ -147,15 +147,15 @@ clean_test: $(SHELL) make.sh clean_test $(TEST_SRC) test_file_bands.rnsf $(TEST_DEP): config.mk rnsf-local.pc - @$(CC) $(CFLAGS_EXE) $(RSYS_CFLAGS) $(RNSF_CFLAGS) \ + @$(CC) $(CFLAGS_EXE) $(RNSF_CFLAGS) $(RSYS_CFLAGS) \ -MM -MT "$(@:.d=.o) $@" $(@:.d=.c) -MF $@ $(TEST_OBJ): config.mk rnsf-local.pc - $(CC) $(CFLAGS_EXE) $(RSYS_CFLAGS) $(RNSF_CFLAGS) -c $(@:.o=.c) -o $@ + $(CC) $(CFLAGS_EXE) $(RNSF_CFLAGS) $(RSYS_CFLAGS) -c $(@:.o=.c) -o $@ test_rnsf \ test_rnsf_bands \ test_rnsf_wlens \ test_rnsf_load \ -: config.mk rnsf-local.pc - $(CC) $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(RSYS_LIBS) $(RNSF_LIBS) +: config.mk rnsf-local.pc $(LIBNAME) + $(CC) $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(RNSF_LIBS) $(RSYS_LIBS)