Makefile.rules 943 Bytes
Newer Older
gerd's avatar
gerd committed
1 2 3 4 5 6 7 8 9 10 11
# Inclusion of Makefile.conf may fail when cleaning up:

-include $(TOP_DIR)/Makefile.conf

# How to invoke compilers and tools:

OCAMLC    = $(OCAMLFIND) ocamlc -g $(OCAMLC_OPTIONS) -package "$(PACKAGES)"
OCAMLOPT  = $(OCAMLFIND) ocamlopt $(OCAMLOPT_OPTIONS) -package "$(PACKAGES)"
OCAMLDEP  = ocamldep $(OCAMLDEP_OPTIONS)
OCAMLFIND = ocamlfind
OCAMLYACC = ocamlyacc
12
OCAMLLEX  = ocamllex$(LEX_OPT)
13
WLEX      = wlex
gerd's avatar
gerd committed
14 15 16 17

TOOLS_DIR = $(TOP_DIR)/tools

M2PARSERGEN    = $(TOOLS_DIR)/m2parsergen
18
LEXPP	       = $(TOOLS_DIR)/lexpp
gerd's avatar
gerd committed
19
COLLECT_FILES  = $(TOOLS_DIR)/collect_files
gerd's avatar
gerd committed
20
IFDEF	       = $(TOOLS_DIR)/ifdef
gerd's avatar
gerd committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

# Files to remove everywhere by "make clean":

CLEAN_LIST = *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa

# Generic build rules:

.SUFFIXES: .cmo .cmi .cmx .ml .mli .mll .mly .m2y

.ml.cmx:
	$(OCAMLOPT) -c $<

.ml.cmo:
	$(OCAMLC) -c $<

.mli.cmi:
	$(OCAMLC) -c $<

.mll.ml:
	$(OCAMLLEX) $<

.mly.ml:
	$(OCAMLYACC) $<

.m2y.ml:
	$(M2PARSERGEN) $<