Workaround assertion causes with -O2

-O2 causes a weird assertion (incorrect function table?), so drop back to -O1

Embed "packaged" directory into HTML in emscripten
This commit is contained in:
Brad Grantham 2017-01-07 23:01:55 -08:00
parent 704b926a7d
commit bcf103aca2

View File

@ -1,13 +1,19 @@
# OPT = -O2 # -O2 causes an abort in malloc on new MAINboard.
# OPT = -g4 -s ASSERTIONS=1 -s DEMANGLE_SUPPORT=1
OPT = -O1
INCFLAGS +=
CXXFLAGS += $(INCFLAGS) -g -Wall -std=c++11 -O2
CXXFLAGS += $(INCFLAGS) $(OPT) -Wall -std=c++11 -s FULL_ES2=1 -s USE_GLFW=3
LDFLAGS +=
LDLIBS +=
SOURCES = apple2e.cpp dis6502.cpp web_interface.cpp
SOURCES = apple2e.cpp dis6502.cpp interface.cpp
PRELOAD = --preload-file packaged@/
all: apple2e.js
apple2e.js: $(SOURCES)
emcc --bind $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(LDLIBS) --preload-file apple2e.rom
emcc $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(LDLIBS) $(PRELOAD)
clean: