Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SteelT
SRB2
Commits
f92026f9
Commit
f92026f9
authored
4 years ago
by
James R.
Browse files
Options
Downloads
Patches
Plain Diff
Makefile: automatically detect system to compile for, if no system was specified
This should work for mingw and linux so far.
parent
f0bf06ae
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Makefile
+51
-0
51 additions, 0 deletions
src/Makefile
with
51 additions
and
0 deletions
src/Makefile
+
51
−
0
View file @
f92026f9
...
...
@@ -82,6 +82,57 @@
#
#############################################################################
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
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
D_DIR
?=
../bin/Resources
D_FILES
=
$(
D_DIR
)
/srb2.pk3
\
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment