From 66a422e2a247500e7fca3ac52c520c6d92192daa Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 3 Feb 2021 11:47:03 -0800 Subject: [PATCH] cleanup so building .html works again --- xwords4/wasm/Makefile | 15 ++++++++++++--- xwords4/wasm/main.c | 5 +---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/xwords4/wasm/Makefile b/xwords4/wasm/Makefile index 12fbdf23b..d0a4e49a2 100644 --- a/xwords4/wasm/Makefile +++ b/xwords4/wasm/Makefile @@ -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} diff --git a/xwords4/wasm/main.c b/xwords4/wasm/main.c index 7b0a9f4f9..e9a89c969 100644 --- a/xwords4/wasm/main.c +++ b/xwords4/wasm/main.c @@ -25,9 +25,6 @@ #include #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;