cleanup so building .html works again

This commit is contained in:
Eric House 2021-02-03 11:47:03 -08:00
parent d620461574
commit 66a422e2a2
2 changed files with 13 additions and 7 deletions

View file

@ -23,21 +23,30 @@ DEFINES += -DXWFEATURE_KNOWNPLAYERS
DEFINES += -DXWFEATURE_DICTSANITY
DEFINES += -DPOINTER_SUPPORT
DEFINES += -DPLATFORM_WASM
DEFINES += -O2
OUTPUTS = main.html main.js main.js.mem main.data
OUTPUTS = main.html main.js main.js.mem main.data main.html.mem
all: main.js
# PHONY: upload
main.js: ${INPUTS} Makefile
emcc $(DEFINES) -I . -I ../common -I ../relay -s USE_SDL=2 \
emcc $(DEFINES) -O2 -DNAKED_MODE=1 -I . -I ../common -I ../relay -s USE_SDL=2 \
--preload-file assets_dir --memory-init-file 1 \
-s USE_SDL_TTF=2 -s USE_SDL_IMAGE=2 -s SDL2_IMAGE_FORMATS='["png"]' \
-s EXPORTED_FUNCTIONS='["_mainf", "_button"]' -s WASM=0 \
-s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" \
${INPUTS} -o $@
main.html: ${INPUTS} Makefile
emcc $(DEFINES) -I . -I ../common -I ../relay -s USE_SDL=2 \
--preload-file assets_dir \
-s USE_SDL_TTF=2 -s USE_SDL_IMAGE=2 -s SDL2_IMAGE_FORMATS='["png"]' \
-s WASM=0 \
${INPUTS} -o $@
upload: main.js
scp ${OUTPUTS} pi4:/tmp
clean:
rm ${OUTPUTS}

View file

@ -25,9 +25,6 @@
#include <emscripten.h>
#endif
/* Might want to pass this from the Makefile */
#define NAKED_MODE 1
#define WASM_BOARD_LEFT 0
#define WASM_HOR_SCORE_TOP 0
@ -50,7 +47,7 @@ initGlobals( Globals* globals )
{
globals->cp.showBoardArrow = XP_TRUE;
globals->cp.allowPeek = XP_TRUE;
globals->cp.showRobotScores = XP_TRUE;
// globals->cp.showRobotScores = XP_TRUE;
globals->cp.sortNewTiles = XP_TRUE;
globals->gi.serverRole = SERVER_STANDALONE;