From 71fa5147139f85cb0d14ded74b04b39dd52f776b Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Wed, 1 Feb 2017 10:48:21 +0100 Subject: Add LINK_OPT and document it. The new Makefile variable LINK_OPT can be used to specify additional linker flags for different operating systems, like linking with setargv.obj under windows. Bug 20871 --- Makefile.extr | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'Makefile.extr') diff --git a/Makefile.extr b/Makefile.extr index 8fdc9ffe..fb19dd00 100644 --- a/Makefile.extr +++ b/Makefile.extr @@ -17,10 +17,23 @@ include Makefile.config +# +# Variables from Makefile.config: +# -OCAML_OPT_COMP: can we use the native version +# -COMPFLAGS: compile options +# -LINK_OPT: additional linker flags for the native binary +# + # Menhir configuration. include Makefile.menhir +# +# Variables from Makefile.menhir: +# -MENHIR_INCLUDES: additional menhir include paths +# -MENHIR_LIBS: additional menhir libraries +# + # The pre-parser's error message database is compiled as follows. cparser/pre_parser_messages.ml: @@ -80,7 +93,7 @@ CCOMP_OBJS:=$(shell $(MODORDER) driver/Driver.cmx) ccomp: $(CCOMP_OBJS) @echo "Linking $@" - @$(OCAMLOPT) -o $@ $(LIBS) $+ + @$(OCAMLOPT) -o $@ $(LIBS) $(LINK_OPT) $+ ccomp.byte: $(CCOMP_OBJS:.cmx=.cmo) @echo "Linking $@" @@ -90,7 +103,7 @@ CLIGHTGEN_OBJS:=$(shell $(MODORDER) exportclight/Clightgen.cmx) clightgen: $(CLIGHTGEN_OBJS) @echo "Linking $@" - @$(OCAMLOPT) -o $@ $(LIBS) $+ + @$(OCAMLOPT) -o $@ $(LIBS) $(LINK_OPT) $+ clightgen.byte: $(CLIGHTGEN_OBJS:.cmx=.cmo) @echo "Linking $@" -- cgit