-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (26 loc) · 936 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
DIRS = src,ext/ucamlib/src
.PHONY: all test clean
# Init submodules if needed and make native version.
# The resulting executable can be found under /bin and /library (symlinks)
all: native
# Compile native version.
native:
@rm -rf bin; mkdir bin
@ocamlbuild -use-ocamlfind -pkgs 'csv' -tag use_str -Is $(DIRS) ktc.native
@rm -f ktc.native
@cd bin; cp ../_build/src/ktc.native e2e
# Handling subtree for ext/ucamlib
UCAMLIB_GIT = https://github.com/david-broman/ucamlib.git
UCAMLIB_MSG = 'Updated ucamlib'
add_ucamlib:
git subtree add --prefix ext/ucamlib $(UCAMLIB_GIT) master --squash
pull_ucamlib:
git subtree pull --prefix ext/ucamlib $(UCAMLIB_GIT) master --squash -m $(UCAMLIB_MSG)
push_ucamlib:
git subtree push --prefix ext/ucamlib $(UCAMLIB_GIT) master --squash
# Clean all submodules and the main Modelyze source
clean:
@ocamlbuild -clean
@rm -rf bin
@rm -rf doc/api
@echo " Finished cleaning up."