diff options
Diffstat (limited to 'testsuite/makefiles/Makefile.common')
| -rw-r--r-- | testsuite/makefiles/Makefile.common | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/testsuite/makefiles/Makefile.common b/testsuite/makefiles/Makefile.common index 20af7ea4b9..ae6aceaa2e 100644 --- a/testsuite/makefiles/Makefile.common +++ b/testsuite/makefiles/Makefile.common @@ -37,19 +37,27 @@ SET_LD_PATH=CAML_LD_LIBRARY_PATH="$(LD_PATH)" # SORT is the Unix "sort" command. Usually a simple command, but may be an # absolute name if the Windows "sort" command is in the PATH. # SET_LD_PATH is a command prefix that sets the path for dynamic libraries -# (LD_LIBRARY_PATH for Unix, PATH for Windows) using the LD_PATH shell +# (CAML_LD_LIBRARY_PATH for Unix, PATH for Windows) using the LD_PATH shell # variable. Note that for Windows we add Unix-syntax directory names in # PATH, and Cygwin will translate it to Windows syntax. include $(TOPDIR)/config/Makefile +OCAMLRUN=$(TOPDIR)/boot/ocamlrun$(EXE) + OCFLAGS=-nostdlib -I $(OTOPDIR)/stdlib $(COMPFLAGS) OCOPTFLAGS= +ifeq ($(SUPPORTS_SHARED_LIBRARIES),false) + CUSTOM = -custom +else + CUSTOM = +endif + OCAML=$(OCAMLRUN) $(OTOPDIR)/ocaml $(OCFLAGS) \ -init $(OTOPDIR)/testsuite/lib/empty -OCAMLC=$$($(CAMLC_BIN_CMD_TO_EVAL)) $(OCFLAGS) -OCAMLOPT=$$($(CAMLOPT_BIN_CMD_TO_EVAL)) $(OCFLAGS) $(OCOPTFLAGS) +OCAMLC=$(OCAMLRUN) $(OTOPDIR)/ocamlc $(CUSTOM) $(OCFLAGS) +OCAMLOPT=$(OCAMLRUN) $(OTOPDIR)/ocamlopt $(OCFLAGS) OCAMLDOC=$(OCAMLRUN) $(OTOPDIR)/ocamldoc/ocamldoc OCAMLLEX=$(OCAMLRUN) $(OTOPDIR)/lex/ocamllex OCAMLMKLIB=$(OCAMLRUN) $(OTOPDIR)/tools/ocamlmklib \ @@ -84,23 +92,23 @@ defaultclean: .SUFFIXES: .mli .ml .mly .mll .cmi .cmo .cmx .cmm .cmxa .s .S .o .so .c .f .mli.cmi: - $(OCAMLC) -c $(ADD_COMPFLAGS) $< + @$(OCAMLC) -c $(ADD_COMPFLAGS) $< .ml.cmi: - $(OCAMLC) -c $(ADD_COMPFLAGS) $< + @$(OCAMLC) -c $(ADD_COMPFLAGS) $< .ml.cmo: @if [ -f $<i ]; then $(OCAMLC) -c $(ADD_COMPFLAGS) $<i; fi - $(OCAMLC) -c $(ADD_COMPFLAGS) $< + @$(OCAMLC) -c $(ADD_COMPFLAGS) $< .ml.cmx: - $(OCAMLOPT) -c $(ADD_COMPFLAGS) $< + @$(OCAMLOPT) -c $(ADD_COMPFLAGS) $< .cmx.so: - $(OCAMLOPT) -o $@ -shared $(ADD_COMPFLAGS) $< + @$(OCAMLOPT) -o $@ -shared $(ADD_COMPFLAGS) $< .cmxa.so: - $(OCAMLOPT) -o $@ -shared -linkall $(ADD_COMPFLAGS) $< + @$(OCAMLOPT) -o $@ -shared -linkall $(ADD_COMPFLAGS) $< .mly.ml: @$(OCAMLYACC) -q $< 2> /dev/null |
