-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
34 lines (27 loc) · 931 Bytes
/
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
.PHONY: all aurochs clean test_grammar test_arith install lib distrib tgz
VERSION=$(shell sed -n -e 's:^let version = (\([0-9]*\),\([0-9]*\),\([0-9]*\))*$$:\1.\2.\3:p' aurochs/version.ml)
LIBPREFIX?=/usr/local
BINPREFIX?=/usr/local/bin
OCAML_DIR=$(shell ocamlc -where)
TARGET=$(OCAML_DIR)/aurochs_lib
DISTRIB=_build/aurochs-$(VERSION)
all: targets
targets:
@./build.sh aurochs_lib.cma aurochs_lib.cmxa aurochs_tool.native aurochs/test_aurochs.native c/test/test_nog
clean:
rm -rf _build/
grammar.ml: aurochs grammar.peg
./aurochs_tool.native -bootstrap -target ml -generate grammar.peg
install: targets
install -m 0755 aurochs_tool.native $(BINPREFIX)/aurochs
mkdir -p $(TARGET)
install -m 0644 \
_build/aurochs_pack.cmi \
_build/aurochs_lib.a \
_build/aurochs_lib.cma \
_build/aurochs_lib.cmxa \
_build/libaurochs.a \
_build/dllaurochs.so \
$(TARGET)
tgz:
hg archive -t tgz ~/pub/aurochs.tar.gz