Merge branch 'keni-staticfn' into NetHack-3.7
This commit is contained in:
@@ -447,30 +447,9 @@ QUIETCC=0
|
||||
|
||||
# NB: This is not used for all .c files (see explicit rules in
|
||||
# dependencies).
|
||||
# if NOSTATICCORE
|
||||
# A normal or cross compile.
|
||||
# else
|
||||
# NOSTATICCORE: A compile that makes all functions non-static.
|
||||
# Rule /=/ allows 2 definitions of char array brief_feeling
|
||||
# fi
|
||||
$(TARGETPFX)%.o : %.c
|
||||
@if [ x$(NOSTATICCORE) = 'x' ]; then \
|
||||
echo $(TARGET_CC) $(TARGET_CFLAGS) -c -o $@ $< ; \
|
||||
$(TARGET_CC) $(TARGET_CFLAGS) -c -o $@ $< ; \
|
||||
else \
|
||||
( \
|
||||
echo "Generating " intermediate file .$< ; \
|
||||
$(AWK) ' \
|
||||
BEGIN{print "#line 1 \"$<\""}; \
|
||||
/=/{print;next}; \
|
||||
sub(/^static inline/, ""){print;next}; \
|
||||
sub(/^static( |$$)/, ""){print;next}; \
|
||||
{print}; \
|
||||
' < $< > .$< && \
|
||||
echo $(TARGET_CC) $(TARGET_CFLAGS) -c -o $@ .$< ; \
|
||||
$(TARGET_CC) $(TARGET_CFLAGS) -c -o $@ .$< ; \
|
||||
) \
|
||||
fi
|
||||
$(TARGET_CC) $(TARGET_CFLAGS) -c -o $@ $<
|
||||
|
||||
# Verbosity definitions, begin
|
||||
# Set QUIETCC=1 above to output less feedback while building.
|
||||
|
||||
@@ -45,8 +45,11 @@ GAMEGRP = games
|
||||
|
||||
# This gives better backtraces by making all core functions global; this
|
||||
# works around a limitation in glibc's backtrace(3) function.
|
||||
# Recommended with CRASHREPORT.
|
||||
#NOSTATICCORE = 1
|
||||
# This will be turned on automatically with CRASHREPROT.
|
||||
# 1 to enable, 0 to disable
|
||||
USE_NOSTATICFN = 1
|
||||
# If you want CRASHREPORT but absolutely don't want NOSTATICFN, define this:
|
||||
#USE_NONOSTATICFN = 1
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
#-INCLUDE cross-pre1.370
|
||||
@@ -344,6 +347,14 @@ POSTINSTALL+= sed -i -e 's;^GDBPATH=/usr/bin/gdb;\#GDBPATH=/usr/bin/gdb;' \
|
||||
-e 's;PANICTRACE_GDB=1;PANICTRACE_GDB=0;' $(INSTDIR)/sysconf;
|
||||
endif
|
||||
|
||||
ifeq 'USENONOSTATICFN' '1'
|
||||
CFLAGS += -DNONOSTATICFN
|
||||
else
|
||||
ifeq 'USE_NOSTATICFN' '1'
|
||||
CFLAGS += -DNOSTATICFN
|
||||
endif
|
||||
endif
|
||||
|
||||
# Lua
|
||||
# when building liblua.a, avoid warning that use of tmpnam() should be
|
||||
# replaced by mkstemp(); the lua code doesn't use nethack's config.h so
|
||||
|
||||
@@ -308,6 +308,9 @@ override GAME=
|
||||
MOREALL += ( cd src ; $(MAKE) pregame ; $(MAKE) $(TARGETPFX)libnh.a )
|
||||
endif # WANT_LIBNH
|
||||
|
||||
# XXX TESTING ONLY - macOS doesn't need this:
|
||||
CFLAGS += -DNOSTATICFN
|
||||
|
||||
# Lua
|
||||
# when building liblua.a, avoid warning that use of tmpnam() should be
|
||||
# replaced by mkstemp(); the lua code doesn't use nethack's config.h so
|
||||
|
||||
Reference in New Issue
Block a user