-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathcompile.sh
More file actions
executable file
·39 lines (33 loc) · 847 Bytes
/
Copy pathcompile.sh
File metadata and controls
executable file
·39 lines (33 loc) · 847 Bytes
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
#!/bin/bash
set -e -x
EMSCRIPTEN=~/bin/emscripten
EMCC=$EMSCRIPTEN/emcc
CFLAGS=
COFFEE=/usr/bin/coffee
INCLUDES="./zlib/*.c \
./libpng/png.c \
./libpng/pngerror.c \
./libpng/pngget.c \
./libpng/pngmem.c \
./libpng/pngpread.c \
./libpng/pngread.c \
./libpng/pngrio.c \
./libpng/pngrtran.c \
./libpng/pngrutil.c \
./libpng/pngset.c \
./libpng/pngtrans.c \
./libpng/pngwio.c \
./libpng/pngwrite.c \
./libpng/pngwtran.c \
./libpng/pngwutil.c \
./libharu/src/*.c \
-I./libharu/include \
-I./libpng \
-I$EMSCRIPTEN/system/include/emscripten main.c"
$COFFEE -c post.coffee
$EMCC $CFLAGS \
-D 'HPDF_EXPORT(type)=__attribute__((used)) type' \
$INCLUDES --post-js post.js -o hpdf.js
$EMCC --minify 1 $CFLAGS \
-D 'HPDF_EXPORT(type)=__attribute__((used)) type' \
$INCLUDES --post-js post.js -o hpdf.min.js