forked from jlouis/enacl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
47 lines (34 loc) · 1.19 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
REBAR=rebar3
RUN_EQC=erl -pa _build/default/lib/enacl/ebin -noshell -s enacl_eqc -s init stop
HASH=018d79fe0a045cca07331d37bd0cb57b2e838c51bc48fd837a1472e50068bbea \*libsodium-1.0.19.tar.gz
.PHONY: compile
compile:
$(REBAR) compile
.PHONY: libsodium
libsodium: libsodium/install/lib/libsodium.a
libsodium/install/lib/libsodium.a: libsodium/Makefile
(cd libsodium; $(MAKE) -j install)
libsodium/Makefile: libsodium/configure
(cd libsodium; env CFLAGS="$$CFLAGS -march=armv8-a+crypto+aes" ./configure --prefix=`pwd`/install --disable-pie)
libsodium/configure:
curl -OL https://github.com/jedisct1/libsodium/releases/download/1.0.19-RELEASE/libsodium-1.0.19.tar.gz
if [ `uname` = Darwin ]; then echo $(HASH) | shasum -a 256 -c -; else echo $(HASH) | sha256sum -c -; fi
tar xf libsodium-1.0.19.tar.gz
mv libsodium-stable libsodium
.PHONY: tests
tests:
$(REBAR) ct
eqc_compile: compile
erlc -o _build/default/lib/enacl/ebin eqc_test/enacl_eqc.erl
eqc_mini_compile: compile
erlc -Dmini -o _build/default/lib/enacl/ebin eqc_test/enacl_eqc.erl
eqc_run: eqc_compile
$(RUN_EQC)
eqc_mini_run: eqc_mini_compile
$(RUN_EQC)
.PHONE: console
console: compile
$(REBAR) shell
.PHONY: clean
clean:
$(REBAR) clean