-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (36 loc) · 1.06 KB
/
Makefile
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
48
49
50
# -*- Makefile -*-
# --------------------------------------------------------------------
OCAMLBUILD_JOBS ?= 1
OCAMLBUILD_BIN ?= ocamlbuild
OCAMLBUILD_EXTRA ?=
OCAMLBUILD_OPTS := -use-ocamlfind -j $(OCAMLBUILD_JOBS)
# In Emacs, use classic display to enable error jumping.
ifeq ($(shell echo $$TERM), dumb)
OCAMLBUILD_OPTS += -classic-display
endif
OCAMLBUILD_OPTS += $(OCAMLBUILD_EXTRA)
OCAMLBUILD := $(OCAMLBUILD_BIN) $(OCAMLBUILD_OPTS)
# --------------------------------------------------------------------
.PHONY: all build lib install uninstall examples clean
all: lib
@true
build: lib
lib:
$(OCAMLBUILD) libs/solveq.cmo libs/solveq.cmx
main:
$(OCAMLBUILD) libs/solveq/Main/main.native
examples: lib
cd tests && ocaml -rectypes examples.ml monalg_tests.ml
tests: main
./main.native tests/test_ok.solveq
install: lib
ocamlfind install solveq META \
_build/libs/solveq.cmo \
_build/libs/solveq.o \
_build/libs/solveq.cmx \
_build/libs/solveq.cmi
uninstall:
ocamlfind remove solveq
reinstall: uninstall install
clean:
$(OCAMLBUILD) -clean