-
Notifications
You must be signed in to change notification settings - Fork 6
/
OMakefile
47 lines (35 loc) · 998 Bytes
/
OMakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
USE_OCAMLFIND = true
BYTE_ENABLED = true
OCAMLDEP_MODULES_ENABLED = false
OCAMLPACKS = lwt.unix
OCAMLFLAGS = -annot -g
FILES = nproc
MLI = $(addsuffix .mli, $(FILES))
OCamlLibrary(nproc, $(FILES))
OCamlProgram(test_nproc, $(FILES) test_nproc)
.DEFAULT: META nproc.cma nproc.cmxa test_nproc.opt
META: META.in VERSION
echo "version = \"$$(cat VERSION)\"" > META
cat META.in >> META
.PHONY: test
test: test_nproc.opt
./test_nproc.opt
.PHONY: install uninstall
install:
ocamlfind install nproc META nproc.mli nproc.cmi \
nproc.cmo nproc.cma \
nproc.cmx nproc.o nproc.cmxa nproc.a
uninstall:
ocamlfind remove nproc
.PHONY: doc
doc: doc/index.html
doc/index.html: $(MLI)
mkdir -p doc
ocamlfind ocamldoc -d doc -html $(MLI) -package $(OCAMLPACKS)
.PHONY: install-doc
install-doc: doc
cd ../mylifelabs.github.com && mkdir -p nproc
cp doc/* ../mylifelabs.github.com/nproc
.PHONY: clean
clean:
rm -f *.o *.a *.cm* *~ *.annot *.run *.opt test_nproc META doc/*