forked from moby/vpnkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (23 loc) · 786 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
REPO_ROOT=$(shell git rev-parse --show-toplevel)
build: vpnkit.exe
vpnkit.exe:
opam exec -- dune build --profile release
depends:
opam install vpnkit alcotest ounit -y
ocaml:
ocaml -version || opam init --compiler=4.12.0
# Can be removed after we upgrade tcpip
opam pin configurator --dev-repo -n
# Fix for Apple Silicon codesign issue
opam pin add omake "https://github.com/ocaml-omake/omake.git#0e4aef74dfe005b4e880cd13c08f7c57fa4a030b" -n
# Fix for OCaml 4.12 build
opam pin add uwt "https://github.com/fdopen/uwt.git#c43349bf3689181756feb341e3896d4a0a695523" -n
opam pin add vpnkit . -n
depends:
opam install --deps-only -t vpnkit
test:
opam exec -- dune test
%: %.in
@echo " GEN " $@
@sed -e "s/@COMMIT@/$$(git rev-parse HEAD)/" $< >$@.tmp
@mv $@.tmp $@