ocaml/testsuite/makefiles/Makefile.common

74 lines
1.8 KiB
Makefile

# $Id$
TOPDIR=$(BASEDIR)/..
include $(TOPDIR)/config/Makefile
DIFF=diff -q
BOOTDIR=$(TOPDIR)/boot
OCAMLRUN=$(BOOTDIR)/ocamlrun$(EXE)
OCAML=$(OCAMLRUN) $(TOPDIR)/ocaml$(EXE) -I $(TOPDIR)/stdlib
OCAMLC=$(OCAMLRUN) $(TOPDIR)/ocamlc$(EXE) -I $(TOPDIR)/stdlib
OCAMLOPT=$(OCAMLRUN) $(TOPDIR)/ocamlopt$(EXE) -I $(TOPDIR)/stdlib
OCAMLDOC=$(OCAMLRUN) $(TOPDIR)/ocamldoc/ocamldoc$(EXE)
OCAMLLEX=$(OCAMLRUN) $(TOPDIR)/lex/ocamllex$(EXE)
OCAMLMKLIB=$(OCAMLRUN) $(TOPDIR)/tools/ocamlmklib$(EXE)
OCAMLYACC=$(TOPDIR)/yacc/ocamlyacc$(EXE)
OCAMLBUILD=$(TOPDIR)/_build/ocamlbuild/ocamlbuild.native
DUMPOBJ=$(OCAMLRUN) $(TOPDIR)/tool/dumpobj$(EXE)
BYTECODE_ONLY=`if [ "$(ARCH)" = "none" -o "$(ASM)" = "none" ]; then echo 'YES'; else echo ''; fi`
#COMPFLAGS=
#FORTRAN_COMPILER=
#FORTRAN_LIBRARY=
defaultpromote:
@for file in *.reference; do \
cp `basename $$file reference`result $$file; \
done
defaultclean:
@rm -f *.cmo *.cmi *.cmx *.cma *.cmxa *.cmxs *.$(O) *.$(SO) *.$(A)
@for dsym in *.dSYM; do \
if [ -d $$dsym ]; then \
rm -fr $$dsym; \
fi \
done
.SUFFIXES:
.SUFFIXES: .mli .ml .mly .mll .cmi .cmo .cmx .cmm .cmxa .s .S .o .so
.mli.cmi:
@$(OCAMLC) -c $(COMPFLAGS) $(ADD_COMPFLAGS) $<
.ml.cmi:
@$(OCAMLC) -c $(COMPFLAGS) $(ADD_COMPFLAGS) $<
.ml.cmo:
@if [ -f $<i ]; then $(OCAMLC) -c $(COMPFLAGS) $(ADD_COMPFLAGS) $<i; fi
@$(OCAMLC) -c $(COMPFLAGS) $(ADD_COMPFLAGS) $<
.ml.cmx:
@$(OCAMLOPT) -c $(COMPFLAGS) $(ADD_COMPFLAGS) $<
.cmx.so:
@$(OCAMLOPT) -o $@ -shared $(COMPFLAGS) $(ADD_COMPFLAGS) $<
.cmxa.so:
@$(OCAMLOPT) -o $@ -shared -linkall $(COMPFLAGS) $(ADD_COMPFLAGS) $<
.mly.ml:
@$(OCAMLYACC) -q $< 2> /dev/null
.mll.ml:
@$(OCAMLLEX) -q $< > /dev/null
.cmm.o:
@$(OCAMLRUN) ./codegen $*.cmm > $*.s
@$(AS) $(ASFLAGS) -o $*.o $*.s
.S.o:
@$(ASPP) $(ASPPFLAGS) -DSYS_$(SYSTEM) -o $*.o $*.S
.s.o:
@$(ASPP) $(ASPPFLAGS) -DSYS_$(SYSTEM) -o $*.o $*.s