OBJS_MT_OPT = ../http_mt.cmxa
EXAMPLES_FLAGS = -I .. -linkpkg
-EXAMPLES = \
- always_ok_daemon webfsd obj_foo dump_args timeout dont_fork threads chdir threads_foo
+EXAMPLES := \
+ always_ok_daemon.ml \
+ basic_auth.ml \
+ chdir.ml \
+ client_address.ml \
+ damned_recursion.ml \
+ dont_fork.ml \
+ dump_args.ml \
+ highlander.ml \
+ obj_foo.ml \
+ oo_daemon.ml \
+ threads.ml \
+ timeout.ml \
+ webfsd.ml
+EXAMPLES := $(patsubst %.ml,%,$(EXAMPLES))
all: $(EXAMPLES)
opt: $(patsubst %,%.opt,$(EXAMPLES))
-%: %.ml $(OBJS)
+%: %.ml $(OBJS_NON_MT)
$(OCAMLC) $(EXAMPLES_FLAGS) $(OBJS_NON_MT) -o $@ $<
-%.opt: %.ml $(OBJS_OPT)
+%.opt: %.ml $(OBJS_NON_MT_OPT)
$(OCAMLOPT) $(EXAMPLES_FLAGS) $(OBJS_NON_MT_OPT) -o $@ $<
-threads: threads.ml
+threads: threads.ml $(OBJS_MT)
$(OCAMLC) $(EXAMPLES_FLAGS) $(OBJS_MT) $(THREADS_FLAGS) -o $@ $<
-threads.opt: threads.ml
+threads.opt: threads.ml $(OBJS_MT_OPT)
$(OCAMLOPT) $(EXAMPLES_FLAGS) $(OBJS_MT_OPT) $(THREADS_FLAGS) -o $@ $<
-threads_foo: threads_foo.ml
- $(OCAMLC) $(EXAMPLES_FLAGS) $(OBJS_MT) $(THREADS_FLAGS) -package netclient -o $@ $<
-threads_foo.opt: threads_foo.ml
- $(OCAMLOPT) $(EXAMPLES_FLAGS) $(OBJS_MT_OPT) $(THREADS_FLAGS) -package netclient -o $@ $<
+damned_recursion: damned_recursion.ml $(OBJS_MT)
+ $(OCAMLC) $(EXAMPLES_FLAGS) $(OBJS_MT) $(THREADS_FLAGS) -o $@ $<
+damned_recursion.opt: damned_recursion.ml $(OBJS_MT_OPT)
+ $(OCAMLOPT) $(EXAMPLES_FLAGS) $(OBJS_MT_OPT) $(THREADS_FLAGS) -o $@ $<
distclean: clean
clean: