Commit graph

21 commits

Author SHA1 Message Date
Daniel Gibson
928066d37d Fix architecture detection on Windows in Makefile
$PROCESSOR_ARCHITECTURE seems to contain the architecture of the host,
but we need the architecture the current MinGW shell is targeting.
$MINGW_CHOST seems to be just that, and on my system it's either
i686-w64-mingw32 (mingw32.exe) or x86_64-w64-mingw32 (mingw64.exe)
(No idea what it looks like for Windows on ARM...)
2021-01-14 02:35:04 +01:00
micwoj92
23d0f705c6
fix some typos in comments 2020-05-21 03:07:15 +02:00
Yamagi
26019096ee Resolve oversight in last commit. 2020-04-21 13:52:24 +02:00
Yamagi
1531bcebb7 Bring Makefile on par with yquake2:
* Make CFLAGS and LDFLAGS overrideable
* Correct architecture and operating system detection.
* Enforce FPU mode.
* Implement DEBUG.
* Pass LDFLAGS after the objects.

Closes #9, closes #10.
2020-04-21 13:33:00 +02:00
Andrey Yurtaev
d209850ef7 Fixed macos building. 2019-12-21 04:30:16 +03:00
Yamagi Burmeister
8c58273867 Put -lm into the global LDFLAGS and not into the linker command.
This is more inline with what we're doing in the other addons. And -lm
is a library that's linked unconditionally.
2019-05-13 17:11:45 +02:00
Yamagi
4f8b49daf3
Merge pull request #4 from smcv/libm
Link ctf game.so to math library
2019-05-13 17:04:59 +02:00
Yamagi Burmeister
821872c798 Build a .dylib for OS X. 2019-05-09 18:28:10 +02:00
Yamagi
15a25d8daa
Merge pull request #3 from smcv/source-date-epoch
Use SOURCE_DATE_EPOCH for reproducible build
2019-05-09 18:19:09 +02:00
Yamagi Burmeister
1e37bf132d Switch some annoying and wrang GCC warnings off. 2018-10-25 19:34:12 +02:00
Simon McVittie
f5449a9185 Link ctf game.so to math library
It uses sqrt() and similar functions.

Signed-off-by: Simon McVittie <smcv@debian.org>
2018-07-21 11:41:34 +01:00
Simon McVittie
3e82fe1ef2 Use SOURCE_DATE_EPOCH for reproducible build
Similar to https://github.com/yquake2/yquake2/pull/142 in the yquake2
engine/base game.

Signed-off-by: Simon McVittie <smcv@debian.org>
2018-07-21 11:39:13 +01:00
Yamagi Burmeister
6f1b2f101f Enforce static linkage of libgcc on Windows. 2017-06-16 13:48:58 +02:00
Yamagi Burmeister
b71b80d790 Generate game.dylib on OS X. Fixes #148. 2016-08-14 16:31:46 +02:00
Yamagi Burmeister
adb307b197 Switch from an arch whitelist to an "all archs are supported" approach. 2016-06-11 09:53:38 +02:00
Daniel Gibson
988afce481 Fix bug with high velocities in vents in 32bit builds, fix MingW build
See https://github.com/yquake2/yquake2/issues/71
and https://github.com/yquake2/xatrix/issues/4

In ClientThink(), the float value ent->velocity[i]*8 is saved into
a short and if the value is too big for a short, in 32bit gcc builds
the short is set to SHRT_MIN, resulting in the player being pressed
down instead of up.
Now we put the result in a 32bit int first (which should be big enough)
and assign the int to the short. This still overflows, but with -fwrapv
at least in a defined way (most probably the same way the original
binaries did).

The Makefile now sets $CC to gcc for MingW builds, this should fix
https://github.com/yquake2/xatrix/issues/3

And while I was at it, when the game lib is loaded, it prints the date
it was built, this is especially interesting for our Win32 binaries.
2015-05-17 18:45:26 +02:00
Yamagi Burmeister
6286419315 Port the Makefile to our new Windows build environment 2014-02-14 11:47:30 +01:00
Yamagi Burmeister
498f682480 Add support for OS X to the Makefile 2012-10-06 09:49:04 +02:00
Yamagi Burmeister
7588bf17db Modernize the Makefile and add support for Windows 2012-07-01 10:05:20 +02:00
Yamagi Burmeister
26137d15c0 Rearrange files 2011-10-11 06:57:12 +00:00
Yamagi Burmeister
b851b787f9 - Add missing files
- Add Makefile
2011-10-11 06:33:45 +00:00