Audited code. Vsys should now be robust to system exceptions.
[vsys.git] / Makefile
1 all: vsys
2
3 include .dep
4
5 .SUFFIXES: .ml .cmo
6 .SUFFIXES: .mli .cmi
7 .SUFFIXES: .ml .cmx
8 .SUFFIXES: .mll .ml
9 .SUFFIXES: .mly .ml
10
11 .ml.cmo:
12         ocamlc -g -c $(INCLUDEDIR) $<
13
14 .mli.cmi:
15         ocamlopt -c $<
16
17 .ml.cmx: 
18         ocamlopt $(CFLAGS) -c $(INCLUDEDIR) $<
19
20 .mly.ml: 
21         ocamlyacc $< 
22
23 .mll.ml:
24         ocamllex $< 
25
26 docs: *.ml
27         ocamldoc -d . -html -o docs *.ml
28         mv *.html docs
29
30 vsys: inotify.cmxa inotify.cmi globals.cmx fdwatcher.cmx dirwatcher.cmx fifowatcher.cmx frontend.cmx backend.cmx main.cmx docs
31         ocamlopt str.cmxa unix.cmxa inotify.cmxa globals.cmx fdwatcher.cmx dirwatcher.cmx fifowatcher.cmx frontend.cmx backend.cmx str.cmxa main.cmx -o vsys
32
33 vsys.b: inotify.cma inotify.cmi globals.ml fdwatcher.ml dirwatcher.ml fifowatcher.ml frontend.ml backend.ml main.ml
34         ocamlc -g str.cma unix.cma inotify.cma globals.cmo fdwatcher.cmo dirwatcher.cmo fifowatcher.cmo frontend.cmo backend.cmo str.cma main.cmo -o vsys.b
35
36 install: vsys
37         cp vsys /usr/bin
38         cp vsys.b /usr/bin
39         cp vsys-initscript /etc/init.d/vsys 
40
41 dep:
42         ocamldep *.ml > .dep
43
44 clean:
45         rm -fR *.cmi *.cmx sys usys