diff --git a/src/Makefile.cfg b/src/Makefile.cfg index 04a57de0e..c97b4d5a9 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -1,570 +1,573 @@ -# vim: ft=make -# -# Makefile.cfg for SRB2 -# - -# -# GNU compiler & tools' flags -# and other things -# - -# See the following variable don't start with 'GCC'. This is -# to avoid a false positive with the version detection... - -SUPPORTED_GCC_VERSIONS:=\ - 132 131 130 13\ - 123 122 121 120 12\ - 114 113 112 111 110 11\ - 105 104 103 102 101 100 10\ - 95 94 93 92 91 90\ - 85 84 83 82 81 80\ - 75 74 73 72 71 70\ - 64 63 62 61 60\ - 55 54 53 52 51 50\ - 49 48 47 46 45 44 43 42 41 40 - -LATEST_GCC_VERSION=13.2 - -# gcc or g++ -ifdef PREFIX - CC:=$(PREFIX)-gcc - CXX:=$(PREFIX)-g++ - OBJCOPY?=$(PREFIX)-objcopy - OBJDUMP?=$(PREFIX)-objdump - STRIP?=$(PREFIX)-strip - WINDRES?=$(PREFIX)-windres -else - OBJCOPY?=objcopy - OBJDUMP?=objdump - STRIP?=strip - WINDRES?=windres -endif - -# because Apple screws with us on this -# need to get bintools from homebrew -ifdef MACOSX - CC=clang - CXX=clang - OBJCOPY=gobjcopy - OBJDUMP=gobjdump -endif - -# Automatically set version flag, but not if one was manually set -ifeq (,$(filter GCC%,$(.VARIABLES))) - version:=$(shell $(CC) --version) - # check if this is in fact GCC - ifneq (,$(or $(findstring gcc,$(version)),$(findstring GCC,$(version)))) - shellversion:=$(shell $(CC) -dumpversion) - - # Try to remove "-win32" - version:=$(subst -win32,.0,$(shellversion)) - - # Turn version into words of major, minor - v:=$(subst ., ,$(version)) - # concat. major minor - v:=$(word 1,$(v))$(word 2,$(v)) - - # If this version is not in the list, default to the latest supported - ifeq (,$(filter $(v),$(SUPPORTED_GCC_VERSIONS))) - $(info\ - Your compiler version, GCC $(version), is not supported by the Makefile.\ - The Makefile will assume GCC $(LATEST_GCC_VERSION).) - GCC$(subst .,,$(LATEST_GCC_VERSION))=1 - else - $(info Detected GCC $(version) (GCC$(v))) - GCC$(v)=1 - endif - endif -endif - -ifdef GCC132 -GCC131=1 -endif - -ifdef GCC131 -GCC130=1 -endif - -ifdef GCC13 -GCC130=1 -endif - -ifdef GCC130 -GCC123=1 -endif - -ifdef GCC123 -GCC122=1 -endif - -ifdef GCC122 -GCC121=1 -endif - -ifdef GCC121 -GCC120=1 -endif - -ifdef GCC12 -GCC120=1 -endif - -ifdef GCC120 -GCC114=1 -endif - -ifdef GCC114 -GCC113=1 -endif - -ifdef GCC113 -GCC112=1 -endif - -ifdef GCC112 -GCC111=1 -endif - -ifdef GCC111 -GCC110=1 -endif - -ifdef GCC11 -GCC110=1 -endif - -ifdef GCC110 -GCC105=1 -endif - -ifdef GCC105 -GCC104=1 -endif - -ifdef GCC104 -GCC103=1 -endif - -ifdef GCC103 -GCC102=1 -endif - -ifdef GCC102 -GCC101=1 -endif - -ifdef GCC101 -GCC100=1 -endif - -ifdef GCC10 -GCC100=1 -endif - -ifdef GCC100 -GCC93=1 -endif - -ifdef GCC95 -GCC94=1 -endif - -ifdef GCC94 -GCC93=1 -endif - -ifdef GCC93 -GCC92=1 -endif - -ifdef GCC92 -GCC91=1 -endif - -ifdef GCC91 -GCC90=1 -endif - -ifdef GCC90 -GCC85=1 -endif - -ifdef GCC85 -GCC84=1 -endif - -ifdef GCC84 -GCC83=1 -endif - -ifdef GCC83 -GCC82=1 -endif - -ifdef GCC82 -GCC81=1 -endif - -ifdef GCC81 -GCC80=1 -endif - -ifdef GCC80 -GCC75=1 -endif - -ifdef GCC75 -GCC74=1 -endif - -ifdef GCC74 -GCC73=1 -endif - -ifdef GCC73 -GCC72=1 -endif - -ifdef GCC72 -GCC71=1 -endif - -ifdef GCC71 -GCC70=1 -endif - -ifdef GCC70 -GCC64=1 -endif - -ifdef GCC64 -GCC63=1 -endif - -ifdef GCC63 -GCC62=1 -endif - -ifdef GCC62 -GCC61=1 -endif - -ifdef GCC61 -GCC60=1 -endif - -ifdef GCC60 -GCC55=1 -endif - -ifdef GCC55 -GCC54=1 -endif - -ifdef GCC54 -GCC53=1 -endif - -ifdef GCC53 -GCC52=1 -endif - -ifdef GCC52 -GCC51=1 -endif - -ifdef GCC51 -GCC50=1 -endif - -ifdef GCC50 -GCC49=1 -endif - -ifdef GCC49 -GCC48=1 -endif - -ifdef GCC48 -GCC47=1 -endif - -ifdef GCC47 -GCC46=1 -endif - -ifdef GCC46 -GCC45=1 -endif - -ifdef GCC45 -GCC44=1 -endif - -ifdef GCC44 -GCC43=1 -endif - -ifdef GCC43 -GCC42=1 -endif - -ifdef GCC42 -GCC41=1 -endif - -ifdef GCC41 -GCC40=1 -VCHELP=1 -endif - -ifdef GCC295 -GCC29=1 -endif - -OLDWFLAGS:=$(WFLAGS) -# -W -Wno-unused -WFLAGS=-Wall -ifndef GCC295 -#WFLAGS+=-Wno-packed -endif -ifndef RELAXWARNINGS - WFLAGS+=-W -#WFLAGS+=-Wno-sign-compare -ifndef GCC295 - WFLAGS+=-Wno-div-by-zero -endif -#WFLAGS+=-Wsystem-headers -WFLAGS+=-Wfloat-equal -#WFLAGS+=-Wtraditional -ifdef VCHELP - #WFLAGS+=-Wdeclaration-after-statement - WFLAGS+=-Wno-error=declaration-after-statement -endif - WFLAGS+=-Wundef -ifndef GCC295 - WFLAGS+=-Wendif-labels -endif -ifdef GCC41 - WFLAGS+=-Wshadow -endif -#WFLAGS+=-Wlarger-than-%len% - WFLAGS+=-Wpointer-arith -Wbad-function-cast -ifdef GCC45 -#WFLAGS+=-Wc++-compat -endif - WFLAGS+=-Wcast-qual -ifndef NOCASTALIGNWARN - WFLAGS+=-Wcast-align -endif - WFLAGS+=-Wwrite-strings -ifndef ERRORMODE -#WFLAGS+=-Wconversion -ifdef GCC43 - #WFLAGS+=-Wno-sign-conversion -endif -endif - WFLAGS+=-Wsign-compare -ifdef GCC45 - WFLAGS+=-Wlogical-op -endif - WFLAGS+=-Waggregate-return -ifdef HAIKU -ifdef GCC41 - #WFLAGS+=-Wno-attributes -endif -endif -#WFLAGS+=-Wstrict-prototypes -ifdef GCC40 - WFLAGS+=-Wold-style-definition -endif - WFLAGS+=-Wmissing-prototypes -Wmissing-declarations -ifdef GCC40 - WFLAGS+=-Wmissing-field-initializers -endif - WFLAGS+=-Wmissing-noreturn -#WFLAGS+=-Wmissing-format-attribute -#WFLAGS+=-Wno-multichar -#WFLAGS+=-Wno-deprecated-declarations -#WFLAGS+=-Wpacked -#WFLAGS+=-Wpadded -#WFLAGS+=-Wredundant-decls - WFLAGS+=-Wnested-externs -#WFLAGS+=-Wunreachable-code - WFLAGS+=-Winline -ifdef GCC43 - WFLAGS+=-funit-at-a-time - WFLAGS+=-Wlogical-op -endif -ifndef GCC295 - WFLAGS+=-Wdisabled-optimization -endif -endif -WFLAGS+=-Wformat-y2k -ifdef GCC71 -WFLAGS+=-Wno-error=format-overflow=2 -endif -WFLAGS+=-Wformat-security -ifndef GCC29 -#WFLAGS+=-Winit-self -endif -ifdef GCC46 -WFLAGS+=-Wno-suggest-attribute=noreturn -endif - -ifdef NOLDWARNING -LDFLAGS+=-Wl,--as-needed -endif - -ifdef ERRORMODE -WFLAGS+=-Werror -endif - -WFLAGS+=$(OLDWFLAGS) - -ifdef GCC43 - #WFLAGS+=-Wno-error=clobbered -endif -ifdef GCC44 - WFLAGS+=-Wno-error=array-bounds -endif -ifdef GCC46 - WFLAGS+=-Wno-error=suggest-attribute=noreturn -endif -ifdef GCC54 - WFLAGS+=-Wno-logical-op -Wno-error=logical-op -endif -ifdef GCC61 - WFLAGS+=-Wno-tautological-compare -Wno-error=tautological-compare -endif -ifdef GCC71 - WFLAGS+=-Wno-error=implicit-fallthrough - WFLAGS+=-Wno-implicit-fallthrough - WFLAGS+=-Wno-format-truncation -endif -ifdef GCC81 - WFLAGS+=-Wno-error=format-overflow - WFLAGS+=-Wno-error=stringop-truncation - WFLAGS+=-Wno-error=stringop-overflow - WFLAGS+=-Wno-format-overflow - WFLAGS+=-Wno-stringop-truncation - WFLAGS+=-Wno-stringop-overflow - WFLAGS+=-Wno-error=multistatement-macros -endif - - -#indicate platform and what interface use with -ifndef LINUX -ifndef FREEBSD -ifndef CYGWIN32 -ifndef MINGW -ifndef MINGW64 -ifndef SDL -ifndef DUMMY -$(error No interface or platform flag defined) -endif -endif -endif -endif -endif -endif -endif - -#determine the interface directory (where you put all i_*.c) -i_net_o=$(OBJDIR)/i_net.o -i_system_o=$(OBJDIR)/i_system.o -i_sound_o=$(OBJDIR)/i_sound.o -i_main_o=$(OBJDIR)/i_main.o -#set OBJDIR and BIN's starting place -OBJDIR=../objs -BIN=../bin -REMOVE?=rm -f -CP?=cp -MKDIR?=mkdir -p -MKISOFS?=mkisofs -DD?=dd -GZIP?=gzip -GZIP_OPTS?=-9 -f -n -GZIP_OPT2=$(GZIP_OPTS) --rsyncable -UPX?=upx -UPX_OPTS?=--best --preserve-build-id -ifndef ECHO -UPX_OPTS+=-q -endif - -#Interface Setup -ifdef DUMMY - INTERFACE=dummy - OBJDIR:=$(OBJDIR)/dummy - BIN:=$(BIN)/dummy -else -ifdef LINUX - SDL=1 -ifdef LINUX64 - OBJDIR:=$(OBJDIR)/Linux64 - BIN:=$(BIN)/Linux64 -else - OBJDIR:=$(OBJDIR)/Linux - BIN:=$(BIN)/Linux -endif -else -ifdef FREEBSD - INTERFACE=sdl - SDL=1 - - OBJDIR:=$(OBJDIR)/FreeBSD - BIN:=$(BIN)/FreeBSD -else -ifdef SOLARIS - INTERFACE=sdl - SDL=1 - - OBJDIR:=$(OBJDIR)/Solaris - BIN:=$(BIN)/Solaris -else -ifdef CYGWIN32 - INTERFACE=sdl - SDL=1 - - OBJDIR:=$(OBJDIR)/cygwin - BIN:=$(BIN)/Cygwin -else -ifdef MINGW64 - INTERFACE=win32 - OBJDIR:=$(OBJDIR)/Mingw64 - BIN:=$(BIN)/Mingw64 -else -ifdef MINGW - INTERFACE=win32 - OBJDIR:=$(OBJDIR)/Mingw - BIN:=$(BIN)/Mingw -endif -endif -endif -endif -endif -endif -endif - -ifdef ARCHNAME - OBJDIR:=$(OBJDIR)/$(ARCHNAME) - BIN:=$(BIN)/$(ARCHNAME) -endif - -OBJDUMP_OPTS?=--wide --source --line-numbers -LD=$(CC) - -ifdef SDL - INTERFACE=sdl - OBJDIR:=$(OBJDIR)/SDL -endif - -ifndef DUMMY -ifdef DEBUGMODE - OBJDIR:=$(OBJDIR)/Debug - BIN:=$(BIN)/Debug -else - OBJDIR:=$(OBJDIR)/Release - BIN:=$(BIN)/Release -endif -endif +# vim: ft=make +# +# Makefile.cfg for SRB2 +# + +# +# GNU compiler & tools' flags +# and other things +# + +# See the following variable don't start with 'GCC'. This is +# to avoid a false positive with the version detection... + +SUPPORTED_GCC_VERSIONS:=\ + 132 131 130 13\ + 123 122 121 120 12\ + 114 113 112 111 110 11\ + 105 104 103 102 101 100 10\ + 95 94 93 92 91 90\ + 85 84 83 82 81 80\ + 75 74 73 72 71 70\ + 64 63 62 61 60\ + 55 54 53 52 51 50\ + 49 48 47 46 45 44 43 42 41 40 + +LATEST_GCC_VERSION=13.2 + +# gcc or g++ +ifdef PREFIX + CC:=$(PREFIX)-gcc + CXX:=$(PREFIX)-g++ + OBJCOPY?=$(PREFIX)-objcopy + OBJDUMP?=$(PREFIX)-objdump + STRIP?=$(PREFIX)-strip + WINDRES?=$(PREFIX)-windres +else + OBJCOPY?=objcopy + OBJDUMP?=objdump + STRIP?=strip + WINDRES?=windres +endif + +# because Apple screws with us on this +# need to get bintools from homebrew +ifdef MACOSX + CC=clang + CXX=clang + OBJCOPY=gobjcopy + OBJDUMP=gobjdump +endif + +# Automatically set version flag, but not if one was manually set +ifeq (,$(filter GCC%,$(.VARIABLES))) + version:=$(shell $(CC) --version) + # check if this is in fact GCC + ifneq (,$(or $(findstring gcc,$(version)),$(findstring GCC,$(version)))) + shellversion:=$(shell $(CC) -dumpversion) + + # Try to remove "-win32" + version:=$(subst -win32,.0,$(shellversion)) + + # Turn version into words of major, minor + v:=$(subst ., ,$(version)) + # concat. major minor + v:=$(word 1,$(v))$(word 2,$(v)) + + # If this version is not in the list, default to the latest supported + ifeq (,$(filter $(v),$(SUPPORTED_GCC_VERSIONS))) + $(info\ + Your compiler version, GCC $(version), is not supported by the Makefile.\ + The Makefile will assume GCC $(LATEST_GCC_VERSION).) + GCC$(subst .,,$(LATEST_GCC_VERSION))=1 + else + $(info Detected GCC $(version) (GCC$(v))) + GCC$(v)=1 + endif + endif +endif + +ifdef GCC132 +GCC131=1 +endif + +ifdef GCC131 +GCC130=1 +endif + +ifdef GCC13 +GCC130=1 +endif + +ifdef GCC130 +GCC123=1 +endif + +ifdef GCC123 +GCC122=1 +endif + +ifdef GCC122 +GCC121=1 +endif + +ifdef GCC121 +GCC120=1 +endif + +ifdef GCC12 +GCC120=1 +endif + +ifdef GCC120 +GCC114=1 +endif + +ifdef GCC114 +GCC113=1 +endif + +ifdef GCC113 +GCC112=1 +endif + +ifdef GCC112 +GCC111=1 +endif + +ifdef GCC111 +GCC110=1 +endif + +ifdef GCC11 +GCC110=1 +endif + +ifdef GCC110 +GCC105=1 +endif + +ifdef GCC105 +GCC104=1 +endif + +ifdef GCC104 +GCC103=1 +endif + +ifdef GCC103 +GCC102=1 +endif + +ifdef GCC102 +GCC101=1 +endif + +ifdef GCC101 +GCC100=1 +endif + +ifdef GCC10 +GCC100=1 +endif + +ifdef GCC100 +GCC93=1 +endif + +ifdef GCC95 +GCC94=1 +endif + +ifdef GCC94 +GCC93=1 +endif + +ifdef GCC93 +GCC92=1 +endif + +ifdef GCC92 +GCC91=1 +endif + +ifdef GCC91 +GCC90=1 +endif + +ifdef GCC90 +GCC85=1 +endif + +ifdef GCC85 +GCC84=1 +endif + +ifdef GCC84 +GCC83=1 +endif + +ifdef GCC83 +GCC82=1 +endif + +ifdef GCC82 +GCC81=1 +endif + +ifdef GCC81 +GCC80=1 +endif + +ifdef GCC80 +GCC75=1 +endif + +ifdef GCC75 +GCC74=1 +endif + +ifdef GCC74 +GCC73=1 +endif + +ifdef GCC73 +GCC72=1 +endif + +ifdef GCC72 +GCC71=1 +endif + +ifdef GCC71 +GCC70=1 +endif + +ifdef GCC70 +GCC64=1 +endif + +ifdef GCC64 +GCC63=1 +endif + +ifdef GCC63 +GCC62=1 +endif + +ifdef GCC62 +GCC61=1 +endif + +ifdef GCC61 +GCC60=1 +endif + +ifdef GCC60 +GCC55=1 +endif + +ifdef GCC55 +GCC54=1 +endif + +ifdef GCC54 +GCC53=1 +endif + +ifdef GCC53 +GCC52=1 +endif + +ifdef GCC52 +GCC51=1 +endif + +ifdef GCC51 +GCC50=1 +endif + +ifdef GCC50 +GCC49=1 +endif + +ifdef GCC49 +GCC48=1 +endif + +ifdef GCC48 +GCC47=1 +endif + +ifdef GCC47 +GCC46=1 +endif + +ifdef GCC46 +GCC45=1 +endif + +ifdef GCC45 +GCC44=1 +endif + +ifdef GCC44 +GCC43=1 +endif + +ifdef GCC43 +GCC42=1 +endif + +ifdef GCC42 +GCC41=1 +endif + +ifdef GCC41 +GCC40=1 +VCHELP=1 +endif + +ifdef GCC295 +GCC29=1 +endif + +OLDWFLAGS:=$(WFLAGS) +# -W -Wno-unused +WFLAGS=-Wall +ifndef GCC295 +#WFLAGS+=-Wno-packed +endif +ifndef RELAXWARNINGS + WFLAGS+=-W +#WFLAGS+=-Wno-sign-compare +ifndef GCC295 + WFLAGS+=-Wno-div-by-zero +endif +#WFLAGS+=-Wsystem-headers +WFLAGS+=-Wfloat-equal +#WFLAGS+=-Wtraditional +ifdef VCHELP + #WFLAGS+=-Wdeclaration-after-statement + WFLAGS+=-Wno-error=declaration-after-statement +endif + WFLAGS+=-Wundef +ifndef GCC295 + WFLAGS+=-Wendif-labels +endif +ifdef GCC41 + WFLAGS+=-Wshadow +endif +#WFLAGS+=-Wlarger-than-%len% + WFLAGS+=-Wpointer-arith -Wbad-function-cast +ifdef GCC45 +#WFLAGS+=-Wc++-compat +endif + WFLAGS+=-Wcast-qual +ifndef NOCASTALIGNWARN + WFLAGS+=-Wcast-align +endif + WFLAGS+=-Wwrite-strings +ifndef ERRORMODE +#WFLAGS+=-Wconversion +ifdef GCC43 + #WFLAGS+=-Wno-sign-conversion +endif +endif + WFLAGS+=-Wsign-compare +ifdef GCC45 + WFLAGS+=-Wlogical-op +endif + WFLAGS+=-Waggregate-return +ifdef HAIKU +ifdef GCC41 + #WFLAGS+=-Wno-attributes +endif +endif +#WFLAGS+=-Wstrict-prototypes +ifdef GCC40 + WFLAGS+=-Wold-style-definition +endif + WFLAGS+=-Wmissing-prototypes -Wmissing-declarations +ifdef GCC40 + WFLAGS+=-Wmissing-field-initializers +endif + WFLAGS+=-Wmissing-noreturn +#WFLAGS+=-Wmissing-format-attribute +#WFLAGS+=-Wno-multichar +#WFLAGS+=-Wno-deprecated-declarations +#WFLAGS+=-Wpacked +#WFLAGS+=-Wpadded +#WFLAGS+=-Wredundant-decls + WFLAGS+=-Wnested-externs +#WFLAGS+=-Wunreachable-code + WFLAGS+=-Winline +ifdef GCC43 + WFLAGS+=-funit-at-a-time + WFLAGS+=-Wlogical-op +endif +ifndef GCC295 + WFLAGS+=-Wdisabled-optimization +endif +endif +WFLAGS+=-Wformat-y2k +ifdef GCC71 +WFLAGS+=-Wno-error=format-overflow=2 +endif +WFLAGS+=-Wformat-security +ifndef GCC29 +#WFLAGS+=-Winit-self +endif +ifdef GCC46 +WFLAGS+=-Wno-suggest-attribute=noreturn +endif + +ifdef NOLDWARNING +LDFLAGS+=-Wl,--as-needed +endif + +ifdef ERRORMODE +WFLAGS+=-Werror +endif + +WFLAGS+=$(OLDWFLAGS) + +ifdef GCC43 + #WFLAGS+=-Wno-error=clobbered +endif +ifdef GCC44 + WFLAGS+=-Wno-error=array-bounds +endif +ifdef GCC45 +opts+=-fwrapv +endif +ifdef GCC46 + WFLAGS+=-Wno-error=suggest-attribute=noreturn +endif +ifdef GCC54 + WFLAGS+=-Wno-logical-op -Wno-error=logical-op +endif +ifdef GCC61 + WFLAGS+=-Wno-tautological-compare -Wno-error=tautological-compare +endif +ifdef GCC71 + WFLAGS+=-Wno-error=implicit-fallthrough + WFLAGS+=-Wno-implicit-fallthrough + WFLAGS+=-Wno-format-truncation +endif +ifdef GCC81 + WFLAGS+=-Wno-error=format-overflow + WFLAGS+=-Wno-error=stringop-truncation + WFLAGS+=-Wno-error=stringop-overflow + WFLAGS+=-Wno-format-overflow + WFLAGS+=-Wno-stringop-truncation + WFLAGS+=-Wno-stringop-overflow + WFLAGS+=-Wno-error=multistatement-macros +endif + + +#indicate platform and what interface use with +ifndef LINUX +ifndef FREEBSD +ifndef CYGWIN32 +ifndef MINGW +ifndef MINGW64 +ifndef SDL +ifndef DUMMY +$(error No interface or platform flag defined) +endif +endif +endif +endif +endif +endif +endif + +#determine the interface directory (where you put all i_*.c) +i_net_o=$(OBJDIR)/i_net.o +i_system_o=$(OBJDIR)/i_system.o +i_sound_o=$(OBJDIR)/i_sound.o +i_main_o=$(OBJDIR)/i_main.o +#set OBJDIR and BIN's starting place +OBJDIR=../objs +BIN=../bin +REMOVE?=rm -f +CP?=cp +MKDIR?=mkdir -p +MKISOFS?=mkisofs +DD?=dd +GZIP?=gzip +GZIP_OPTS?=-9 -f -n +GZIP_OPT2=$(GZIP_OPTS) --rsyncable +UPX?=upx +UPX_OPTS?=--best --preserve-build-id +ifndef ECHO +UPX_OPTS+=-q +endif + +#Interface Setup +ifdef DUMMY + INTERFACE=dummy + OBJDIR:=$(OBJDIR)/dummy + BIN:=$(BIN)/dummy +else +ifdef LINUX + SDL=1 +ifdef LINUX64 + OBJDIR:=$(OBJDIR)/Linux64 + BIN:=$(BIN)/Linux64 +else + OBJDIR:=$(OBJDIR)/Linux + BIN:=$(BIN)/Linux +endif +else +ifdef FREEBSD + INTERFACE=sdl + SDL=1 + + OBJDIR:=$(OBJDIR)/FreeBSD + BIN:=$(BIN)/FreeBSD +else +ifdef SOLARIS + INTERFACE=sdl + SDL=1 + + OBJDIR:=$(OBJDIR)/Solaris + BIN:=$(BIN)/Solaris +else +ifdef CYGWIN32 + INTERFACE=sdl + SDL=1 + + OBJDIR:=$(OBJDIR)/cygwin + BIN:=$(BIN)/Cygwin +else +ifdef MINGW64 + INTERFACE=win32 + OBJDIR:=$(OBJDIR)/Mingw64 + BIN:=$(BIN)/Mingw64 +else +ifdef MINGW + INTERFACE=win32 + OBJDIR:=$(OBJDIR)/Mingw + BIN:=$(BIN)/Mingw +endif +endif +endif +endif +endif +endif +endif + +ifdef ARCHNAME + OBJDIR:=$(OBJDIR)/$(ARCHNAME) + BIN:=$(BIN)/$(ARCHNAME) +endif + +OBJDUMP_OPTS?=--wide --source --line-numbers +LD=$(CC) + +ifdef SDL + INTERFACE=sdl + OBJDIR:=$(OBJDIR)/SDL +endif + +ifndef DUMMY +ifdef DEBUGMODE + OBJDIR:=$(OBJDIR)/Debug + BIN:=$(BIN)/Debug +else + OBJDIR:=$(OBJDIR)/Release + BIN:=$(BIN)/Release +endif +endif diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 2bec70ec9..471d329a4 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1617,7 +1617,7 @@ static void SV_SendPlayerInfo(INT32 node) continue; } - if (!playeringame[i]) + if (playeringame[i] == UINT8_MAX || !playeringame[i]) { netbuffer->u.playerinfo[i].node = 255; // This slot is empty. continue; diff --git a/src/d_netfil.c b/src/d_netfil.c index dc8987b03..9c32a41f4 100644 --- a/src/d_netfil.c +++ b/src/d_netfil.c @@ -1298,9 +1298,9 @@ void CURLPrepareFile(const char* url, int dfilenum) curl_multi_perform(multi_handle, &curl_runninghandles); curl_starttime = time(NULL); - + curl_running = true; - + I_spawn_thread("http-download", (I_thread_fn)CURLGetFile, NULL); } } @@ -1385,7 +1385,6 @@ void CURLGetFile(void) } } - Z_Free(filename); curl_curfile->file = NULL; curl_transfers--; diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 0feb6830e..131775c53 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -2248,7 +2248,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom if (rover->flags & FF_TRANSLUCENT && rover->alpha < 256) { blendmode = PF_Translucent; - Surf.PolyColor.s.alpha = (UINT8)rover->alpha-1 > 255 ? 255 : rover->alpha-1; + Surf.PolyColor.s.alpha = max(0, min(rover->alpha, 255)); } if (gr_frontsector->numlights) @@ -2607,7 +2607,7 @@ static void HWR_AddLine(seg_t *line) } // PrBoom: Back side, i.e. backface culling - read: endAngle >= startAngle! - if (angle2 - angle1 < ANGLE_180) + if (angle2 - angle1 < ANGLE_180 || !gr_curline->linedef) return; // PrBoom: use REAL clipping math YAYYYYYYY!!! diff --git a/src/http-mserv.c b/src/http-mserv.c index 08b8821d4..d1ef80ae4 100644 --- a/src/http-mserv.c +++ b/src/http-mserv.c @@ -339,7 +339,8 @@ HMS_unlist (void) if (! hms) return 0; - curl_easy_setopt(hms->curl, CURLOPT_CUSTOMREQUEST, "POST"); + curl_easy_setopt(hms->curl, CURLOPT_POST, 1); + curl_easy_setopt(hms->curl, CURLOPT_POSTFIELDSIZE, 0); ok = HMS_do(hms); HMS_end(hms); diff --git a/src/k_kart.c b/src/k_kart.c index 9ba12edff..2857eddf3 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3110,7 +3110,6 @@ static void K_StretchPlayerGravity(player_t *p) //CONS_Printf(M_GetText("div: %d, scale factor: %d, stretch value: %d\n"), rzsDiv, stretchScaleFactor, cv_gravstretch.value); - I_Assert(p != NULL); I_Assert(p->mo != NULL); I_Assert(!P_MobjWasRemoved(p->mo)); @@ -3150,6 +3149,7 @@ static void K_StretchPlayerGravity(player_t *p) slamDiv = 0; else slamDiv = FixedDiv(p->mo->stretchslam, stretchScaleFactor); + p->mo->spritexscale = (dxs+(((slamDiv*2)/3)*2)); p->mo->spriteyscale = (dys-(slamDiv)); if (p->mo->stretchslam > 0) @@ -6933,7 +6933,6 @@ static patch_t *skp_smallstickerclr3; static patch_t *kp_itemmulstickerclr[2]; static patch_t *kp_itembgclr[4]; - //Kartz speedo static patch_t *kp_kartzspeedo[25]; @@ -7086,6 +7085,7 @@ void K_LoadKartHUDGraphics(void) kp_itembgclr[3] = W_CachePatchName("K_ISBCD", PU_HUDGFX); kp_itemmulstickerclr[1] = W_CachePatchName("K_ISMULC", PU_HUDGFX); kp_itemmulstickerclr[0] = W_CachePatchName("K_ITMULC", PU_HUDGFX); + if (big_lap_color){ kp_lapstickerbigclr = W_CachePatchName("K_SCLAPB", PU_HUDGFX); kp_lapstickerbig2clr = W_CachePatchName("K_SCLA2B", PU_HUDGFX); diff --git a/src/m_anigif.c b/src/m_anigif.c index 744651319..44b5a96c0 100644 --- a/src/m_anigif.c +++ b/src/m_anigif.c @@ -38,7 +38,6 @@ static INT32 gif_frames = 0; static UINT8 gif_writeover = 0; - // OPTIMIZE gif output // --- @@ -631,14 +630,6 @@ static void GIF_framewrite(void) // INT32 GIF_open(const char *filename) { -#if 0 - if (rendermode != render_soft) - { - CONS_Alert(CONS_WARNING, M_GetText("GIFs cannot be taken in non-software modes!\n")); - return 0; - } -#endif - gif_out = fopen(filename, "wb"); if (!gif_out) return 0;