diff --git a/Makefile.emscripten b/Makefile.emscripten index 98509f64ff4..414d63b748b 100644 --- a/Makefile.emscripten +++ b/Makefile.emscripten @@ -95,13 +95,13 @@ _cmd_toggle_menu,_cmd_reload_config,_cmd_toggle_grab_mouse,_cmd_toggle_game_focu _cmd_set_volume,_cmd_set_shader,_cmd_cheat_set_code,_cmd_cheat_get_code,_cmd_cheat_toggle_index,_cmd_cheat_get_code_state,_cmd_cheat_realloc,\ _cmd_cheat_get_size,_cmd_cheat_apply_cheats -EXPORTS = callMain,FS,PATH,ERRNO_CODES,stringToNewUTF8,UTF8ToString +EXPORTS := callMain,FS,PATH,ERRNO_CODES,stringToNewUTF8,UTF8ToString LIBS := -s USE_ZLIB=1 ifeq ($(HAVE_WASMFS), 1) LIBS += -s WASMFS -s FORCE_FILESYSTEM=1 -lfetchfs.js -lopfs.js - EXPORTS += ,FETCHFS,OPFS + EXPORTS := $(EXPORTS),FETCHFS,OPFS endif ifeq ($(HAVE_WORKER), 1) @@ -208,8 +208,10 @@ RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ)) all: $(TARGET) -$(TARGET): $(RARCH_OBJ) $(libretro) - @$(if $(libretro), mv -f $(libretro) $(libretro_new),) +$(libretro_new) : $(libretro) + mv -f $(libretro) $(libretro_new) + +$(TARGET): $(RARCH_OBJ) $(libretro_new) @$(if $(Q), $(shell echo echo "LD $@ \ $(libretro_new) $(LIBS) $(LDFLAGS)"),) $(Q)$(LD) -o $@ $(RARCH_OBJ) $(libretro_new) $(LIBS) $(LDFLAGS)