Update src/Makefile.d/*.mk

both Makefile and *.mk should be in the same EOL
This commit is contained in:
Alam Ed Arias 2023-10-13 20:10:34 -04:00
parent fc586b5c62
commit 8f00667abe
4 changed files with 182 additions and 180 deletions

4
.gitattributes vendored
View file

@ -1,15 +1,17 @@
#Source code #Source code
/Makefile text=auto
/src/*.c text=auto /src/*.c text=auto
/src/*.h text=auto /src/*.h text=auto
/src/*.s text=auto /src/*.s text=auto
/src/*.m text=auto /src/*.m text=auto
/src/*.xpm text=auto /src/*.xpm text=auto
/src/Makefile text=auto /src/Makefile text=auto
/tools/Makefile text=auto
/src/Make*.cfg text=auto /src/Make*.cfg text=auto
/src/CMakeLists.txt text=auto /src/CMakeLists.txt text=auto
*.mk -whitespace text=auto
# Windows EOL # Windows EOL
*.cs -crlf -whitespace *.cs -crlf -whitespace
*.mk -crlf -whitespace
*.bat -crlf -whitespace *.bat -crlf -whitespace
*.dev -crlf -whitespace *.dev -crlf -whitespace
*.dsp -crlf -whitespace *.dsp -crlf -whitespace

View file

@ -33,7 +33,7 @@ default:
image: debian:stable-slim image: debian:stable-slim
.job_template: &job_build # This job runs in the build stage, which runs first. .job_template: &job_build # This job runs in the build stage, which runs first.
stage: build stage: build
variables: variables:
CCACHE_MAXSIZE: "50M" CCACHE_MAXSIZE: "50M"
GIT_STRATEGY: clone GIT_STRATEGY: clone
@ -154,4 +154,4 @@ build-x86_64-w64-mingw32:
- *aptcache - *aptcache
- apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-x86-64-win32 - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-x86-64-win32
- *ccache - *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

View file

@ -1,109 +1,109 @@
# #
# Detect the host system and compiler version. # Detect the host system and compiler version.
# #
# Previously featured:\ # Previously featured:\
PANDORA\ PANDORA\
HAIKU\ HAIKU\
DUMMY\ DUMMY\
DJGPPDOS\ DJGPPDOS\
SOLARIS\ SOLARIS\
MACOSX\ MACOSX\
all_systems:=\ all_systems:=\
LINUX64\ LINUX64\
MINGW64\ MINGW64\
MINGW\ MINGW\
UNIX\ UNIX\
LINUX\ LINUX\
FREEBSD\ FREEBSD\
# check for user specified system # check for user specified system
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...
_m=Detected a Windows system,\ _m=Detected a Windows system,\
compiling for 32-bit MinGW SDL...) compiling for 32-bit MinGW SDL...)
$(call Print,$(_m)) $(call Print,$(_m))
# go for a 32-bit sdl mingw exe by default # go for a 32-bit sdl mingw exe by default
MINGW:=1 MINGW:=1
else # if you on the *nix else # if you on the *nix
system:=$(shell uname -s) system:=$(shell uname -s)
ifeq ($(system),Linux) ifeq ($(system),Linux)
new_system:=LINUX new_system:=LINUX
else else
$(error \ $(error \
Could not automatically detect your system,\ Could not automatically detect your system,\
try specifying a system manually) try specifying a system manually)
endif endif
ifeq ($(shell getconf LONG_BIT),64) ifeq ($(shell getconf LONG_BIT),64)
system+=64-bit system+=64-bit
new_system:=$(new_system)64 new_system:=$(new_system)64
endif endif
$(call Print,Detected $(system) ($(new_system))...) $(call Print,Detected $(system) ($(new_system))...)
$(new_system):=1 $(new_system):=1
endif endif
endif endif
# This must have high to low order. # This must have high to low order.
gcc_versions:=\ gcc_versions:=\
132 131\ 132 131\
123 122 121\ 123 122 121\
114 113 112 111\ 114 113 112 111\
105 104 103 102 101\ 105 104 103 102 101\
95 94 93 92 91\ 95 94 93 92 91\
85 84 83 82 81\ 85 84 83 82 81\
75 74 73 72 71\ 75 74 73 72 71\
64 63 62 61\ 64 63 62 61\
55 54 53 52 51\ 55 54 53 52 51\
49 48 47 46 45 44 43 42 41 40 49 48 47 46 45 44 43 42 41 40
latest_gcc_version:=13.2 latest_gcc_version:=13.2
# Automatically set version flag, but not if one was # Automatically set version flag, but not if one was
# manually set. And don't bother if this is a clean only # manually set. And don't bother if this is a clean only
# run. # run.
ifeq (,$(call Wildvar,GCC% destructive)) ifeq (,$(call Wildvar,GCC% destructive))
# can't use $(CC) --version here since that uses argv[0] to display the name # 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 # also gcc outputs the information to stderr, so I had to do 2>&1
# this program really doesn't like identifying itself # this program really doesn't like identifying itself
version:=$(shell $(CC) -v 2>&1) version:=$(shell $(CC) -v 2>&1)
# check if this is in fact GCC # check if this is in fact GCC
ifneq (,$(findstring gcc version,$(version))) ifneq (,$(findstring gcc version,$(version)))
# in stark contrast to the name, gcc will give me a nicely formatted version number for free # in stark contrast to the name, gcc will give me a nicely formatted version number for free
version:=$(shell $(CC) -dumpfullversion) version:=$(shell $(CC) -dumpfullversion)
# Turn version into words of major, minor # Turn version into words of major, minor
v:=$(subst ., ,$(version)) v:=$(subst ., ,$(version))
# concat. major minor # concat. major minor
v:=$(word 1,$(v))$(word 2,$(v)) v:=$(word 1,$(v))$(word 2,$(v))
# If this version is not in the list, # If this version is not in the list,
# default to the latest supported # default to the latest supported
ifeq (,$(filter $(v),$(gcc_versions))) ifeq (,$(filter $(v),$(gcc_versions)))
define line = define line =
Your compiler version, GCC $(version), \ Your compiler version, GCC $(version), \
is not supported by the Makefile. is not supported by the Makefile.
The Makefile will assume GCC $(latest_gcc_version). The Makefile will assume GCC $(latest_gcc_version).
endef endef
$(call Print,$(line)) $(call Print,$(line))
GCC$(subst .,,$(latest_gcc_version)):=1 GCC$(subst .,,$(latest_gcc_version)):=1
else else
$(call Print,Detected GCC $(version) (GCC$(v))) $(call Print,Detected GCC $(version) (GCC$(v)))
GCC$(v):=1 GCC$(v):=1
endif endif
endif endif
endif endif

View file

@ -1,68 +1,68 @@
# #
# Makefile for feature flags. # Makefile for feature flags.
# #
passthru_opts+=\ passthru_opts+=\
NONET NO_IPV6 NOHW NOMD5 NOPOSTPROCESSING\ NONET NO_IPV6 NOHW NOMD5 NOPOSTPROCESSING\
MOBJCONSISTANCY PACKETDROP ZDEBUG\ MOBJCONSISTANCY PACKETDROP ZDEBUG\
HAVE_MINIUPNPC\ HAVE_MINIUPNPC\
# build with debugging information # build with debugging information
ifdef DEBUGMODE ifdef DEBUGMODE
PACKETDROP=1 PACKETDROP=1
opts+=-DPARANOIA -DRANGECHECK opts+=-DPARANOIA -DRANGECHECK
endif endif
ifndef NOHW ifndef NOHW
opts+=-DHWRENDER opts+=-DHWRENDER
sources+=$(call List,hardware/Sourcefile) sources+=$(call List,hardware/Sourcefile)
endif endif
ifndef NOMD5 ifndef NOMD5
sources+=md5.c sources+=md5.c
endif endif
ifndef NOZLIB ifndef NOZLIB
ifndef NOPNG ifndef NOPNG
ifdef PNG_PKGCONFIG ifdef PNG_PKGCONFIG
$(eval $(call Use_pkg_config,PNG_PKGCONFIG)) $(eval $(call Use_pkg_config,PNG_PKGCONFIG))
else else
PNG_CONFIG?=$(call Prefix,libpng-config) PNG_CONFIG?=$(call Prefix,libpng-config)
$(eval $(call Configure,PNG,$(PNG_CONFIG) \ $(eval $(call Configure,PNG,$(PNG_CONFIG) \
$(if $(PNG_STATIC),--static),,--ldflags)) $(if $(PNG_STATIC),--static),,--ldflags))
endif endif
ifdef LINUX ifdef LINUX
opts+=-D_LARGEFILE64_SOURCE opts+=-D_LARGEFILE64_SOURCE
endif endif
opts+=-DHAVE_PNG opts+=-DHAVE_PNG
sources+=apng.c sources+=apng.c
endif endif
endif endif
ifndef NONET ifndef NONET
ifndef NOCURL ifndef NOCURL
CURLCONFIG?=curl-config CURLCONFIG?=curl-config
$(eval $(call Configure,CURL,$(CURLCONFIG))) $(eval $(call Configure,CURL,$(CURLCONFIG)))
opts+=-DHAVE_CURL opts+=-DHAVE_CURL
endif endif
endif endif
ifdef HAVE_MINIUPNPC ifdef HAVE_MINIUPNPC
libs+=-lminiupnpc libs+=-lminiupnpc
endif endif
# (Valgrind is a memory debugger.) # (Valgrind is a memory debugger.)
ifdef VALGRIND ifdef VALGRIND
VALGRIND_PKGCONFIG?=valgrind VALGRIND_PKGCONFIG?=valgrind
$(eval $(call Use_pkg_config,VALGRIND)) $(eval $(call Use_pkg_config,VALGRIND))
ZDEBUG=1 ZDEBUG=1
opts+=-DHAVE_VALGRIND opts+=-DHAVE_VALGRIND
endif endif
default_packages:=\ default_packages:=\
GME/libgme/LIBGME\ GME/libgme/LIBGME\
OPENMPT/libopenmpt/LIBOPENMPT\ OPENMPT/libopenmpt/LIBOPENMPT\
ZLIB/zlib\ ZLIB/zlib\
$(foreach p,$(default_packages),\ $(foreach p,$(default_packages),\
$(eval $(call Check_pkg_config,$(p)))) $(eval $(call Check_pkg_config,$(p))))