forked from privacypass/challenge-bypass-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
64 lines (52 loc) · 1.35 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
SOURCES= src/crypto/keccak/keccak.js \
src/crypto/local.js \
src/ext/config.js \
src/ext/background.js \
src/ext/browserUtils.js \
src/ext/h2c.js \
src/ext/issuance.js \
src/ext/redemption.js \
src/ext/tokens.js \
src/ext/utils.js
LISTENER=src/ext/listeners.js
INIT=src/ext/init.js
ASN1_PATH=src/crypto/asn1
SJCL_PATH=src/crypto/sjcl
all: build
.PHONY: build
build: addon/build.js
.PHONY: sjcl
sjcl:
cd ${SJCL_PATH}; ./configure --without-all --with-ecc --with-convenience \
--with-codecBytes --with-codecHex --compress=none
make -C ${SJCL_PATH} sjcl.js
.PHONY: test
test: test-ext
yarn test
.PHONY: test-ext
test-ext: jest/globals.js addon/test.js
.PHONY: test-all
test-all: test-sjcl test
.PHONY: test-sjcl
test-sjcl:
make test -C ${SJCL_PATH}
.PHONY: install
install:
yarn install
.PHONY: lint
lint:
yarn lint
.PHONY: dist
dist: build
mkdir -p ./dist
cp -a addon/* ./dist/
zip -r ext.zip ./dist
rm -rf ./dist
addon/build.js: ${ASN1_PATH}/asn1-parser.js ${SJCL_PATH}/sjcl.js ${SOURCES} ${INIT} ${LISTENER}
cat $^ > $@
addon/test.js: ${ASN1_PATH}/asn1-parser.js ${SJCL_PATH}/sjcl.js ${SOURCES}
cat $^ > $@
clean:
rm -f ${SJCL_PATH}/sjcl.js addon/build.js addon/test.js ext.zip
dist-clean: clean
rm -rf ./node_modules