-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
43 lines (35 loc) · 1.03 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
RUN:=umask 0022;
ZBar:=cd ZBar;
.PHONY: build
build: dist/zbar.js
dist/zbar.js: dist/zbar.emcc.js node_modules
npm run build:zbar
dist/zbar.emcc.js: ZBar/zbar/.libs/libzbar.a
mkdir -p dist
emcc \
-O1 \
-IZbar/include \
-s ALLOW_MEMORY_GROWTH=1 \
-s 'EXTRA_EXPORTED_RUNTIME_METHODS=["ccall"]' \
-s WASM=0 \
--no-heap-copy \
--closure 0 \
-s BINARYEN_ASYNC_COMPILATION=0 \
-s MODULARIZE=0 \
./Zbar/zbar/.libs/libzbar.a \
--js-library ./emcc/library.js \
--pre-js ./emcc/pre.js \
--post-js ./emcc/post.js \
./emcc/main.c \
-o ./dist/zbar.emcc.js
ZBar/zbar/.libs/libzbar.a: ZBar/Makefile
$(ZBar) emmake make
ZBar/Makefile: ZBar/configure
$(ZBar) emconfigure ./configure --enable-codes=qrcode --without-x --without-jpeg --without-imagemagick --without-npapi --without-gtk --without-python --without-qt --without-xshm --disable-video --disable-pthread
ZBar/configure: ZBar
$(ZBar) sed -i "s/ -Werror//" ./configure.ac
$(ZBar) autoreconf -i
ZBar:
git clone https://github.com/ZBar/ZBar ZBar
node_modules:
npm i