swh:1:snp:2d869aa00591d2ac8ec8e7abacdda563d413189d
Raw File
Tip revision: 0a176436462903e284ece51dfa2789354b16905b authored by Roberto Di Cosmo on 11 November 2011, 13:25 UTC
Specialised parmap on float arrays
Tip revision: 0a17643
Makefile
NAME = parmap
OBJS = $(NAME)
INTF = $(foreach obj, $(OBJS),$(obj).cmi)
C_OBJS = ba_marshal_stubs
OBJECTS  = $(foreach obj, $(OBJS),$(obj).cmo)
XOBJECTS = $(foreach obj, $(OBJS),$(obj).cmx)
LIBS = $(NAME).cma $(NAME).cmxa
OCAMLC   = ocamlfind ocamlc -annot
OCAMLOPT = ocamlfind ocamlopt -annot
OCAMLDEP = ocamldep

ARCHIVE  = $(NAME).cma
XARCHIVE = $(NAME).cmxa

REQUIRES = extlib unix bigarray 

all: $(ARCHIVE) $(XARCHIVE) 

.PHONY: install
install: $(LIBS) META
	ocamlfind remove $(NAME)
	ocamlfind install $(NAME) META $(INTF) $(LIBS) *.a *.mli

.PHONY: uninstall
uninstall:
	ocamlfind remove $(NAME)

$(ARCHIVE): $(OBJECTS)
	$(OCAMLC) -a -o $(ARCHIVE) -package "$(REQUIRES)" $(OBJECTS)
$(XARCHIVE): $(XOBJECTS)
	$(OCAMLOPT) -a -o $(XARCHIVE) -package "$(REQUIRES)" $(XOBJECTS)

.SUFFIXES: .cmo .cmi .cmx .ml .mli

.ml.cmo:
	$(OCAMLC) -package "$(REQUIRES)" -c $<
.mli.cmi:
	$(OCAMLC) -package "$(REQUIRES)" -c $<
.ml.cmx:
	$(OCAMLOPT) -package "$(REQUIRES)" -c $<

depend: *.ml *.mli
	$(OCAMLDEP) *.ml *.mli >.depend

include .depend

.PHONY: clean
clean:
	rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.a *.o
back to top