1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 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 48 49 50 51 52 53 54 55 56
|
# make all: make bytecode executables
# make clean: remove intermediate files
# make distclean: remove any superflous files
#----------------------------------------------------------------------
# specific rules for this package:
OBJECTS = procdef.cmo client.cmo server.cmo
REQUIRES = equeue rpc
all: server client
server: $(OBJECTS)
$(OCAMLC) -custom -o server -cclib -lunix \
unix.cma equeue.cma rpc.cma procdef.cmo server.cmo
client: $(OBJECTS)
$(OCAMLMKTOP) -custom -o client -cclib -lunix \
unix.cma equeue.cma rpc.cma procdef.cmo client.cmo
#----------------------------------------------------------------------
# general rules:
OPTIONS =
OCAMLC = $(OCAMLFIND) ocamlc $(OPTIONS) -package "$(REQUIRES)"
OCAMLMKTOP= $(OCAMLFIND) ocamlmktop $(OPTIONS) -package "$(REQUIRES)"
OCAMLOPT = $(OCAMLFIND) ocamlopt $(OPTIONS) -package "$(REQUIRES)"
OCAMLDEP = ocamldep $(OPTIONS)
OCAMLFIND = ocamlfind
depend: *.ml
$(OCAMLDEP) *.ml *.mli >depend
.PHONY: clean
clean:
rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa
.PHONY: distclean
distclean: clean
rm -f *~ client server
.PHONY: CLEAN
CLEAN: clean
.SUFFIXES: .cmo .cmi .cmx .ml .mli
.ml.cmx:
$(OCAMLOPT) -c $<
.ml.cmo:
$(OCAMLC) -c $<
.mli.cmi:
$(OCAMLC) -c $<
include depend
|