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 */
|
/* wizard mode access is deferred until here */
|
||||||
set_playmode(); /* sets plname to "wizard" for wizard mode */
|
set_playmode(); /* sets plname to "wizard" for wizard mode */
|
||||||
/* hide any hyphens from plnamesuffix() */
|
/* 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
|
/* strip role,race,&c suffix; calls askname() if plname[] is empty
|
||||||
or holds a generic user name like "player" or "games" */
|
or holds a generic user name like "player" or "games" */
|
||||||
plnamesuffix();
|
plnamesuffix();
|
||||||
@@ -382,12 +382,12 @@ process_options(int argc, char *argv[])
|
|||||||
case 'u':
|
case 'u':
|
||||||
if (argv[0][2]) {
|
if (argv[0][2]) {
|
||||||
(void) strncpy(svp.plname, argv[0] + 2, sizeof svp.plname - 1);
|
(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) {
|
} else if (argc > 1) {
|
||||||
argc--;
|
argc--;
|
||||||
argv++;
|
argv++;
|
||||||
(void) strncpy(svp.plname, argv[0], sizeof svp.plname - 1);
|
(void) strncpy(svp.plname, argv[0], sizeof svp.plname - 1);
|
||||||
svp.plnamelen = 0;
|
gp.plnamelen = 0;
|
||||||
} else {
|
} else {
|
||||||
raw_print("Player name expected after -u");
|
raw_print("Player name expected after -u");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,10 +82,10 @@ dodata:
|
|||||||
endif # CROSS_TO_MSDOS
|
endif # CROSS_TO_MSDOS
|
||||||
|
|
||||||
ifdef CROSS_TO_WASM
|
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 $@
|
-rm $@
|
||||||
$(TARGET_CC) $(TARGET_LFLAGS) $(TARGET_CFLAGS) -o $@ \
|
$(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
|
$(WASM_DATA_DIR): $(WASM_DATA_DIR)/nhdat
|
||||||
touch $(WASM_DATA_DIR)/perm
|
touch $(WASM_DATA_DIR)/perm
|
||||||
|
|||||||
@@ -275,7 +275,8 @@ WASM_CFLAGS += -Wshadow
|
|||||||
# Nethack C flags
|
# Nethack C flags
|
||||||
WASM_CFLAGS += $(WINCFLAGS) #WINCFLAGS set from multiw-2.370
|
WASM_CFLAGS += $(WINCFLAGS) #WINCFLAGS set from multiw-2.370
|
||||||
WASM_CFLAGS += -DSYSCF -DSYSCF_FILE=\"/sysconf\" -DSECURE
|
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
|
# NetHack sources control
|
||||||
WASM_CFLAGS += -DDLB
|
WASM_CFLAGS += -DDLB
|
||||||
WASM_CFLAGS += -DHACKDIR=\"$(HACKDIR)\"
|
WASM_CFLAGS += -DHACKDIR=\"$(HACKDIR)\"
|
||||||
|
|||||||
Reference in New Issue
Block a user