loader_aw

Load OBJ/MTL file formats
git clone git://git.meso-star.fr/loader_aw.git
Log | Files | Refs | README | LICENSE

commit e66e856d32f5c214eeb3eb2d5778e514986ef91c
parent 84acb8b06766072bac001c662f24ec163276bf69
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 19 Jul 2023 09:04:50 +0200

Update Makefile targets of .d files

Like .o files, they depend on the contents of the config.mk file,
including the value of build flags such as include directories to search
for headers and macro definitions. Finally, 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 | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile @@ -37,7 +37,7 @@ build_library: .config $(DEP) echo "$(LIBNAME_SHARED)";\ fi) -$(OBJ): config.mk +$(DEP) $(OBJ): config.mk $(LIBNAME_SHARED): $(OBJ) $(CC) $(CFLAGS) $(RSYS_CFLAGS) -o $@ $(OBJ) $(LDFLAGS) $(SOFLAGS) $(RSYS_LIBS) @@ -132,7 +132,12 @@ clean_test: @rm -f mtl0.mtl test_mtl_common.mtl test_mtl_multi.mtl @$(SHELL) make.sh clean_test $(TEST_SRC) -$(TEST_OBJ): config.mk aw-local.pc +$(TEST_DEP) $(TEST_OBJ): config.mk aw-local.pc + +$(TEST_DEP): + @$(CC) $(CFLAGS) $(AW_CFLAGS) $(RSYS_CFLAGS) -MM -MT "$(@:.d=.o) $@" $(@:.d=.c) -MF $@ + +$(TEST_OBJ): $(CC) $(CFLAGS) $(AW_CFLAGS) $(RSYS_CFLAGS) -c $(@:.o=.c) -o $@ test_aw \