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";
width = 96;
height = 192;
}
609
{
title = "Circle of Rings and Spheres (Big)";

View File

@ -2,7 +2,7 @@
# GNU Make makefile for SRB2
#############################################################################
# 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
# terms of the GNU General Public License, version 2.
@ -24,7 +24,9 @@
# clean
# Remove all object files
# cleandep
# Remove depend.dep
# Remove dependency files
# distclean
# Remove autogenerated files
# dll
# compile primary HW render DLL/SO
# 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=\
PANDORA\
LINUX64\
@ -98,7 +111,7 @@ ALL_SYSTEMS=\
ifeq (,$(filter $(ALL_SYSTEMS),$(.VARIABLES)))
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
MINGW=1
@ -123,7 +136,7 @@ else # if you on the *nix
new_system:=$(new_system)64
endif
$(info Detected $(system) ($(new_system))...)
$(call print,Detected $(system) ($(new_system))...)
$(new_system)=1
endif
@ -237,6 +250,12 @@ endif
MSGFMT?=msgfmt
ifdef WINDOWSHELL
COMPTIME=-..\comptime.bat
else
COMPTIME=-../comptime.sh
endif
ifndef ECHO
NASM:=@$(NASM)
REMOVE:=@$(REMOVE)
@ -251,6 +270,7 @@ ifndef ECHO
MSGFMT:=@$(MSGFMT)
UPX:=@$(UPX)
UPX_OPTS+=-q
COMPTIME:=@$(COMPTIME)
endif
ifdef NONET
@ -455,7 +475,6 @@ DBGNAME?=$(EXENAME).debug
# not too sophisticated dependency
OBJS:=$(i_main_o) \
$(OBJDIR)/comptime.o \
$(OBJDIR)/string.o \
$(OBJDIR)/d_main.o \
$(OBJDIR)/d_clisrv.o \
@ -542,7 +561,10 @@ OBJS:=$(i_main_o) \
$(i_sound_o) \
$(OBJS)
DEPS:=$(patsubst $(OBJDIR)/%.o,$(DEPDIR)/%.d,$(filter %.o,$(OBJS)))
OBJS+=$(OBJDIR)/comptime.o
ifndef SILENT
ifndef ECHO
ifndef NOECHOFILENAMES
define echoName =
@ -550,6 +572,7 @@ define echoName =
endef
endif
endif
endif
# List of languages to compile.
# 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
ifdef PANDORA
all: pre-build $(BIN)/$(PNDNAME)
all: $(BIN)/$(PNDNAME)
endif
ifdef SDL
all: pre-build $(BIN)/$(EXENAME)
all: $(BIN)/$(EXENAME)
endif
ifdef DUMMY
@ -575,20 +598,15 @@ all: $(BIN)/$(EXENAME)
endif
cleandep:
$(REMOVE) $(OBJDIR)/depend.dep
$(REMOVE) $(DEPS)
$(REMOVE) comptime.h
pre-build:
ifdef WINDOWSHELL
-..\comptime.bat .
else
-@../comptime.sh .
endif
clean:
$(REMOVE) *~ *.flc
$(REMOVE) $(OBJDIR)/*.o
distclean: clean cleandep
ifdef MINGW
$(REMOVE) $(OBJDIR)/*.res
endif
@ -608,11 +626,11 @@ asm:
$(BIN)/$(EXENAME): $(POS) $(OBJS)
-$(MKDIR) $(BIN)
@echo Linking $(EXENAME)...
$(call echo,Linking $(EXENAME)...)
$(LD) $(LDFLAGS) $(OBJS) -o $(BIN)/$(EXENAME) $(LIBS)
ifndef VALGRIND
ifndef NOOBJDUMP
@echo Dumping debugging info
$(call echo,Dumping debugging info)
$(OBJDUMP) $(OBJDUMP_OPTS) $(BIN)/$(EXENAME) > $(BIN)/$(DBGNAME).txt
ifdef WINDOWSHELL
-$(GZIP) $(GZIP_OPTS) $(BIN)/$(DBGNAME).txt
@ -631,10 +649,10 @@ ifndef NOUPX
-$(UPX) $(UPX_OPTS) $(BIN)/$(EXENAME)
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:
@echo Redumping debugging info
$(call echo,Redumping debugging info)
$(OBJDUMP) $(OBJDUMP_OPTS) $(BIN)/$(DBGNAME) > $(BIN)/$(DBGNAME).txt
ifdef WINDOWSHELL
-$(GZIP) $(GZIP_OPTS) $(BIN)/$(DBGNAME).txt
@ -670,24 +688,40 @@ endif
endif
#dependecy made by gcc itself !
$(OBJS):
ifndef DUMMY
-include $(OBJDIR)/depend.dep
ifndef CLEANONLY
$(call print,Checking dependency files...)
-include $(DEPS)
endif
endif
$(OBJDIR)/depend.dep:
@echo "Creating dependency file, depend.dep"
@echo > comptime.h
-$(MKDIR) $(OBJDIR)
$(CC) $(CFLAGS) -MM *.c > $(OBJDIR)/depend.ped
$(CC) $(CFLAGS) -MM $(INTERFACE)/*.c >> $(OBJDIR)/depend.ped
ifndef NOHW
$(CC) $(CFLAGS) -MM hardware/*.c >> $(OBJDIR)/depend.ped
undefine deps_rule
# windows makes it too hard !
ifndef WINDOWSHELL
ifdef echoName
define deps_rule =
@printf "%-20.20s\r" $<
endef
endif
$(CC) $(CFLAGS) -MM blua/*.c >> $(OBJDIR)/depend.ped
@sed -e 's,\(.*\)\.o: ,$(subst /,\/,$(OBJDIR))\/&,g' < $(OBJDIR)/depend.ped > $(OBJDIR)/depend.dep
$(REMOVE) $(OBJDIR)/depend.ped
@echo "Created dependency file, depend.dep"
endif
define deps_rule +=
$(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
$(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 $@
endif
$(OBJDIR)/comptime.o: comptime.c pre-build
$(echoName)
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
$(OBJDIR)/comptime.o::
ifdef echoName
@echo -- comptime.c ...
endif
$(COMPTIME) .
$(CC) $(CFLAGS) $(WFLAGS) -c comptime.c -o $@
$(BIN)/%.mo: locale/%.po
-$(MKDIR) $(BIN)

View File

@ -47,7 +47,8 @@ ifdef MACOSX
endif
# 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)
# check if this is in fact GCC
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
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).)
define line =
Your compiler version, GCC $(version), is not supported by the Makefile.
The Makefile will assume GCC $(LATEST_GCC_VERSION).))
endef
$(call print,$(line))
GCC$(subst .,,$(LATEST_GCC_VERSION))=1
else
$(info Detected GCC $(version) (GCC$(v)))
$(call print,Detected GCC $(version) (GCC$(v)))
GCC$(v)=1
endif
endif
@ -361,6 +364,7 @@ i_main_o=$(OBJDIR)/i_main.o
#set OBJDIR and BIN's starting place
OBJDIR=../objs
BIN=../bin
DEPDIR=../dep
#Nasm ASM and rm
ifdef YASM
NASM?=yasm
@ -383,6 +387,7 @@ ifdef DUMMY
INTERFACE=dummy
OBJDIR:=$(OBJDIR)/dummy
BIN:=$(BIN)/dummy
DEPDIR:=$(DEPDIR)/dummy
else
ifdef LINUX
NASMFORMAT=elf -DLINUX
@ -390,9 +395,11 @@ ifdef LINUX
ifdef LINUX64
OBJDIR:=$(OBJDIR)/Linux64
BIN:=$(BIN)/Linux64
DEPDIR:=$(DEPDIR)/Linux64
else
OBJDIR:=$(OBJDIR)/Linux
BIN:=$(BIN)/Linux
DEPDIR:=$(DEPDIR)/Linux
endif
else
ifdef FREEBSD
@ -402,6 +409,7 @@ ifdef FREEBSD
OBJDIR:=$(OBJDIR)/FreeBSD
BIN:=$(BIN)/FreeBSD
DEPDIR:=$(DEPDIR)/Linux
else
ifdef SOLARIS
INTERFACE=sdl
@ -410,6 +418,7 @@ ifdef SOLARIS
OBJDIR:=$(OBJDIR)/Solaris
BIN:=$(BIN)/Solaris
DEPDIR:=$(DEPDIR)/Solaris
else
ifdef CYGWIN32
INTERFACE=sdl
@ -418,18 +427,21 @@ ifdef CYGWIN32
OBJDIR:=$(OBJDIR)/cygwin
BIN:=$(BIN)/Cygwin
DEPDIR:=$(DEPDIR)/Cygwin
else
ifdef MINGW64
#NASMFORMAT=win64
SDL=1
OBJDIR:=$(OBJDIR)/Mingw64
BIN:=$(BIN)/Mingw64
DEPDIR:=$(DEPDIR)/Mingw64
else
ifdef MINGW
NASMFORMAT=win32
SDL=1
OBJDIR:=$(OBJDIR)/Mingw
BIN:=$(BIN)/Mingw
DEPDIR:=$(DEPDIR)/Mingw
endif
endif
endif
@ -441,6 +453,7 @@ endif
ifdef ARCHNAME
OBJDIR:=$(OBJDIR)/$(ARCHNAME)
BIN:=$(BIN)/$(ARCHNAME)
DEPDIR:=$(DEPDIR)/$(ARCHNAME)
endif
OBJDUMP_OPTS?=--wide --source --line-numbers
@ -449,14 +462,17 @@ LD=$(CC)
ifdef SDL
INTERFACE=sdl
OBJDIR:=$(OBJDIR)/SDL
DEPDIR:=$(DEPDIR)/SDL
endif
ifndef DUMMY
ifdef DEBUGMODE
OBJDIR:=$(OBJDIR)/Debug
BIN:=$(BIN)/Debug
DEPDIR:=$(DEPDIR)/Debug
else
OBJDIR:=$(OBJDIR)/Release
BIN:=$(BIN)/Release
DEPDIR:=$(DEPDIR)/Release
endif
endif