-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (26 loc) · 992 Bytes
/
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
EMCONFIGURE=emconfigure
EMMAKE=emmake
EMCC=emcc
NODE=node
SRCDIR=hugs98-Sep2006
FLAGS= -O2 \
-s TOTAL_MEMORY=67108864 \
--preload-file $(SRCDIR)/hugsdir/packages@/usr/local/lib/hugs/packages \
-s EXPORTED_FUNCTIONS="['_initSystem','_printBanner','_main']" \
-s MAIN_MODULE=1 \
-s WASM=1 \
--js-library $(SRCDIR)/src/library_hugs.js \
--js-library $(SRCDIR)/src/libem.js
all: web/hugs.html js/hugs.js
$(SRCDIR)/libraries/bootlib/.stamp:
cd $(SRCDIR);$(EMCONFIGURE) ./configure --prefix=/usr/local
cd $(SRCDIR)/packages/base;$(EMCONFIGURE) ./configure --prefix=/usr/local
cd $(SRCDIR);$(EMMAKE) make
# cd $(SRCDIR);mkdir hugs-dir
# cd $(SRCDIR);$(EMMAKE) make install DESTDIR=$(PWD)/$(SRCDIR)/hugs-dir
web/hugs.html:$(SRCDIR)/libraries/bootlib/.stamp
$(EMCC) $(PWD)/$(SRCDIR)/src/hugs.bc -o $@ $(FLAGS)
#runhugs/runhugs.html:$(SRCDIR)/libraries/bootlib/.stamp
# $(EMCC) $(PWD)/$(SRCDIR)/src/runhugs.bc -o $@ $(FLAGS)
js/hugs.js:$(SRCDIR)/libraries/bootlib/.stamp
cd js;make