mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-14 08:50:53 +00:00
Update src/Makefile.d/*.mk
both Makefile and *.mk should be in the same EOL
This commit is contained in:
parent
fc586b5c62
commit
8f00667abe
4 changed files with 182 additions and 180 deletions
4
.gitattributes
vendored
4
.gitattributes
vendored
|
@ -1,15 +1,17 @@
|
|||
#Source code
|
||||
/Makefile text=auto
|
||||
/src/*.c text=auto
|
||||
/src/*.h text=auto
|
||||
/src/*.s text=auto
|
||||
/src/*.m text=auto
|
||||
/src/*.xpm text=auto
|
||||
/src/Makefile text=auto
|
||||
/tools/Makefile text=auto
|
||||
/src/Make*.cfg text=auto
|
||||
/src/CMakeLists.txt text=auto
|
||||
*.mk -whitespace text=auto
|
||||
# Windows EOL
|
||||
*.cs -crlf -whitespace
|
||||
*.mk -crlf -whitespace
|
||||
*.bat -crlf -whitespace
|
||||
*.dev -crlf -whitespace
|
||||
*.dsp -crlf -whitespace
|
||||
|
|
|
@ -33,7 +33,7 @@ default:
|
|||
image: debian:stable-slim
|
||||
|
||||
.job_template: &job_build # This job runs in the build stage, which runs first.
|
||||
stage: build
|
||||
stage: build
|
||||
variables:
|
||||
CCACHE_MAXSIZE: "50M"
|
||||
GIT_STRATEGY: clone
|
||||
|
@ -154,4 +154,4 @@ build-x86_64-w64-mingw32:
|
|||
- *aptcache
|
||||
- apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-x86-64-win32
|
||||
- *ccache
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32
|
||||
|
|
|
@ -1,109 +1,109 @@
|
|||
#
|
||||
# Detect the host system and compiler version.
|
||||
#
|
||||
|
||||
# Previously featured:\
|
||||
PANDORA\
|
||||
HAIKU\
|
||||
DUMMY\
|
||||
DJGPPDOS\
|
||||
SOLARIS\
|
||||
MACOSX\
|
||||
|
||||
all_systems:=\
|
||||
LINUX64\
|
||||
MINGW64\
|
||||
MINGW\
|
||||
UNIX\
|
||||
LINUX\
|
||||
FREEBSD\
|
||||
|
||||
# check for user specified system
|
||||
ifeq (,$(filter $(all_systems),$(.VARIABLES)))
|
||||
ifeq ($(OS),Windows_NT) # all windows are Windows_NT...
|
||||
|
||||
_m=Detected a Windows system,\
|
||||
compiling for 32-bit MinGW SDL...)
|
||||
$(call Print,$(_m))
|
||||
|
||||
# go for a 32-bit sdl mingw exe by default
|
||||
MINGW:=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
|
||||
|
||||
$(call Print,Detected $(system) ($(new_system))...)
|
||||
$(new_system):=1
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
# This must have high to low order.
|
||||
gcc_versions:=\
|
||||
132 131\
|
||||
123 122 121\
|
||||
114 113 112 111\
|
||||
105 104 103 102 101\
|
||||
95 94 93 92 91\
|
||||
85 84 83 82 81\
|
||||
75 74 73 72 71\
|
||||
64 63 62 61\
|
||||
55 54 53 52 51\
|
||||
49 48 47 46 45 44 43 42 41 40
|
||||
|
||||
latest_gcc_version:=13.2
|
||||
|
||||
# Automatically set version flag, but not if one was
|
||||
# manually set. And don't bother if this is a clean only
|
||||
# run.
|
||||
ifeq (,$(call Wildvar,GCC% destructive))
|
||||
|
||||
# can't use $(CC) --version here since that uses argv[0] to display the name
|
||||
# also gcc outputs the information to stderr, so I had to do 2>&1
|
||||
# this program really doesn't like identifying itself
|
||||
version:=$(shell $(CC) -v 2>&1)
|
||||
|
||||
# check if this is in fact GCC
|
||||
ifneq (,$(findstring gcc version,$(version)))
|
||||
|
||||
# in stark contrast to the name, gcc will give me a nicely formatted version number for free
|
||||
version:=$(shell $(CC) -dumpfullversion)
|
||||
|
||||
# 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),$(gcc_versions)))
|
||||
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
|
||||
$(call Print,Detected GCC $(version) (GCC$(v)))
|
||||
GCC$(v):=1
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
#
|
||||
# Detect the host system and compiler version.
|
||||
#
|
||||
|
||||
# Previously featured:\
|
||||
PANDORA\
|
||||
HAIKU\
|
||||
DUMMY\
|
||||
DJGPPDOS\
|
||||
SOLARIS\
|
||||
MACOSX\
|
||||
|
||||
all_systems:=\
|
||||
LINUX64\
|
||||
MINGW64\
|
||||
MINGW\
|
||||
UNIX\
|
||||
LINUX\
|
||||
FREEBSD\
|
||||
|
||||
# check for user specified system
|
||||
ifeq (,$(filter $(all_systems),$(.VARIABLES)))
|
||||
ifeq ($(OS),Windows_NT) # all windows are Windows_NT...
|
||||
|
||||
_m=Detected a Windows system,\
|
||||
compiling for 32-bit MinGW SDL...)
|
||||
$(call Print,$(_m))
|
||||
|
||||
# go for a 32-bit sdl mingw exe by default
|
||||
MINGW:=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
|
||||
|
||||
$(call Print,Detected $(system) ($(new_system))...)
|
||||
$(new_system):=1
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
# This must have high to low order.
|
||||
gcc_versions:=\
|
||||
132 131\
|
||||
123 122 121\
|
||||
114 113 112 111\
|
||||
105 104 103 102 101\
|
||||
95 94 93 92 91\
|
||||
85 84 83 82 81\
|
||||
75 74 73 72 71\
|
||||
64 63 62 61\
|
||||
55 54 53 52 51\
|
||||
49 48 47 46 45 44 43 42 41 40
|
||||
|
||||
latest_gcc_version:=13.2
|
||||
|
||||
# Automatically set version flag, but not if one was
|
||||
# manually set. And don't bother if this is a clean only
|
||||
# run.
|
||||
ifeq (,$(call Wildvar,GCC% destructive))
|
||||
|
||||
# can't use $(CC) --version here since that uses argv[0] to display the name
|
||||
# also gcc outputs the information to stderr, so I had to do 2>&1
|
||||
# this program really doesn't like identifying itself
|
||||
version:=$(shell $(CC) -v 2>&1)
|
||||
|
||||
# check if this is in fact GCC
|
||||
ifneq (,$(findstring gcc version,$(version)))
|
||||
|
||||
# in stark contrast to the name, gcc will give me a nicely formatted version number for free
|
||||
version:=$(shell $(CC) -dumpfullversion)
|
||||
|
||||
# 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),$(gcc_versions)))
|
||||
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
|
||||
$(call Print,Detected GCC $(version) (GCC$(v)))
|
||||
GCC$(v):=1
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -1,68 +1,68 @@
|
|||
#
|
||||
# Makefile for feature flags.
|
||||
#
|
||||
|
||||
passthru_opts+=\
|
||||
NONET NO_IPV6 NOHW NOMD5 NOPOSTPROCESSING\
|
||||
MOBJCONSISTANCY PACKETDROP ZDEBUG\
|
||||
HAVE_MINIUPNPC\
|
||||
|
||||
# build with debugging information
|
||||
ifdef DEBUGMODE
|
||||
PACKETDROP=1
|
||||
opts+=-DPARANOIA -DRANGECHECK
|
||||
endif
|
||||
|
||||
ifndef NOHW
|
||||
opts+=-DHWRENDER
|
||||
sources+=$(call List,hardware/Sourcefile)
|
||||
endif
|
||||
|
||||
ifndef NOMD5
|
||||
sources+=md5.c
|
||||
endif
|
||||
|
||||
ifndef NOZLIB
|
||||
ifndef NOPNG
|
||||
ifdef PNG_PKGCONFIG
|
||||
$(eval $(call Use_pkg_config,PNG_PKGCONFIG))
|
||||
else
|
||||
PNG_CONFIG?=$(call Prefix,libpng-config)
|
||||
$(eval $(call Configure,PNG,$(PNG_CONFIG) \
|
||||
$(if $(PNG_STATIC),--static),,--ldflags))
|
||||
endif
|
||||
ifdef LINUX
|
||||
opts+=-D_LARGEFILE64_SOURCE
|
||||
endif
|
||||
opts+=-DHAVE_PNG
|
||||
sources+=apng.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef NONET
|
||||
ifndef NOCURL
|
||||
CURLCONFIG?=curl-config
|
||||
$(eval $(call Configure,CURL,$(CURLCONFIG)))
|
||||
opts+=-DHAVE_CURL
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef HAVE_MINIUPNPC
|
||||
libs+=-lminiupnpc
|
||||
endif
|
||||
|
||||
# (Valgrind is a memory debugger.)
|
||||
ifdef VALGRIND
|
||||
VALGRIND_PKGCONFIG?=valgrind
|
||||
$(eval $(call Use_pkg_config,VALGRIND))
|
||||
ZDEBUG=1
|
||||
opts+=-DHAVE_VALGRIND
|
||||
endif
|
||||
|
||||
default_packages:=\
|
||||
GME/libgme/LIBGME\
|
||||
OPENMPT/libopenmpt/LIBOPENMPT\
|
||||
ZLIB/zlib\
|
||||
|
||||
$(foreach p,$(default_packages),\
|
||||
$(eval $(call Check_pkg_config,$(p))))
|
||||
#
|
||||
# Makefile for feature flags.
|
||||
#
|
||||
|
||||
passthru_opts+=\
|
||||
NONET NO_IPV6 NOHW NOMD5 NOPOSTPROCESSING\
|
||||
MOBJCONSISTANCY PACKETDROP ZDEBUG\
|
||||
HAVE_MINIUPNPC\
|
||||
|
||||
# build with debugging information
|
||||
ifdef DEBUGMODE
|
||||
PACKETDROP=1
|
||||
opts+=-DPARANOIA -DRANGECHECK
|
||||
endif
|
||||
|
||||
ifndef NOHW
|
||||
opts+=-DHWRENDER
|
||||
sources+=$(call List,hardware/Sourcefile)
|
||||
endif
|
||||
|
||||
ifndef NOMD5
|
||||
sources+=md5.c
|
||||
endif
|
||||
|
||||
ifndef NOZLIB
|
||||
ifndef NOPNG
|
||||
ifdef PNG_PKGCONFIG
|
||||
$(eval $(call Use_pkg_config,PNG_PKGCONFIG))
|
||||
else
|
||||
PNG_CONFIG?=$(call Prefix,libpng-config)
|
||||
$(eval $(call Configure,PNG,$(PNG_CONFIG) \
|
||||
$(if $(PNG_STATIC),--static),,--ldflags))
|
||||
endif
|
||||
ifdef LINUX
|
||||
opts+=-D_LARGEFILE64_SOURCE
|
||||
endif
|
||||
opts+=-DHAVE_PNG
|
||||
sources+=apng.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef NONET
|
||||
ifndef NOCURL
|
||||
CURLCONFIG?=curl-config
|
||||
$(eval $(call Configure,CURL,$(CURLCONFIG)))
|
||||
opts+=-DHAVE_CURL
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef HAVE_MINIUPNPC
|
||||
libs+=-lminiupnpc
|
||||
endif
|
||||
|
||||
# (Valgrind is a memory debugger.)
|
||||
ifdef VALGRIND
|
||||
VALGRIND_PKGCONFIG?=valgrind
|
||||
$(eval $(call Use_pkg_config,VALGRIND))
|
||||
ZDEBUG=1
|
||||
opts+=-DHAVE_VALGRIND
|
||||
endif
|
||||
|
||||
default_packages:=\
|
||||
GME/libgme/LIBGME\
|
||||
OPENMPT/libopenmpt/LIBOPENMPT\
|
||||
ZLIB/zlib\
|
||||
|
||||
$(foreach p,$(default_packages),\
|
||||
$(eval $(call Check_pkg_config,$(p))))
|
||||
|
|
Loading…
Reference in a new issue