]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/ocaml-http/examples/Makefile
- split threaded and non threaded implementations
[helm.git] / helm / DEVEL / ocaml-http / examples / Makefile
1 include ../Makefile.defs
2 OBJS_NON_MT = ../http.cma
3 OBJS_NON_MT_OPT = ../http.cmxa
4 OBJS_MT = ../http_mt.cma
5 OBJS_MT_OPT = ../http_mt.cmxa
6 EXAMPLES_FLAGS = -I .. -linkpkg
7
8 EXAMPLES =      \
9         always_ok_daemon webfsd obj_foo dump_args timeout dont_fork threads chdir threads_foo
10
11 all: $(EXAMPLES)
12 opt: $(patsubst %,%.opt,$(EXAMPLES))
13 %: %.ml $(OBJS)
14         $(OCAMLC) $(EXAMPLES_FLAGS) $(OBJS_NON_MT) -o $@ $<
15 %.opt: %.ml $(OBJS_OPT)
16         $(OCAMLOPT) $(EXAMPLES_FLAGS) $(OBJS_NON_MT_OPT) -o $@ $<
17
18 threads: threads.ml
19         $(OCAMLC) $(EXAMPLES_FLAGS) $(OBJS_MT) $(THREADS_FLAGS) -o $@ $<
20 threads.opt: threads.ml
21         $(OCAMLOPT) $(EXAMPLES_FLAGS) $(OBJS_MT_OPT) $(THREADS_FLAGS) -o $@ $<
22
23 threads_foo: threads_foo.ml
24         $(OCAMLC) $(EXAMPLES_FLAGS) $(OBJS_MT) $(THREADS_FLAGS) -package netclient -o $@ $<
25 threads_foo.opt: threads_foo.ml
26         $(OCAMLOPT) $(EXAMPLES_FLAGS) $(OBJS_MT_OPT) $(THREADS_FLAGS) -package netclient -o $@ $<
27
28 distclean: clean
29 clean:
30         -rm -f *.cm[ioax] *.o $(EXAMPLES) $(patsubst %,%.opt,$(EXAMPLES))