mirror of https://github.com/pyodide/pyodide.git
Clean up Makefile
This commit is contained in:
parent
a913895bbe
commit
bd6aec63d8
8
Makefile
8
Makefile
|
@ -6,15 +6,16 @@ CPYTHONINC=$(CPYTHONROOT)/installs/python-$(PYVERSION)/include/python$(PYMINOR)
|
|||
|
||||
CC=emcc
|
||||
CXX=em++
|
||||
OPTFLAGS=-O2
|
||||
OPTFLAGS=-O3
|
||||
CXXFLAGS=-std=c++14 $(OPTFLAGS) -g -I $(CPYTHONINC) -Wno-warn-absolute-paths
|
||||
LDFLAGS=$(OPTFLAGS) \
|
||||
$(CPYTHONROOT)/installs/python-$(PYVERSION)/lib/libpython$(PYMINOR).a \
|
||||
$(CPYTHONROOT)/installs/python-$(PYVERSION)/lib/libpython$(PYMINOR).a \
|
||||
-s "BINARYEN_METHOD='native-wasm,interpret-binary,interpret-asm2wasm'" \
|
||||
-s TOTAL_MEMORY=268435456 \
|
||||
-s ASSERTIONS=2 \
|
||||
-s EMULATE_FUNCTION_POINTER_CASTS=1 \
|
||||
-s EXPORTED_FUNCTIONS='["_main"]' \
|
||||
-s WASM=1 \
|
||||
--memory-init-file 0
|
||||
|
||||
|
||||
|
@ -23,7 +24,7 @@ all: build/pyodide.asm.html build/pyodide.js
|
|||
|
||||
build/pyodide.asm.html: src/main.bc src/jsproxy.bc src/js2python.bc src/pylocals.bc \
|
||||
src/pyproxy.bc src/python2js.bc src/runpython.bc root
|
||||
$(CC) -s WASM=1 -s EXPORT_NAME="'pyodide'" --bind -o $@ $(filter %.bc,$^) $(LDFLAGS) \
|
||||
$(CC) -s EXPORT_NAME="'pyodide'" --bind -o $@ $(filter %.bc,$^) $(LDFLAGS) \
|
||||
$(foreach d,$(wildcard root/*),--preload-file $d@/$(notdir $d))
|
||||
|
||||
|
||||
|
@ -35,6 +36,7 @@ clean:
|
|||
-rm -fr root
|
||||
-rm build/*
|
||||
-rm src/*.bc
|
||||
make -C $(CPYTHONROOT) clean
|
||||
|
||||
|
||||
%.bc: %.cpp $(CPYTHONLIB)
|
||||
|
|
|
@ -31,7 +31,7 @@ install: $(BUILD)/$(LIB)
|
|||
clean:
|
||||
-rm -fr $(HOSTINSTALL)
|
||||
-rm -fr $(BUILD)
|
||||
|
||||
-rm -fr $(INSTALL)
|
||||
|
||||
$(TARBALL):
|
||||
[ -d $(ROOT)/downloads ] || mkdir $(ROOT)/downloads
|
||||
|
|
Loading…
Reference in New Issue