Merge remote-tracking branch 'origin/NetHack-3.6.0'
This commit is contained in:
@@ -332,6 +332,9 @@ RANDOBJ =
|
||||
# used by `make depend' to reconstruct this Makefile; you shouldn't need this
|
||||
AWK = nawk
|
||||
|
||||
|
||||
#VERBOSEMAKE = 1
|
||||
|
||||
# ----------------------------------------
|
||||
#
|
||||
# Nothing below this line should have to be changed.
|
||||
@@ -339,6 +342,20 @@ AWK = nawk
|
||||
# Other things that have to be reconfigured are in config.h,
|
||||
# {unixconf.h, pcconf.h, tosconf.h}, and possibly system.h
|
||||
|
||||
# Verbosity
|
||||
ACTUAL_CC := $(CC)
|
||||
CC_V0 = @echo "[CC] $<"; $(ACTUAL_CC)
|
||||
CC_V = $(CC_V0)
|
||||
CC_V1 = $(ACTUAL_CC)
|
||||
CC = $(CC_V$(VERBOSEMAKE))
|
||||
|
||||
ACTUAL_CXX := $(CXX)
|
||||
CXX_V0 = @echo "[CXX] $<"; $(ACTUAL_CXX)
|
||||
CXX_V = $(CXX_V0)
|
||||
CXX_V1 = $(ACTUAL_CXX)
|
||||
CXX = $(CXX_V$(VERBOSEMAKE))
|
||||
|
||||
|
||||
MAKEDEFS = ../util/makedefs
|
||||
|
||||
# timestamp files to reduce `make' overhead and shorten .o dependency lists
|
||||
@@ -438,7 +455,7 @@ $(GAME): $(SYSTEM)
|
||||
|
||||
Sysunix: $(HOBJ) Makefile
|
||||
@echo "Loading ..."
|
||||
$(LINK) $(LFLAGS) -o $(GAME) $(HOBJ) $(WINLIB) $(LIBS)
|
||||
@$(LINK) $(LFLAGS) -o $(GAME) $(HOBJ) $(WINLIB) $(LIBS)
|
||||
@touch Sysunix
|
||||
|
||||
Sys3B2: $(HOBJ) Makefile
|
||||
|
||||
@@ -130,6 +130,20 @@ LEXYYC = lex.yy.c
|
||||
#
|
||||
# Nothing below this line should have to be changed.
|
||||
|
||||
# Verbosity
|
||||
ACTUAL_CC := $(CC)
|
||||
CC_V0 = @echo "[CC] $<"; $(ACTUAL_CC)
|
||||
CC_V = $(CC_V0)
|
||||
CC_V1 = $(ACTUAL_CC)
|
||||
CC = $(CC_V$(VERBOSEMAKE))
|
||||
|
||||
ACTUAL_CXX := $(CXX)
|
||||
CXX_V0 = @echo "[CXX] $<"; $(ACTUAL_CXX)
|
||||
CXX_V = $(CXX_V0)
|
||||
CXX_V1 = $(ACTUAL_CXX)
|
||||
CXX = $(CXX_V$(VERBOSEMAKE))
|
||||
|
||||
|
||||
# timestamps for primary header files, matching src/Makefile
|
||||
CONFIG_H = ../src/config.h-t
|
||||
HACK_H = ../src/hack.h-t
|
||||
@@ -232,8 +246,7 @@ lev_main.o: lev_main.c $(HACK_H) ../include/sp_lev.h ../include/tcap.h \
|
||||
# egrep will return failure if it doesn't find anything, but we know there
|
||||
# is one "_cplusplus" inside a comment
|
||||
lev_lex.o: lev_lex.c $(HACK_H) ../include/lev_comp.h ../include/sp_lev.h
|
||||
@echo $(CC) -c $(CFLAGS) lev_lex.c
|
||||
@$(CC) -c $(CFLAGS) -DWEIRD_LEX=`egrep -c _cplusplus lev_lex.c` lev_lex.c
|
||||
$(CC) -c $(CFLAGS) -DWEIRD_LEX=`egrep -c _cplusplus lev_lex.c` lev_lex.c
|
||||
|
||||
# '$(YACC) -d' generates both $(YTABC) and $(YTABH) in one run
|
||||
../include/lev_comp.h: lev_yacc.c
|
||||
@@ -270,8 +283,7 @@ dgn_main.o: dgn_main.c $(CONFIG_H) ../include/dlb.h
|
||||
|
||||
# see dgn_comp.l for WEIRD_LEX discussion
|
||||
dgn_lex.o: dgn_lex.c $(CONFIG_H) ../include/dgn_comp.h ../include/dgn_file.h
|
||||
@echo $(CC) -c $(CFLAGS) dgn_lex.c
|
||||
@$(CC) -c $(CFLAGS) -DWEIRD_LEX=`egrep -c _cplusplus dgn_lex.c` dgn_lex.c
|
||||
$(CC) -c $(CFLAGS) -DWEIRD_LEX=`egrep -c _cplusplus dgn_lex.c` dgn_lex.c
|
||||
|
||||
# '$(YACC) -d' generates both $(YTABC) and $(YTABH) in one run
|
||||
../include/dgn_comp.h: dgn_yacc.c
|
||||
|
||||
@@ -20,7 +20,7 @@ VARDIR = $(HACKDIR)
|
||||
POSTINSTALL= cp -n sys/unix/sysconf $(INSTDIR)/sysconf; $(CHOWN) $(GAMEUID) $(INSTDIR)/sysconf; $(CHGRP) $(GAMEGRP) $(INSTDIR)/sysconf; chmod $(VARFILEPERM) $(INSTDIR)/sysconf;
|
||||
POSTINSTALL+= bdftopcf win/X11/nh10.bdf > $(INSTDIR)/nh10.pcf; (cd $(INSTDIR); mkfontdir);
|
||||
|
||||
CFLAGS=-O -I../include -DNOTPARMDECL
|
||||
CFLAGS=-g -O -I../include -DNOTPARMDECL
|
||||
CFLAGS+=-DHACKDIR=\"$(HACKDIR)\"
|
||||
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\"
|
||||
CFLAGS+=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\"
|
||||
|
||||
@@ -26,6 +26,11 @@ x) hints=/dev/null
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ ! -f "$hints" ]; then
|
||||
echo "Cannot find hints file $hfile"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/bin/sh ./mkmkfile.sh Makefile.top TOP ../../Makefile $hints $hfile
|
||||
/bin/sh ./mkmkfile.sh Makefile.dat DAT ../../dat/Makefile $hints $hfile
|
||||
/bin/sh ./mkmkfile.sh Makefile.doc DOC ../../doc/Makefile $hints $hfile
|
||||
|
||||
@@ -696,4 +696,18 @@ get_unix_pw()
|
||||
return pw;
|
||||
}
|
||||
|
||||
char *
|
||||
get_login_name()
|
||||
{
|
||||
static char buf[BUFSZ];
|
||||
struct passwd *pw = get_unix_pw();
|
||||
|
||||
buf[0] = '\0';
|
||||
|
||||
if (pw)
|
||||
(void)strcpy(buf, pw->pw_name);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
/*unixmain.c*/
|
||||
|
||||
Reference in New Issue
Block a user