forked from rev22/curve255js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (30 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
KARMA = ./node_modules/.bin/karma
JSDOC = ./node_modules/.bin/jsdoc
R_JS = ./node_modules/.bin/r.js
ALMOND = ./node_modules/almond/almond
BUILDDIR = build
all: test api-doc
test-timing:
KARMA_FLAGS='--preprocessors=' TEST_TIMING=true $(MAKE) test
test-full:
KARMA_FLAGS='--preprocessors=' TEST_FULL=true $(MAKE) test
test: $(KARMA)
$(KARMA) start $(KARMA_FLAGS) --singleRun=true karma.conf.js --browsers PhantomJS
api-doc: $(JSDOC)
$(JSDOC) --destination doc/api/ --private \
--configure jsdoc.json \
--recurse src/
$(BUILDDIR)/build-config.js: src/config.js
mkdir -p $(BUILDDIR)
tail -n+2 "$<" > "$@"
build: $(R_JS) $(BUILDDIR)/build-config.js
$(R_JS) -o $(BUILDDIR)/build-config.js out="$(BUILDDIR)/jodid25519.js" \
baseUrl=src name=../$(ALMOND) include=jodid25519 \
wrap.startFile=almond.0 wrap.endFile=almond.1 optimize=none
build-test: compile-test.js build
./$< ./$(BUILDDIR)/jodid25519.js
$(KARMA) $(JSDOC) $(R_JS):
npm install
clean:
rm -rf doc/api/ coverage/ build/
.PHONY: test api-doc clean