@@ -665,7 +665,7 @@ endif
665665# when creating shared or static libraries.
666666weak_last = $(filter-out % -weak.o,$(1 ) ) $(filter % -weak.o,$(1 ) )
667667
668- libceed.o = $(libceed.c:%.c=$(OBJDIR ) /%.o ) $(OBJDIR ) /interface/ceed-config.o $( libceed.cpp:%.cpp=$(OBJDIR ) /%.o ) $(libceed.cu:%.cu=$(OBJDIR ) /%.o ) $(libceed.hip:%.hip.cpp=$(OBJDIR ) /%.o ) $(libceed.sycl:%.sycl.cpp=$(OBJDIR ) /%.o )
668+ libceed.o = $(libceed.c:%.c=$(OBJDIR ) /%.o ) $(libceed.cpp:%.cpp=$(OBJDIR ) /%.o ) $(libceed.cu:%.cu=$(OBJDIR ) /%.o ) $(libceed.hip:%.hip.cpp=$(OBJDIR ) /%.o ) $(libceed.sycl:%.sycl.cpp=$(OBJDIR ) /%.o )
669669$(filter % fortran.o,$(libceed.o ) ) : CPPFLAGS += $(if $(filter 1,$(UNDERSCORE ) ) ,-DUNDERSCORE)
670670$(libceed.o ) : | info-backends
671671$(libceed.so ) : $(call weak_last,$(libceed.o ) ) | $$(@D ) /.DIR
@@ -675,10 +675,7 @@ $(libceed.a) : $(call weak_last,$(libceed.o)) | $$(@D)/.DIR
675675 $(call quiet,AR) $(ARFLAGS ) $@ $^
676676
677677$(OBJDIR ) /% .o : $(CURDIR ) /% .c | $$(@D ) /.DIR
678- $(call quiet,CC) $(CPPFLAGS ) $(CFLAGS ) -c -o $@ $(abspath $< )
679-
680- $(OBJDIR ) /% .o : $(OBJDIR ) /% .c | $$(@D ) /.DIR # source files generated in OBJDIR
681- $(call quiet,CC) $(CPPFLAGS ) $(CFLAGS ) -c -o $@ $(abspath $< )
678+ $(call quiet,CC) $(CPPFLAGS ) $(CFLAGS ) $(CONFIGFLAGS ) -c -o $@ $(abspath $< )
682679
683680$(OBJDIR ) /% .o : $(CURDIR ) /% .cpp | $$(@D ) /.DIR
684681 $(call quiet,CXX) $(CPPFLAGS ) $(CXXFLAGS ) -c -o $@ $(abspath $< )
@@ -857,18 +854,9 @@ $(OBJDIR)/ceed.pc : pkgconfig-prefix = $(prefix)
857854
858855GIT_DESCRIBE = $(shell git describe --always --dirty 2>/dev/null || printf "unknown\n")
859856
860- $(OBJDIR ) /interface/ceed-config.c : Makefile
861- @printf ' #include <ceed-impl.h>\n\n' > $@
862- @printf ' int CeedGetGitVersion(const char **git_version) {\n' >> $@
863- @printf ' *git_version = "$(GIT_DESCRIBE)";\n' >> $@
864- @printf ' return 0;\n' >> $@
865- @printf ' }\n\n' >> $@
866- @printf ' int CeedGetBuildConfiguration(const char **build_config) {\n' >> $@
867- @printf ' *build_config =' >> $@
868- @printf " $( foreach v,$( CONFIG_VARS) ,\n\" $( v) = $( $( v) ) \\\n\" ) \n" >> $@
869- @printf ' ;\n' >> $@
870- @printf ' return 0;\n' >> $@
871- @printf ' }\n' >> $@
857+ $(OBJDIR ) /interface/ceed-config.o : Makefile
858+ $(OBJDIR ) /interface/ceed-config.o : CONFIGFLAGS += -DCEED_GIT_VERSION="\"$(GIT_DESCRIBE ) \""
859+ $(OBJDIR ) /interface/ceed-config.o : CONFIGFLAGS += -DCEED_BUILD_CONFIGURATION="\"// Build Configuration:$(foreach v,$(CONFIG_VARS ) ,\n$(v ) = $($(v ) ) ) \""
872860
873861$(OBJDIR ) /interface/ceed-jit-source-root-default.o : CPPFLAGS += -DCEED_JIT_SOURCE_ROOT_DEFAULT="\"$(abspath ./include) /\""
874862$(OBJDIR ) /interface/ceed-jit-source-root-install.o : CPPFLAGS += -DCEED_JIT_SOURCE_ROOT_DEFAULT="\"$(abspath $(includedir ) ) /\""
0 commit comments