diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2017-02-01 10:48:21 +0100 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2017-02-01 10:48:21 +0100 |
commit | 71fa5147139f85cb0d14ded74b04b39dd52f776b (patch) | |
tree | 5e7216624f6c076a3f33a8ff3006d19a3603ce11 /Makefile.extr | |
parent | f1df4fcf671ac0cdb4ddf51d2af20b3eb10af61e (diff) | |
download | compcert-kvx-71fa5147139f85cb0d14ded74b04b39dd52f776b.tar.gz compcert-kvx-71fa5147139f85cb0d14ded74b04b39dd52f776b.zip |
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
Diffstat (limited to 'Makefile.extr')
-rw-r--r-- | Makefile.extr | 17 |
1 files changed, 15 insertions, 2 deletions
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 $@" |