comparison tools/Makefile @ 0:bfdcc3820b32

Basis
author Mike Spivey <mike@cs.ox.ac.uk>
date Thu, 05 Oct 2017 08:04:15 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:bfdcc3820b32
1 # tools/Makefile
2
3 all : nodexp sshconfig pibake
4
5 nodexp : nclex.cmo ncparse.cmo ncmain.cmo
6 ocamlc ../lib/common.cma $^ -o $@
7
8 nclex.ml : nclex.mll
9 ocamllex nclex.mll
10
11 ncparse.mli ncparse.ml : ncparse.mly
12 ocamlyacc -v ncparse.mly
13
14 DIR := $(shell pwd)
15
16 pibake: pibake.in sshconfig
17 sed 's:@DIR@:$(DIR):g' $< >$@
18 chmod +x $@
19
20 sshconfig: sshconfig.in
21 sed 's:@DIR@:$(DIR):g' $< >$@
22
23 %.cmi: %.mli
24 ocamlc $(MLFLAGS) -c $<
25
26 %.cmo: %.ml
27 ocamlc $(MLFLAGS) -c $<
28
29 MLGEN = nclex.ml ncparse.mli ncparse.ml
30
31 ML = $(MLGEN) ncmain.ml
32
33 clean : force
34 rm -f nodexp *.cmo *.cmi *.output $(MLGEN)
35 rm -f sshconfig pibake
36
37 depend: $(ML) force
38 (sed '/^###/q' Makefile; echo; ocamldep $(ML)) >new
39 mv new Makefile
40
41 force:
42
43 MLFLAGS = -I ../lib
44
45 ###
46
47 nclex.cmo : ncparse.cmi
48 nclex.cmx : ncparse.cmx
49 ncmain.cmo : ncparse.cmi nclex.cmo
50 ncmain.cmx : ncparse.cmx nclex.cmx
51 ncparse.cmo : ncparse.cmi
52 ncparse.cmx : ncparse.cmi
53 ncparse.cmi :