sed substitution went too far (wasm cross-compile)
Also, link with hacklib
This commit is contained in:
@@ -227,7 +227,7 @@ nhmain(int argc, char *argv[])
|
||||
/* wizard mode access is deferred until here */
|
||||
set_playmode(); /* sets plname to "wizard" for wizard mode */
|
||||
/* hide any hyphens from plnamesuffix() */
|
||||
svp.plnamelen = exact_username ? (int) strlen(svp.plname) : 0;
|
||||
gp.plnamelen = exact_username ? (int) strlen(svp.plname) : 0;
|
||||
/* strip role,race,&c suffix; calls askname() if plname[] is empty
|
||||
or holds a generic user name like "player" or "games" */
|
||||
plnamesuffix();
|
||||
@@ -382,12 +382,12 @@ process_options(int argc, char *argv[])
|
||||
case 'u':
|
||||
if (argv[0][2]) {
|
||||
(void) strncpy(svp.plname, argv[0] + 2, sizeof svp.plname - 1);
|
||||
svp.plnamelen = 0; /* plname[] might have -role-race attached */
|
||||
gp.plnamelen = 0; /* plname[] might have -role-race attached */
|
||||
} else if (argc > 1) {
|
||||
argc--;
|
||||
argv++;
|
||||
(void) strncpy(svp.plname, argv[0], sizeof svp.plname - 1);
|
||||
svp.plnamelen = 0;
|
||||
gp.plnamelen = 0;
|
||||
} else {
|
||||
raw_print("Player name expected after -u");
|
||||
}
|
||||
|
||||
@@ -82,10 +82,10 @@ dodata:
|
||||
endif # CROSS_TO_MSDOS
|
||||
|
||||
ifdef CROSS_TO_WASM
|
||||
$(WASM_TARGET): pregame $(TARGETPFX)date.o $(HOSTOBJ) $(HOBJ) $(LUACROSSLIB) $(WASM_DATA_DIR)
|
||||
$(WASM_TARGET): pregame $(TARGET_HACKLIB) $(TARGETPFX)date.o $(HOSTOBJ) $(HOBJ) $(LUACROSSLIB) $(WASM_DATA_DIR)
|
||||
-rm $@
|
||||
$(TARGET_CC) $(TARGET_LFLAGS) $(TARGET_CFLAGS) -o $@ \
|
||||
$(HOBJ) $(TARGETPFX)date.o $(TARGET_LIBS)
|
||||
$(HOBJ) $(TARGETPFX)date.o $(TARGET_HACKLIB) $(TARGET_LIBS)
|
||||
|
||||
$(WASM_DATA_DIR): $(WASM_DATA_DIR)/nhdat
|
||||
touch $(WASM_DATA_DIR)/perm
|
||||
|
||||
@@ -275,7 +275,8 @@ WASM_CFLAGS += -Wshadow
|
||||
# Nethack C flags
|
||||
WASM_CFLAGS += $(WINCFLAGS) #WINCFLAGS set from multiw-2.370
|
||||
WASM_CFLAGS += -DSYSCF -DSYSCF_FILE=\"/sysconf\" -DSECURE
|
||||
WASM_CFLAGS += -g -I../include -DNOTPARMDECL
|
||||
#WASM_CFLAGS += -g -I../include -DNOTPARMDECL
|
||||
WASM_CFLAGS += -I../include -DNOTPARMDECL
|
||||
# NetHack sources control
|
||||
WASM_CFLAGS += -DDLB
|
||||
WASM_CFLAGS += -DHACKDIR=\"$(HACKDIR)\"
|
||||
|
||||
Reference in New Issue
Block a user