star-3d

Surface structuring for efficient 3D geometric queries
git clone git://git.meso-star.fr/star-3d.git
Log | Files | Refs | README | LICENSE

commit fd8ecc568dcf914ad3e4e340bc861a230b371a91
parent aa33bff0ffdcedcbabb40ef64a76003e8ae63ade
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 19 Jul 2023 11:43:45 +0200

Update Makefile targets of the tests

The tests depend on the linker flags set in the config.mk file. This
dependency is not really necessary since these executables depend on
their object file which themselves depend on the config.mk file. So in
any case, their linking would be redone even without this change which
in all rigor remains necessary.

Like .o files, the .d files depend on the contents of the config.mk file
and the local pkg-config file of the library, including the value of
build flags such as include directories to search for headers and macro
definitions. In addition, the .d files of the tests no longer use the
inference rule defined for the library and now rely on its own targets
with its own compilation flags used for its compilation. If in practice
this does not change anything, it is more rigorous

Diffstat:
MMakefile | 11++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile @@ -48,7 +48,7 @@ build_library: .config $(DEP) echo "$(LIBNAME_SHARED)";\ fi) -$(OBJ) $(DEP): config.mk +$(DEP) $(OBJ): config.mk $(LIBNAME_SHARED): $(OBJ) $(CC) -std=c99 $(CFLAGS) $(DPDC_CFLAGS) -o $@ $(OBJ) $(LDFLAGS) $(SOFLAGS) $(DPDC_LIBS) @@ -160,9 +160,10 @@ test: build_tests clean_test: @$(SHELL) make.sh clean_test $(TEST_SRC) -$(TEST_OBJ) $(TEST_DEP): config.mk +$(TEST_DEP): config.mk s3d-local.pc + @$(CC) -std=c89 $(CFLAGS) $(S3D_CFLAGS) -MM -MT "$(@:.d=.o) $@" $(@:.d=.c) -MF $@ -$(TEST_OBJ): s3d-local.pc +$(TEST_OBJ): config.mk s3d-local.pc $(CC) -std=c89 $(CFLAGS) $(S3D_CFLAGS) -c $(@:.o=.c) -o $@ test_s3d_device \ @@ -172,7 +173,7 @@ test_s3d_scene \ test_s3d_scene_view_aabb \ test_s3d_scene_view \ test_s3d_shape \ -: s3d-local.pc +: config.mk s3d-local.pc $(CC) -o $@ src/$@.o $(LDFLAGS) $(S3D_LIBS) test_s3d_accel_struct_conf \ @@ -185,5 +186,5 @@ test_s3d_sphere_instance \ test_s3d_trace_ray \ test_s3d_trace_ray_instance \ test_s3d_trace_ray_sphere \ -: s3d-local.pc +: config.mk s3d-local.pc $(CC) -o $@ src/$@.o $(LDFLAGS) $(S3D_LIBS) -lm