mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Merge branch 'makefile-detect-system' into 'master'
Detect which system the Makefile is running on to compile for See merge request STJr/SRB2!1123
This commit is contained in:
commit
8d9b16df8c
1 changed files with 52 additions and 0 deletions
52
src/Makefile
52
src/Makefile
|
@ -83,6 +83,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 \
|
||||||
|
|
Loading…
Reference in a new issue