Commit graph

398 commits

Author SHA1 Message Date
Zack Middleton
e7ab67a17f Merge branch 'master' into game/eliteforce 2018-11-16 22:02:24 -06:00
Zack Middleton
302f12b8f6 Don't use host pkg-config when cross-compiling
Fix cross-compiling using mingw-w64 on Ubuntu 18.04.

pkg-config --cflags libcurl is now pulling in a Linux include directory
which breaks compiling.
2018-10-01 23:48:45 -05:00
Zack Middleton
d717aaf01e Merge branch 'master' into game/eliteforce
Conflicts:
	code/renderergl1/tr_init.c
	code/renderergl2/tr_init.c
2018-08-13 16:31:09 -05:00
Simon McVittie
fb4b206709 Allow pkg-config binary to be overridden with PKG_CONFIG
This is one of the de facto standard interfaces used in Linux
distributions for cross-compilation (alongside overriding CC and
similar variables), and in particular is used in Debian and its
derivatives.

Signed-off-by: Simon McVittie <smcv@debian.org>
2018-06-12 11:27:42 +01:00
Zack Middleton
e1f0a69716 Merge branch 'master' into game/eliteforce
Conflicts:
	Makefile
	code/qcommon/msg.c
	make-macosx-app.sh
2018-05-18 04:40:21 -05:00
Zack Middleton
f4db711024 Use SDL 2.0.1 headers for macOS ppc64
The libSDL2-2.0.0.dylib in repo doesn't support ppc64 though.

Based on patch by MAN-AT-ARMS.
2018-05-12 13:41:35 -05:00
Zack Middleton
ffd9ce1902 Limit -maltivec to specific source files on OpenBSD too (untested) 2018-05-12 13:30:40 -05:00
Simon McVittie
5909b9a1cf Isolate the Altivec code so non-Altivec PPC targets can use the same binary.
Moved all the code using Altivec intrinsics to separate files. This 
means we can optionally use GCC's -maltivec on just these files, which
are chosen at runtime if the CPU supports Altivec, and compile the rest
without it, making a single binary that has Altivec optimizations but
can still work on G3.

Unlike SSE and similar extensions on x86, there does not seem to be
a way to enable conditional, targeted use of Altivec based on runtime
detection (which is what ioquake3 wants to do) without also giving the
compiler permission to use Altivec in code generation; so to not crash
on CPUs that do not implement Altivec, we'll have to turn it off
altogether, except in translation units that are only entered when
runtime Altivec detection is successful.

This has been tested on Linux PPC (on an Altivec-enabled CPU),
but we may need further work after testing trickles out to other
PowerPC devices and ancient Mac OS X builds.

I did a little work on this patch, but the majority of the effort belongs 
to Simon McVittie (thanks!).
2018-05-12 14:14:47 -04:00
Zack Middleton
1caf1fb875 Fix compiling Makefile (broke in macOS frameworks commit) 2018-04-26 11:47:11 -05:00
Zack Middleton
3bc3fa1b3b Fix compiling against macOS system OpenAL and SDL2 frameworks 2018-04-26 11:23:47 -05:00
Zack Middleton
45af2594a0 Add SDL 2.0.1 headers for macOS PPC
code/libs/macosx/libSDL2-2.0.0.dylib has 2.0.8 for x86 and x86_64 and
2.0.1 for PPC. Add 2.0.1 headers for PPC with modifed SDL_platform.h to
allow compiling using macOS 10.5 SDK. Using separate headers allows the
engine to check the SDL version for enabling newer SDL features.
2018-04-26 11:21:36 -05:00
Zack Middleton
1284205012 Remove duplicate setting of FREETYPE_CFLAGS in Makefile 2018-04-03 20:11:53 -05:00
Zack Middleton
acef71af5e Rename (already updated) opusfile-0.8 to opusfile-0.9 2018-03-16 13:29:20 -05:00
Zack Middleton
8611eb421d Rename (already updated) opus-1.1.4 to opus-1.2.1 2018-03-16 13:29:19 -05:00
Zack Middleton
cb24c59567 Update opus from 1.1.4 to 1.2.1 2018-03-16 13:29:19 -05:00
Zack Middleton
c38c823a2a Rename (already updated) libvorbis-1.3.5 to libvorbis-1.3.6 2018-03-16 13:29:19 -05:00
Zack Middleton
ebd3d516ac Rename (already updated) libogg-1.3.2 to libogg-1.3.3 2018-03-16 13:11:27 -05:00
Zack Middleton
4a063679f8 Merge branch 'misc/lilium_common' into game/eliteforce
Conflicts:
	code/qcommon/common.c
	code/qcommon/q_shared.h
2018-03-04 05:10:01 -06:00
Zack Middleton
51a57b8420 Merge branch 'master' into misc/lilium_common
Conflicts:
	Makefile
	code/client/cl_main.c
	code/qcommon/common.c
	code/qcommon/q_shared.h
	code/sys/sys_unix.c
2018-03-04 05:08:08 -06:00
Zack Middleton
83e5ecfe36 Add BUILD_FINAL from Spearmint 2018-03-04 05:03:27 -06:00
Zack Middleton
7fda468f5b Change renderer prefix, fix app bundle 2018-03-04 04:14:29 -06:00
Zack Middleton
3521787c14 Merge branch 'misc/lilium_common' into game/eliteforce
Conflicts:
	README.md
	code/client/cl_main.c
	code/qcommon/common.c
	code/qcommon/q_shared.h
	code/sys/sys_unix.c
2018-03-04 04:04:35 -06:00
Zack Middleton
cb7ccbacac Allow changing the renderer file name prefix
This makes it easier for forks to coexist without having issues with
incompatible renderers.
2018-03-04 03:17:31 -06:00
Zack Middleton
b9a643264d Change version to 1.39, update README 2018-03-04 01:52:27 -06:00
Zack Middleton
c0c4385122 Merge branch 'codec/mp3' into game/eliteforce 2018-03-03 22:58:53 -06:00
Zack Middleton
0704abe5ec Add libmad source to internal source tree
Modified to fit into Quake 3 build system and use q_platform.h instead of
configure.
2018-03-03 22:47:09 -06:00
Zack Middleton
3d85ba00b1 Merge branch 'master' into codec/mp3
Conflicts:
	Makefile
2018-03-03 22:44:15 -06:00
Zack Middleton
e45538b1c5 Merge branch 'master' into game/eliteforce
Conflicts:
	README.md
	code/server/sv_client.c
2018-03-03 19:27:28 -06:00
Zack Middleton
d4e7d987a3 Fix MAC_OS_X_VERSION_MIN_REQUIRED for macOS 10.10 and later
Manually specifying MACOSX_VERSION_MIN=10.10 or later would use the
wrong value for MAC_OS_X_VERSION_MIN_REQUIRED define. 1100 instead of
101000.
2018-02-08 10:23:44 -06:00
Zack Middleton
7166a3cd39 Enable compiler optimization on all macOS architectures
It seems to improve framerate and still work on x86 and x86_64. I
haven't tested ppc64 as I don't have the hardware. ppc64 isn't built
into the universal bundle either.

I noticed this because compiling opus warns it may be slow due to
optimization being disabled.
2017-12-16 12:51:56 -06:00
Mickaël Thomas
6ecfa4f263 Fix shader corruption on OpenBSD
OpenBSD's sed (and possibly other platforms') interprets `\r` as a
literal `r` rather than a carriage return, which leads to all `r`
letters being stripped from the shaders' source.

This fixes the issue by using the POSIX-compliant `tr -d '\r'` to remove
carriage returns.

Thanks to @ryan-sg for reporting the issue
2017-10-16 16:23:14 +01:00
Mickaël Thomas
7d012f229e Fix a race condition in the makedirs target
A race condition can happen when running "make all" with parallel jobs.

The issue is that the build directory can be created by another
concurrent job between the moment it was detected as missing and the
moment mkdir is called (which fails if the directory already exists).

This fixes the problem by always using `mkdir -p` which doesn't fail if
the directory already exists.
2017-10-16 16:22:37 +01:00
Walter Barrett
96f94a2891 Fix compiling GLSL shaders under Windows.
Now the `sed` command cope with files using Windows-style line endings.
2017-10-07 08:02:25 -05:00
Zack Middleton
e657dbd6b2 Fix setting cflags/libs from sdl2-config
SDL_CFLAGS and SDL_LIBS assignment was "only if absent". However due
to previously assigning them to "pkg-config sdl2" values, the values
from sdl2-config were ignored.
2017-10-02 02:03:16 -05:00
Zack Middleton
20573bce43 Don't link to libGL at compile time
Get all OpenGL functions using SDL_GL_GetProcAddress(). This makes it
easier to cross-arch compile on Linux and add support for OpenGL ES
in the future.

Users still have to supply their own libSDL2 for cross-arch compiling
on Linux. But now the user does not have to re-install libgl1-mesa-dev
package for i386 or amd64 on Debian when switching between compiling
ioquake3 for x86 and x86_64.
2017-10-01 23:07:33 -05:00
Zack Middleton
eeaade70bd Statically link libgcc on Windows
Fix for ioq3 test builds for Windows x86 (cross-compiled from Ubuntu
using mingw-w64) requiring libgcc_s_sjlj-1.dll. I'm unable to reproduce
the issue using mingw-w64 in Debian or Cygwin.
2017-09-26 01:15:25 -05:00
Zack Middleton
414f3c5e3e Enable Ogg Vorbis support by default
libvorbis is included in-tree so this doesn't require additional
dependencies.
2017-09-23 19:56:42 -05:00
Zack Middleton
4837f4619e Merge branch 'master' into game/eliteforce
Conflicts:
	code/client/cl_main.c
	code/qcommon/common.c
	code/qcommon/files.c
	code/qcommon/msg.c
	code/qcommon/q_shared.h
	code/renderercommon/tr_common.h
	code/renderergl2/tr_extensions.c
	code/sdl/sdl_glimp.c
2017-09-17 23:16:55 -05:00
Zack Middleton
aeaecb4ae5 Add Windows application manifest
- Use common controls 6 so error dialogs use correct visuals on
Windows XP or later!
- Specify running as invoker so Windows doesn't guess if it should
prompt for admin permission on Vista or later.
- Specify compatible with Vista through Windows 10. Tells Windows
not to emulate Vista behavior, not sure if it affects anything.

Makefile automatically runs windres when manifest changes.
2017-09-07 21:04:52 -05:00
MAN-AT-ARMS
e07ffa715c Update internal curl to 7.54.0 2017-07-28 16:32:22 +01:00
Ryan C. Gordon
76e6b3c534 Removed unnecessary trailing backslash. 2017-06-04 16:43:50 -04:00
Ryan C. Gordon
a761684a23 Windows support for autoupdater manifest signatures. 2017-06-04 02:21:55 -04:00
Ryan C. Gordon
62f6f0c7e0 Wire up libTom stuff to build system. 2017-06-04 01:16:37 -04:00
Zachary J. Slater
87eecd7bc1 Merge pull request #290 from rcgordon/autoupdater
Initial shot at writing an ioquake3 autoupdater. Thank you icculus, and everyone who contributed to his patreon! https://www.patreon.com/icculus
2017-06-02 22:46:22 -10:00
Ryan C. Gordon
0eb497b01b Disable the autoupdater; enable only if intentional, like for official builds. 2017-06-02 02:29:09 -04:00
Ryan C. Gordon
063875e89a Fixed linking on things that need -ldl, and compiler warnings. 2017-06-02 01:39:03 -04:00
Ryan C. Gordon
82977da9c8 Working Windows port of the autoupdater! 2017-06-02 00:49:42 -04:00
Ryan C. Gordon
d0da0724e7 Move the autoupdater launcher into its own public domain source file.
So other games can steal this piece if they want.
2017-05-31 01:22:40 -04:00
Ryan C. Gordon
f518f75149 Don't link directly to libcurl.
Lots of Linux distros have different names (libcurl-gnutls.so vs etc), and
version the symbols (curl_global_init@@CURL_LIBSSL_3), so it's more compatible
to just dlsym the basic entry points we need and just demand that libcurl is
installed at all.

Alternately: we'll use our own libcurl build, but we'll probably have to dump
SSL support to make this sane to do.
2017-05-30 20:15:59 -04:00
Ryan C. Gordon
86e71b11eb Fixed failure to link libcurl on some platforms. 2017-05-30 17:39:13 -04:00