Commit bd6aec63 authored by Michael Droettboom's avatar Michael Droettboom

Clean up Makefile

parent a913895b
......@@ -6,7 +6,7 @@ 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 \
......@@ -15,6 +15,7 @@ LDFLAGS=$(OPTFLAGS) \
-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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment