Skip to content

Commit

Permalink
Update JS build.
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Jul 28, 2017
1 parent 052fd00 commit 97f188e
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@ src/lib/reservoir.o
src/lib/tables.lo
src/lib/tables.o
shine-*.tar.gz
*.c.o
*.bc
*.mp3
node_modules
6 changes: 3 additions & 3 deletions js/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ LINKFLAGS:=-s EXPORTED_FUNCTIONS=$(EXPORTED_FUNCTIONS) --memory-init-file 0 $(CF
C_FILES:=$(wildcard ../src/lib/*.c) src/wrapper.c
HEADER_FILES:=$(wildcard ../src/lib/*.h)
SOURCES:=$(C_FILES) $(HEADER_FILES)
OBJECTS:=$(C_FILES:%.c=%.c.o)
OBJECTS:=$(C_FILES:%.c=%.bc)

all: dist/libshine.js

dist/libshine.js: $(SOURCES) $(OBJECTS) src/pre.js src/post.js
$(EMCC) $(LINKFLAGS) --pre-js src/pre.js --post-js src/post.js $(OBJECTS) -o $@

%.c.o: %.c
%.bc: %.c
$(EMCC) $(CFLAGS) -I../src/lib -c $< -o $@

clean:
rm -f *.c.o ../src/lib/*.c.o
rm -f *.bc ../src/lib/*.bc
10 changes: 5 additions & 5 deletions js/dist/libshine.js

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions js/test/node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 14 additions & 13 deletions js/test/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,24 @@
"version": "0.0.1",
"homepage": "https://github.com/savonet/shine",
"author": "Romain Beauxis <toots@rastageeks.org",
"repository":
{
"type":"git",
"url":"git://github.com/savonet/shine"
},
"bugs":
{
"mail":"toots@rastageeks.org",
"url":"http://github.com/savonet/shine/issues"
},
"repository": {
"type": "git",
"url": "git://github.com/savonet/shine"
},
"bugs": {
"mail": "toots@rastageeks.org",
"url": "http://github.com/savonet/shine/issues"
},
"main": "test.coffee",
"scripts": {
"test": "coffee ./encode.coffee && coffee ./rounds.coffee"
},
"engine": {"node": ">= 0.10.7", "npm": "1"},
"engine": {
"node": ">= 0.10.7",
"npm": "1"
},
"dependencies": {
"coffee-script" : "1.6.3",
"wav" : "0.1.0"
"coffee-script": "1.6.3",
"wav": "0.1.0"
}
}

0 comments on commit 97f188e

Please sign in to comment.