]> matita.cs.unibo.it Git - helm.git/blob - helm/software/DEVEL/ocaml-http/examples/Makefile
renaming
[helm.git] / helm / software / 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.ml     \
10         basic_auth.ml           \
11         chdir.ml                \
12         client_address.ml       \
13         damned_recursion.ml     \
14         dump_args.ml            \
15         highlander.ml           \
16         oo_daemon.ml            \
17         threads.ml              \
18         timeout.ml              \
19         webfsd.ml
20 EXAMPLES := $(patsubst %.ml,%,$(EXAMPLES))
21
22 all: $(EXAMPLES)
23 opt: $(patsubst %,%.opt,$(EXAMPLES))
24 %: %.ml $(OBJS_NON_MT)
25         $(OCAMLC) $(EXAMPLES_FLAGS) $(OBJS_NON_MT) -o $@ $<
26 %.opt: %.ml $(OBJS_NON_MT_OPT)
27         $(OCAMLOPT) $(EXAMPLES_FLAGS) $(OBJS_NON_MT_OPT) -o $@ $<
28
29 threads: threads.ml $(OBJS_MT)
30         $(OCAMLC) $(EXAMPLES_FLAGS) $(OBJS_MT) $(THREADS_FLAGS) -o $@ $<
31 threads.opt: threads.ml $(OBJS_MT_OPT)
32         $(OCAMLOPT) $(EXAMPLES_FLAGS) $(OBJS_MT_OPT) $(THREADS_FLAGS) -o $@ $<
33
34 damned_recursion: damned_recursion.ml $(OBJS_MT)
35         $(OCAMLC) $(EXAMPLES_FLAGS) $(OBJS_MT) $(THREADS_FLAGS) -o $@ $<
36 damned_recursion.opt: damned_recursion.ml $(OBJS_MT_OPT)
37         $(OCAMLOPT) $(EXAMPLES_FLAGS) $(OBJS_MT_OPT) $(THREADS_FLAGS) -o $@ $<
38
39 distclean: clean
40 clean:
41         -rm -f *.cm[ioax] *.o $(EXAMPLES) $(patsubst %,%.opt,$(EXAMPLES))