star-mc

Parallel estimation of Monte Carlo integrators
git clone git://git.meso-star.fr/star-mc.git
Log | Files | Refs | README | LICENSE

commit e81e4bd3d1088963c38f3170f80e1c4af17ebe74
parent 169154d0b0f5709ec2856a6ebc318b2cb6aa0d96
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 19 Jul 2023 16:46:41 +0200

Update Makefile targets of test .d files

Add the config.mk file and the local pkg-config file as a dependency of
the test .d files, as both set build flags that can affect their
compulation, such as include directives and macro definitions. Also, the
command to create these .d files is no longer the inference rule defined
for library .d files. These are now specific commands with their own
compilation flags that differ from the inference rule mentioned above.
It is not only more rigorous but also more robust.

Diffstat:
MMakefile | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile @@ -150,9 +150,10 @@ test: build_tests clean_test: @$(SHELL) make.sh clean_test $(TEST_SRC) $(TEST_SRC_S3D) -$(TEST_OBJ) $(TEST_OBJ_S3D): config.mk smc-local.pc +$(TEST_DEP): config.mk smc-local.pc + @$(CC) $(CFLAGS) $(SMC_CFLAGS) -MM -MT "$(@:.d=.o) $@" $(@:.d=.c) -MF $@ -$(TEST_OBJ): +$(TEST_OBJ): config.mk smc-local.pc $(CC) $(CFLAGS) $(SMC_CFLAGS) -c $(@:.o=.c) -o $@ test_smc_device: config.mk smc-local.pc @@ -164,7 +165,10 @@ test_smc_solve \ : config.mk smc-local.pc $(CC) -o $@ src/$@.o $(LDFLAGS) $(SMC_LIBS) -lm -$(TEST_OBJ_S3D): +$(TEST_DEP_S3D): config.mk smc-local.pc + @$(CC) $(CFLAGS) $(SMC_CFLAGS) $(S3D_CFLAGS) -MM -MT "$(@:.d=.o) $@" $(@:.d=.c) -MF $@ + +$(TEST_OBJ_S3D): config.mk smc-local.pc $(CC) $(CFLAGS) $(SMC_CFLAGS) $(S3D_CFLAGS) -c $(@:.o=.c) -o $@ test_smc_light_path: config.mk smc-local.pc