From bd6aec63d86fb29bde2c5d033a33c0d05b962fcf Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 28 Feb 2018 15:39:16 -0500 Subject: [PATCH] Clean up Makefile --- Makefile | 8 +++++--- cpython/Makefile | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 76bbade82..a3e6f24db 100644 --- a/Makefile +++ b/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) diff --git a/cpython/Makefile b/cpython/Makefile index 1f967c6dc..c2b7719ec 100644 --- a/cpython/Makefile +++ b/cpython/Makefile @@ -31,7 +31,7 @@ install: $(BUILD)/$(LIB) clean: -rm -fr $(HOSTINSTALL) -rm -fr $(BUILD) - + -rm -fr $(INSTALL) $(TARBALL): [ -d $(ROOT)/downloads ] || mkdir $(ROOT)/downloads