Skip to content

Commit

Permalink
fix makefile for emscripten
Browse files Browse the repository at this point in the history
  • Loading branch information
prusnak committed May 12, 2016
1 parent 110965f commit 75f2396
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions emscripten/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ EMFLAGS = \
SRC = ../bignum.c ../ecdsa.c ../secp256k1.c ../hmac.c ../bip32.c \
../base58.c ../ripemd160.c ../sha2.c ../rand.c

trezor-crypto.js: $(SRC)
emcc $(EMFLAGS) -o $@ $^

test-node: node_modules trezor-crypto.js test.js
node test.js

test-browserify.js: node_modules trezor-crypto.js test.js
browserify test.js -o $@ --noparse=`pwd`/trezor-crypto.js
$(shell npm bin)/browserify test.js -o $@ --noparse=`pwd`/trezor-crypto.js
@echo "open test.html in your favourite browser"

trezor-crypto.js: $(SRC)
emcc $(EMFLAGS) -o $@ $^

node_modules:
npm install
npm install browserify

clean:
rm -f trezor-crypto.js test-browserify.js
Expand Down

0 comments on commit 75f2396

Please sign in to comment.