Merge remote-tracking branch 'origin/master' into next
This commit is contained in:
commit
37c647c00e
55
src/Makefile
55
src/Makefile
|
@ -56,7 +56,8 @@
|
||||||
# Compile with GCC 4.6x version, add 'GCC46=1'
|
# Compile with GCC 4.6x version, add 'GCC46=1'
|
||||||
# Compile a profile version, add 'PROFILEMODE=1'
|
# Compile a profile version, add 'PROFILEMODE=1'
|
||||||
# Compile a debug version, add 'DEBUGMODE=1'
|
# Compile a debug version, add 'DEBUGMODE=1'
|
||||||
# Compile with extra warnings, add 'WARNINGMODE=1'
|
# Compile with less warnings, add 'RELAXWARNINGS=1'
|
||||||
|
# Generate compiler errors for most compiler warnings, add 'ERRORMODE=1'
|
||||||
# Compile without NASM's tmap.nas, add 'NOASM=1'
|
# Compile without NASM's tmap.nas, add 'NOASM=1'
|
||||||
# Compile without 3D hardware support, add 'NOHW=1'
|
# Compile without 3D hardware support, add 'NOHW=1'
|
||||||
# Compile without 3D sound support, add 'NOHS=1'
|
# Compile without 3D sound support, add 'NOHS=1'
|
||||||
|
@ -80,6 +81,58 @@
|
||||||
#
|
#
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
|
ALL_SYSTEMS=\
|
||||||
|
PANDORA\
|
||||||
|
LINUX64\
|
||||||
|
MINGW64\
|
||||||
|
HAIKU\
|
||||||
|
DUMMY\
|
||||||
|
DJGPPDOS\
|
||||||
|
MINGW\
|
||||||
|
UNIX\
|
||||||
|
LINUX\
|
||||||
|
SOLARIS\
|
||||||
|
FREEBSD\
|
||||||
|
MACOSX\
|
||||||
|
SDL\
|
||||||
|
|
||||||
|
# check for user specified system
|
||||||
|
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...)
|
||||||
|
|
||||||
|
# go for a 32-bit sdl mingw exe by default
|
||||||
|
MINGW=1
|
||||||
|
SDL=1
|
||||||
|
WINDOWSHELL=1
|
||||||
|
|
||||||
|
else # if you on the *nix
|
||||||
|
|
||||||
|
system:=$(shell uname -s)
|
||||||
|
|
||||||
|
ifeq ($(system),Linux)
|
||||||
|
new_system=LINUX
|
||||||
|
else
|
||||||
|
|
||||||
|
$(error \
|
||||||
|
Could not automatically detect your system,\
|
||||||
|
try specifying a system manually)
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(shell getconf LONG_BIT),64)
|
||||||
|
system+=64-bit
|
||||||
|
new_system:=$(new_system)64
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(info Detected $(system) ($(new_system))...)
|
||||||
|
$(new_system)=1
|
||||||
|
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
# SRB2 data files
|
# SRB2 data files
|
||||||
D_DIR?=../bin/Resources
|
D_DIR?=../bin/Resources
|
||||||
D_FILES=$(D_DIR)/srb2.pk3 \
|
D_FILES=$(D_DIR)/srb2.pk3 \
|
||||||
|
|
|
@ -48,7 +48,9 @@ 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)))
|
ifeq (,$(filter GCC%,$(.VARIABLES)))
|
||||||
ifneq (,$(findstring gcc,$(shell $(CC) --version))) # if it's GCC
|
version:=$(shell $(CC) --version)
|
||||||
|
# check if this is in fact GCC
|
||||||
|
ifneq (,$(or $(findstring gcc,$(version)),$(findstring GCC,$(version))))
|
||||||
version:=$(shell $(CC) -dumpversion)
|
version:=$(shell $(CC) -dumpversion)
|
||||||
|
|
||||||
# Turn version into words of major, minor
|
# Turn version into words of major, minor
|
||||||
|
@ -208,10 +210,7 @@ WFLAGS=-Wall
|
||||||
ifndef GCC295
|
ifndef GCC295
|
||||||
#WFLAGS+=-Wno-packed
|
#WFLAGS+=-Wno-packed
|
||||||
endif
|
endif
|
||||||
ifdef ERRORMODE
|
ifndef RELAXWARNINGS
|
||||||
WARNINGMODE=1
|
|
||||||
endif
|
|
||||||
ifdef WARNINGMODE
|
|
||||||
WFLAGS+=-W
|
WFLAGS+=-W
|
||||||
#WFLAGS+=-Wno-sign-compare
|
#WFLAGS+=-Wno-sign-compare
|
||||||
ifndef GCC295
|
ifndef GCC295
|
||||||
|
|
Loading…
Reference in a new issue