From: nhmall Date: Sun, 11 Oct 2020 14:51:46 +0000 (-0400) Subject: get this working: "make wasm" X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0adb64e3846d57d8fb1787ae58f7bfed2e47b26a;p=nethack get this working: "make wasm" --- diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index 78e7238a7..740c8b979 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -209,7 +209,7 @@ dlb: ( cd dat ; LC_ALL=C ; ../util/dlb cf nhdat $(DATDLB) ) wasm: - ( cd src ; $(MAKE) $(WASM_TARGET) ) + ( cd src ; $(MAKE) CROSS_TO_WASM=1 ../targets/wasm/nethack.js ) package: $(GAME) recover $(VARDAT) spec_levs ( cd src ; $(MAKE) $(PACKAGE) ) diff --git a/sys/unix/hints/include/cross-post.2020 b/sys/unix/hints/include/cross-post.2020 index f7fda70ab..9d43248b9 100644 --- a/sys/unix/hints/include/cross-post.2020 +++ b/sys/unix/hints/include/cross-post.2020 @@ -133,8 +133,7 @@ $(WASM_DATA_DIR): $(WASM_DATA_DIR)/nhdat cp ../sys/lib/sysconf $(WASM_DATA_DIR)/sysconf $(WASM_DATA_DIR)/nhdat: - ( cd ..; $(MAKE) INSTDIR='$(WASM_DATA_DIR)' dlb ) - ( cd ..; $(MAKE) INSTDIR='$(WASM_DATA_DIR)' dofiles-dlb ) + ( cd ..; $(MAKE) INSTDIR='$(WASM_DATA_DIR)' $(WASMDEP) dofiles-dlb ) # $(TARGETPFX)unixmain.o : ../sys/unix/unixmain.c $(HACK_H) diff --git a/sys/unix/hints/include/cross-pre.2020 b/sys/unix/hints/include/cross-pre.2020 index 1c8a60dab..d51a9bdde 100644 --- a/sys/unix/hints/include/cross-pre.2020 +++ b/sys/unix/hints/include/cross-pre.2020 @@ -384,7 +384,8 @@ override WINOBJ= override GAME= # the real VARDAT hasn't been defined yet for use in ALLDEP override WASM_DAT = bogusmon data engrave epitaph oracles options quest.lua rumors -override ALLDEP = include/nhlua.h $(WASM_DAT) spec_levs check-dlb wasm +WASMDEP = include/nhlua.h $(WASM_DAT) spec_levs check-dlb +override ALLDEP = $(WASMDEP) wasm override PREGAME += mkdir -p $(TARGETDIR)/wasm-data ; override CLEANMORE += rm -rf $(TARGETDIR) ; RANLIB=$(EMRANLIB)