Merge branch 'master' into next

This commit is contained in:
Steel Titanium 2021-03-01 16:55:48 -05:00
commit d59de95262
26 changed files with 141 additions and 41 deletions

2
dep/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
#All folders
*.d

2
dep/FreeBSD/SDL/Debug/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/FreeBSD/SDL/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/Linux/SDL/Debug/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/Linux/SDL/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/Linux64/SDL/Debug/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/Linux64/SDL/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/MasterClient/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/MasterServer/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/Mingw/Debug/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/Mingw/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/Mingw/SDL/Debug/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/Mingw/SDL/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/Mingw64/Debug/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/Mingw64/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/Mingw64/SDL/Debug/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/Mingw64/SDL/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/SDL/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/VC/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/VC9/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/cygwin/Debug/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/cygwin/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/dummy/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1247,6 +1247,7 @@ patterns
sprite = "SPHRA0"; sprite = "SPHRA0";
width = 96; width = 96;
height = 192; height = 192;
}
609 609
{ {
title = "Circle of Rings and Spheres (Big)"; title = "Circle of Rings and Spheres (Big)";

View File

@ -2,7 +2,7 @@
# GNU Make makefile for SRB2 # GNU Make makefile for SRB2
############################################################################# #############################################################################
# Copyright (C) 1998-2000 by DooM Legacy Team. # Copyright (C) 1998-2000 by DooM Legacy Team.
# Copyright (C) 2003-2020 by Sonic Team Junior. # Copyright (C) 2003-2021 by Sonic Team Junior.
# #
# This program is free software distributed under the # This program is free software distributed under the
# terms of the GNU General Public License, version 2. # terms of the GNU General Public License, version 2.
@ -24,7 +24,9 @@
# clean # clean
# Remove all object files # Remove all object files
# cleandep # cleandep
# Remove depend.dep # Remove dependency files
# distclean
# Remove autogenerated files
# dll # dll
# compile primary HW render DLL/SO # compile primary HW render DLL/SO
# all_dll # all_dll
@ -79,6 +81,17 @@
# #
############################################################################# #############################################################################
,=,
ifeq (,$(filter-out cleandep clean distclean,$(or $(MAKECMDGOALS),all)))
CLEANONLY=1
else ifndef SILENT
echo=@echo "$(1)"
ifndef MAKE_RESTARTS
print=$(info $(1))
endif
endif
ALL_SYSTEMS=\ ALL_SYSTEMS=\
PANDORA\ PANDORA\
LINUX64\ LINUX64\
@ -98,7 +111,7 @@ ALL_SYSTEMS=\
ifeq (,$(filter $(ALL_SYSTEMS),$(.VARIABLES))) ifeq (,$(filter $(ALL_SYSTEMS),$(.VARIABLES)))
ifeq ($(OS),Windows_NT) # all windows are Windows_NT... ifeq ($(OS),Windows_NT) # all windows are Windows_NT...
$(info Detected a Windows system, compiling for 32-bit MinGW SDL2...) $(call print,Detected a Windows system$(,) compiling for 32-bit MinGW SDL2...)
# go for a 32-bit sdl mingw exe by default # go for a 32-bit sdl mingw exe by default
MINGW=1 MINGW=1
@ -123,7 +136,7 @@ else # if you on the *nix
new_system:=$(new_system)64 new_system:=$(new_system)64
endif endif
$(info Detected $(system) ($(new_system))...) $(call print,Detected $(system) ($(new_system))...)
$(new_system)=1 $(new_system)=1
endif endif
@ -237,6 +250,12 @@ endif
MSGFMT?=msgfmt MSGFMT?=msgfmt
ifdef WINDOWSHELL
COMPTIME=-..\comptime.bat
else
COMPTIME=-../comptime.sh
endif
ifndef ECHO ifndef ECHO
NASM:=@$(NASM) NASM:=@$(NASM)
REMOVE:=@$(REMOVE) REMOVE:=@$(REMOVE)
@ -251,6 +270,7 @@ ifndef ECHO
MSGFMT:=@$(MSGFMT) MSGFMT:=@$(MSGFMT)
UPX:=@$(UPX) UPX:=@$(UPX)
UPX_OPTS+=-q UPX_OPTS+=-q
COMPTIME:=@$(COMPTIME)
endif endif
ifdef NONET ifdef NONET
@ -455,7 +475,6 @@ DBGNAME?=$(EXENAME).debug
# not too sophisticated dependency # not too sophisticated dependency
OBJS:=$(i_main_o) \ OBJS:=$(i_main_o) \
$(OBJDIR)/comptime.o \
$(OBJDIR)/string.o \ $(OBJDIR)/string.o \
$(OBJDIR)/d_main.o \ $(OBJDIR)/d_main.o \
$(OBJDIR)/d_clisrv.o \ $(OBJDIR)/d_clisrv.o \
@ -542,7 +561,10 @@ OBJS:=$(i_main_o) \
$(i_sound_o) \ $(i_sound_o) \
$(OBJS) $(OBJS)
DEPS:=$(patsubst $(OBJDIR)/%.o,$(DEPDIR)/%.d,$(filter %.o,$(OBJS)))
OBJS+=$(OBJDIR)/comptime.o
ifndef SILENT
ifndef ECHO ifndef ECHO
ifndef NOECHOFILENAMES ifndef NOECHOFILENAMES
define echoName = define echoName =
@ -550,6 +572,7 @@ define echoName =
endef endef
endif endif
endif endif
endif
# List of languages to compile. # List of languages to compile.
# For reference, this is the command I use to build a srb2.pot file from the source code. # For reference, this is the command I use to build a srb2.pot file from the source code.
@ -562,12 +585,12 @@ OPTS+=-DGETTEXT
endif endif
ifdef PANDORA ifdef PANDORA
all: pre-build $(BIN)/$(PNDNAME) all: $(BIN)/$(PNDNAME)
endif endif
ifdef SDL ifdef SDL
all: pre-build $(BIN)/$(EXENAME) all: $(BIN)/$(EXENAME)
endif endif
ifdef DUMMY ifdef DUMMY
@ -575,20 +598,15 @@ all: $(BIN)/$(EXENAME)
endif endif
cleandep: cleandep:
$(REMOVE) $(OBJDIR)/depend.dep $(REMOVE) $(DEPS)
$(REMOVE) comptime.h $(REMOVE) comptime.h
pre-build:
ifdef WINDOWSHELL
-..\comptime.bat .
else
-@../comptime.sh .
endif
clean: clean:
$(REMOVE) *~ *.flc $(REMOVE) *~ *.flc
$(REMOVE) $(OBJDIR)/*.o $(REMOVE) $(OBJDIR)/*.o
distclean: clean cleandep
ifdef MINGW ifdef MINGW
$(REMOVE) $(OBJDIR)/*.res $(REMOVE) $(OBJDIR)/*.res
endif endif
@ -608,11 +626,11 @@ asm:
$(BIN)/$(EXENAME): $(POS) $(OBJS) $(BIN)/$(EXENAME): $(POS) $(OBJS)
-$(MKDIR) $(BIN) -$(MKDIR) $(BIN)
@echo Linking $(EXENAME)... $(call echo,Linking $(EXENAME)...)
$(LD) $(LDFLAGS) $(OBJS) -o $(BIN)/$(EXENAME) $(LIBS) $(LD) $(LDFLAGS) $(OBJS) -o $(BIN)/$(EXENAME) $(LIBS)
ifndef VALGRIND ifndef VALGRIND
ifndef NOOBJDUMP ifndef NOOBJDUMP
@echo Dumping debugging info $(call echo,Dumping debugging info)
$(OBJDUMP) $(OBJDUMP_OPTS) $(BIN)/$(EXENAME) > $(BIN)/$(DBGNAME).txt $(OBJDUMP) $(OBJDUMP_OPTS) $(BIN)/$(EXENAME) > $(BIN)/$(DBGNAME).txt
ifdef WINDOWSHELL ifdef WINDOWSHELL
-$(GZIP) $(GZIP_OPTS) $(BIN)/$(DBGNAME).txt -$(GZIP) $(GZIP_OPTS) $(BIN)/$(DBGNAME).txt
@ -631,10 +649,10 @@ ifndef NOUPX
-$(UPX) $(UPX_OPTS) $(BIN)/$(EXENAME) -$(UPX) $(UPX_OPTS) $(BIN)/$(EXENAME)
endif endif
endif endif
@echo Build is done, please look for $(EXENAME) in $(BIN), \(checking for post steps\) $(call echo,Build is done$(,) please look for $(EXENAME) in $(BIN)$(,) (checking for post steps))
reobjdump: reobjdump:
@echo Redumping debugging info $(call echo,Redumping debugging info)
$(OBJDUMP) $(OBJDUMP_OPTS) $(BIN)/$(DBGNAME) > $(BIN)/$(DBGNAME).txt $(OBJDUMP) $(OBJDUMP_OPTS) $(BIN)/$(DBGNAME) > $(BIN)/$(DBGNAME).txt
ifdef WINDOWSHELL ifdef WINDOWSHELL
-$(GZIP) $(GZIP_OPTS) $(BIN)/$(DBGNAME).txt -$(GZIP) $(GZIP_OPTS) $(BIN)/$(DBGNAME).txt
@ -670,24 +688,40 @@ endif
endif endif
#dependecy made by gcc itself ! #dependecy made by gcc itself !
$(OBJS):
ifndef DUMMY ifndef DUMMY
-include $(OBJDIR)/depend.dep ifndef CLEANONLY
$(call print,Checking dependency files...)
-include $(DEPS)
endif
endif endif
$(OBJDIR)/depend.dep: undefine deps_rule
@echo "Creating dependency file, depend.dep"
@echo > comptime.h # windows makes it too hard !
-$(MKDIR) $(OBJDIR) ifndef WINDOWSHELL
$(CC) $(CFLAGS) -MM *.c > $(OBJDIR)/depend.ped ifdef echoName
$(CC) $(CFLAGS) -MM $(INTERFACE)/*.c >> $(OBJDIR)/depend.ped define deps_rule =
ifndef NOHW @printf "%-20.20s\r" $<
$(CC) $(CFLAGS) -MM hardware/*.c >> $(OBJDIR)/depend.ped
endef
endif endif
$(CC) $(CFLAGS) -MM blua/*.c >> $(OBJDIR)/depend.ped endif
@sed -e 's,\(.*\)\.o: ,$(subst /,\/,$(OBJDIR))\/&,g' < $(OBJDIR)/depend.ped > $(OBJDIR)/depend.dep
$(REMOVE) $(OBJDIR)/depend.ped define deps_rule +=
@echo "Created dependency file, depend.dep" $(CC) $(CFLAGS) -M -MF $@ -MT $(OBJDIR)/$< $<
endef
$(DEPDIR)/%.d: %.c
$(deps_rule)
$(DEPDIR)/%.d: $(INTERFACE)/%.c
$(deps_rule)
$(DEPDIR)/%.d: hardware/%.c
$(deps_rule)
$(DEPDIR)/%.d: blua/%.c
$(deps_rule)
ifdef VALGRIND ifdef VALGRIND
$(OBJDIR)/z_zone.o: z_zone.c $(OBJDIR)/z_zone.o: z_zone.c
@ -695,9 +729,12 @@ $(OBJDIR)/z_zone.o: z_zone.c
$(CC) $(CFLAGS) $(WFLAGS) -DHAVE_VALGRIND $(VALGRIND_CFLAGS) -c $< -o $@ $(CC) $(CFLAGS) $(WFLAGS) -DHAVE_VALGRIND $(VALGRIND_CFLAGS) -c $< -o $@
endif endif
$(OBJDIR)/comptime.o: comptime.c pre-build $(OBJDIR)/comptime.o::
$(echoName) ifdef echoName
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@ @echo -- comptime.c ...
endif
$(COMPTIME) .
$(CC) $(CFLAGS) $(WFLAGS) -c comptime.c -o $@
$(BIN)/%.mo: locale/%.po $(BIN)/%.mo: locale/%.po
-$(MKDIR) $(BIN) -$(MKDIR) $(BIN)

View File

@ -47,7 +47,8 @@ ifdef MACOSX
endif endif
# Automatically set version flag, but not if one was manually set # Automatically set version flag, but not if one was manually set
ifeq (,$(filter GCC%,$(.VARIABLES))) # And don't bother if this is a clean only run
ifeq (,$(filter GCC% CLEANONLY,$(.VARIABLES)))
version:=$(shell $(CC) --version) version:=$(shell $(CC) --version)
# check if this is in fact GCC # check if this is in fact GCC
ifneq (,$(or $(findstring gcc,$(version)),$(findstring GCC,$(version)))) ifneq (,$(or $(findstring gcc,$(version)),$(findstring GCC,$(version))))
@ -60,12 +61,14 @@ ifeq (,$(filter GCC%,$(.VARIABLES)))
# If this version is not in the list, default to the latest supported # If this version is not in the list, default to the latest supported
ifeq (,$(filter $(v),$(SUPPORTED_GCC_VERSIONS))) ifeq (,$(filter $(v),$(SUPPORTED_GCC_VERSIONS)))
$(info\ define line =
Your compiler version, GCC $(version), is not supported by the Makefile.\ Your compiler version, GCC $(version), is not supported by the Makefile.
The Makefile will assume GCC $(LATEST_GCC_VERSION).) The Makefile will assume GCC $(LATEST_GCC_VERSION).))
endef
$(call print,$(line))
GCC$(subst .,,$(LATEST_GCC_VERSION))=1 GCC$(subst .,,$(LATEST_GCC_VERSION))=1
else else
$(info Detected GCC $(version) (GCC$(v))) $(call print,Detected GCC $(version) (GCC$(v)))
GCC$(v)=1 GCC$(v)=1
endif endif
endif endif
@ -361,6 +364,7 @@ i_main_o=$(OBJDIR)/i_main.o
#set OBJDIR and BIN's starting place #set OBJDIR and BIN's starting place
OBJDIR=../objs OBJDIR=../objs
BIN=../bin BIN=../bin
DEPDIR=../dep
#Nasm ASM and rm #Nasm ASM and rm
ifdef YASM ifdef YASM
NASM?=yasm NASM?=yasm
@ -383,6 +387,7 @@ ifdef DUMMY
INTERFACE=dummy INTERFACE=dummy
OBJDIR:=$(OBJDIR)/dummy OBJDIR:=$(OBJDIR)/dummy
BIN:=$(BIN)/dummy BIN:=$(BIN)/dummy
DEPDIR:=$(DEPDIR)/dummy
else else
ifdef LINUX ifdef LINUX
NASMFORMAT=elf -DLINUX NASMFORMAT=elf -DLINUX
@ -390,9 +395,11 @@ ifdef LINUX
ifdef LINUX64 ifdef LINUX64
OBJDIR:=$(OBJDIR)/Linux64 OBJDIR:=$(OBJDIR)/Linux64
BIN:=$(BIN)/Linux64 BIN:=$(BIN)/Linux64
DEPDIR:=$(DEPDIR)/Linux64
else else
OBJDIR:=$(OBJDIR)/Linux OBJDIR:=$(OBJDIR)/Linux
BIN:=$(BIN)/Linux BIN:=$(BIN)/Linux
DEPDIR:=$(DEPDIR)/Linux
endif endif
else else
ifdef FREEBSD ifdef FREEBSD
@ -402,6 +409,7 @@ ifdef FREEBSD
OBJDIR:=$(OBJDIR)/FreeBSD OBJDIR:=$(OBJDIR)/FreeBSD
BIN:=$(BIN)/FreeBSD BIN:=$(BIN)/FreeBSD
DEPDIR:=$(DEPDIR)/Linux
else else
ifdef SOLARIS ifdef SOLARIS
INTERFACE=sdl INTERFACE=sdl
@ -410,6 +418,7 @@ ifdef SOLARIS
OBJDIR:=$(OBJDIR)/Solaris OBJDIR:=$(OBJDIR)/Solaris
BIN:=$(BIN)/Solaris BIN:=$(BIN)/Solaris
DEPDIR:=$(DEPDIR)/Solaris
else else
ifdef CYGWIN32 ifdef CYGWIN32
INTERFACE=sdl INTERFACE=sdl
@ -418,18 +427,21 @@ ifdef CYGWIN32
OBJDIR:=$(OBJDIR)/cygwin OBJDIR:=$(OBJDIR)/cygwin
BIN:=$(BIN)/Cygwin BIN:=$(BIN)/Cygwin
DEPDIR:=$(DEPDIR)/Cygwin
else else
ifdef MINGW64 ifdef MINGW64
#NASMFORMAT=win64 #NASMFORMAT=win64
SDL=1 SDL=1
OBJDIR:=$(OBJDIR)/Mingw64 OBJDIR:=$(OBJDIR)/Mingw64
BIN:=$(BIN)/Mingw64 BIN:=$(BIN)/Mingw64
DEPDIR:=$(DEPDIR)/Mingw64
else else
ifdef MINGW ifdef MINGW
NASMFORMAT=win32 NASMFORMAT=win32
SDL=1 SDL=1
OBJDIR:=$(OBJDIR)/Mingw OBJDIR:=$(OBJDIR)/Mingw
BIN:=$(BIN)/Mingw BIN:=$(BIN)/Mingw
DEPDIR:=$(DEPDIR)/Mingw
endif endif
endif endif
endif endif
@ -441,6 +453,7 @@ endif
ifdef ARCHNAME ifdef ARCHNAME
OBJDIR:=$(OBJDIR)/$(ARCHNAME) OBJDIR:=$(OBJDIR)/$(ARCHNAME)
BIN:=$(BIN)/$(ARCHNAME) BIN:=$(BIN)/$(ARCHNAME)
DEPDIR:=$(DEPDIR)/$(ARCHNAME)
endif endif
OBJDUMP_OPTS?=--wide --source --line-numbers OBJDUMP_OPTS?=--wide --source --line-numbers
@ -449,14 +462,17 @@ LD=$(CC)
ifdef SDL ifdef SDL
INTERFACE=sdl INTERFACE=sdl
OBJDIR:=$(OBJDIR)/SDL OBJDIR:=$(OBJDIR)/SDL
DEPDIR:=$(DEPDIR)/SDL
endif endif
ifndef DUMMY ifndef DUMMY
ifdef DEBUGMODE ifdef DEBUGMODE
OBJDIR:=$(OBJDIR)/Debug OBJDIR:=$(OBJDIR)/Debug
BIN:=$(BIN)/Debug BIN:=$(BIN)/Debug
DEPDIR:=$(DEPDIR)/Debug
else else
OBJDIR:=$(OBJDIR)/Release OBJDIR:=$(OBJDIR)/Release
BIN:=$(BIN)/Release BIN:=$(BIN)/Release
DEPDIR:=$(DEPDIR)/Release
endif endif
endif endif