comparison lib/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 all: common.cma
2
3 LIB = print.cmo source.cmo growvect.cmo
4
5 # Get OCaml version in the form 402 for ocaml 4.02.1 etc.
6 VER := $(shell ocamlc -v | sed -n '1s/.*\([0-9]\)\.\([0-9][0-9]\).*/\1\2/p')
7
8 # Define NEEDBYTES unless version >= 4.02
9 NEEDBYTES := $(shell test $(VER) -ge 402 || echo 1)
10
11 ifdef NEEDBYTES
12 LIB += bytes.cmo
13 endif
14
15 common.cma: $(LIB)
16 ocamlc -a $^ -o $@
17
18 %.cmi: %.mli
19 ocamlc -c $< -o $@
20
21 %.cmo: %.ml
22 ocamlc -c $< -o $@
23
24 clean: force
25 rm -f *.cmi *.cmo common.cma
26
27 force:
28
29 ###
30
31 print.cmo: print.cmi
32 source.cmo: source.cmi
33 growvect.cmo: growvect.cmi