]> granicus.if.org Git - nethack/commitdiff
get this working: "make wasm"
authornhmall <nhmall@nethack.org>
Sun, 11 Oct 2020 14:51:46 +0000 (10:51 -0400)
committernhmall <nhmall@nethack.org>
Sun, 11 Oct 2020 14:51:46 +0000 (10:51 -0400)
sys/unix/Makefile.top
sys/unix/hints/include/cross-post.2020
sys/unix/hints/include/cross-pre.2020

index 78e7238a7faaf1dac5700f74a52d83ab19b105cd..740c8b979bce5b75ebde32ad2cff66c31ad68d2e 100644 (file)
@@ -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) )
index f7fda70abf61be5e78cbb8f5ca4e1e3472598eeb..9d43248b926cba000e70f191e5aa4a856688ed2e 100644 (file)
@@ -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)
index 1c8a60dab51697e9a81da7cb9115594a51662e42..d51a9bdde86246bc3cdd843e63bc2fabff5ff25e 100644 (file)
@@ -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)