diff --git a/Makefile.build_config.in b/Makefile.build_config.in index 86433f90fa72..2a909e2b24b5 100644 --- a/Makefile.build_config.in +++ b/Makefile.build_config.in @@ -50,6 +50,20 @@ INSTALL_OCAMLNAT = @install_ocamlnat@ DEP_CC=@DEP_CC@ -MM COMPUTE_DEPS=@compute_deps@ +# Build-system flags to use to compile C files +OC_CFLAGS=@oc_cflags@ +OC_CPPFLAGS=-I$(ROOTDIR)/runtime @oc_cppflags@ + +# Additional link-time options +# To support dynamic loading of shared libraries (they need to look at +# our own symbols): +OC_LDFLAGS=@oc_ldflags@ +OC_DLL_LDFLAGS=@oc_dll_ldflags@ +OC_EXE_LDFLAGS=@oc_exe_ldflags@ + +MKEXE_VIA_CC=\ + $(CC) $(OC_EXE_LDFLAGS) $(OC_CFLAGS) $(CFLAGS) @mkexe_via_cc_ldflags@ + # Which tool to use to display differences between files DIFF=@DIFF@ # Which flags to pass to the diff tool diff --git a/Makefile.config.in b/Makefile.config.in index c8d6966c407c..d56dc96ecdad 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -78,13 +78,6 @@ CC=@CC@ CC_HAS_DEBUG_PREFIX_MAP=@cc_has_debug_prefix_map@ AS_HAS_DEBUG_PREFIX_MAP=@as_has_debug_prefix_map@ -### Additional link-time options -# To support dynamic loading of shared libraries (they need to look at -# our own symbols): -OC_LDFLAGS=@oc_ldflags@ -OC_DLL_LDFLAGS=@oc_dll_ldflags@ -OC_EXE_LDFLAGS=@oc_exe_ldflags@ - LDFLAGS?=@LDFLAGS@ ### How to invoke the C preprocessor through the C compiler @@ -175,9 +168,7 @@ OTHERLIBRARIES=@otherlibraries@ UNIX_OR_WIN32=@unix_or_win32@ INSTALL_SOURCE_ARTIFACTS=@install_source_artifacts@ -OC_CFLAGS=@oc_cflags@ CFLAGS=@CFLAGS@ -OC_CPPFLAGS=-I$(ROOTDIR)/runtime @oc_cppflags@ CPPFLAGS=@CPPFLAGS@ OCAMLC_CFLAGS=@ocamlc_cflags@ @@ -214,8 +205,6 @@ MKEXE=@mkexe@ MKDLL=@mkdll@ MKMAINDLL=@mkmaindll@ MKEXEDEBUGFLAG=@mkexedebugflag@ -MKEXE_VIA_CC=\ - $(CC) $(OC_EXE_LDFLAGS) $(OC_CFLAGS) $(CFLAGS) @mkexe_via_cc_ldflags@ RUNTIMED=@debug_runtime@ INSTRUMENTED_RUNTIME=@instrumented_runtime@