Skip to content

Commit

Permalink
Added Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
lucadealfaro committed Feb 14, 2008
1 parent a0bb65b commit 37e323b
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
OUR_LD_ADD = str.cma unix.cma
OUR_OPTLD_ADD = str.cmxa unix.cmxa
INCLUDES =

OCAMLC=ocamlc
OCAMLOPT=ocamlopt
OCAMLMKTOP=ocamlmktop

OCAMLLEX=ocamllex
OCAMLYACC=ocamlyacc
OCAMLDEP=ocamldep
OCAMLMKLIB=ocamlmklib
OCAMLDOC=ocamldoc
OCAMLFIND_C=ocamlfind ocamlcp
OCAMLFIND_COPT=ocamlfind ocamlopt

SUFFIXES= .ml .cmo .cmi .cmx

# OCAMLDEBUG = -g -p film
OCAMLDEBUG = -g

# Flags for commands, depending on optimization/debugging, and db/non-db
OCAML_CFLAGS=$(INCLUDES) $(OCAMLDEBUG)
OCAMLOPT_FLAGS=$(INCLUDES)

%.cmo: %.ml
@echo '$(OCAMLC) $(OCAML_CFLAGS) -c $<'; \
$(OCAMLC) $(OCAML_CFLAGS) -c $<

%.cmi: %.mli
@echo '$(OCAMLC) $(OCAML_CFLAGS) -c $<'; \
$(OCAMLC) $(OCAML_CFLAGS) -c $<

%.cmx: %.ml
@echo '$(OCAMLOPT) $(OCAMLOPT_FLAGS) -c $<'; \
$(OCAMLOPT) $(OCAMLOPT_FLAGS) -c $<

.PHONY: all clean


# Objects

vec: vec.cmo
vecopt: vec.cmx

mapmin: mapmin.cmo
mapminopt: mapmin.cmx

intvmap: intvmap.cmo
intvmapopt: intvmap.cmx

hashtbl_bounded: hashtbl_bounded.cmo
hashtbl_boundedopt: hashtbl_bounded.cmx

all: vec.cmo mapmin.cmo intvmap.cmo hashtbl_bounded.cmo

allopt: vec.cmx mapmin.cmx intvmap.cmx hashtbl_bounded.cmx

clean:
rm -f *.o *.cmo *.cmx *.cmi .depends

.depends: *.ml
$(OCAMLDEP) $^ > $@

-include .depends

0 comments on commit 37e323b

Please sign in to comment.