Commit graph

368 commits

Author SHA1 Message Date
Zack Middleton
0ad4381a11 Make using Yacc optional, disabled by default
A built-in GNU Make rule causes code/tools/lcc/lburg/gram.y to replace
gram.c if gram.y has a newer modified time. This causes git diff to
pick up changes to gram.c, which seems to have been manually modified
to fix warnings and may vary by Yacc used to create it. It also
requires installing a program to generate a file that already exists
in a usable state in the code repository.

So replace the built-in rule so it is only used if USE_YACC is 1
(defaults to 0). The Yacc executable name can be overriden using
`make YACC=yacc` like before.

I preferred to touch gram.c instead of installing Yacc because of the
problems it causes. It doesn't really seem like a good idea to recommend
others do that instead of disabling Yacc the Makefile though.
2016-07-11 07:51:34 -05:00
Victor Roemer
398dea397c Fix Makefile for OSX
Bump base SDK from 10.5 -> 10.7
Just use the builtin __APPLE__
2016-06-12 17:17:33 -04:00
Zack Middleton
d8afce6805 Cross-compiling using mingw should only pick one gcc executable
If multiple mingw toolchains are installed, the Makefile set CC to all
present gcc executables. Pick only the first one instead of passing the
others as arguments.

"CC: /usr/bin/i686-w64-mingw32-gcc /usr/bin/i686-pc-mingw32-gcc"
2016-05-08 20:17:39 -05:00
SmileTheory
275317fefb OpenGL2: Direct state access, part 1: Texture binds 2016-01-18 04:46:01 -08:00
Zack Middleton
615b73288f Use Opus for VoIP
Server/client VoIP protocol is handled by adding new cvars
cl_voipProtocol and sv_voipProtocol, sv_voip and cl_voip
are used to auto set/clear them. All users need to touch
are cl/sv_voip as 0 or 1 just like before.

Old Speex VoIP packets in demos are skipped.
New VoIP packets are skipped in demos if sv_voipProtocol
doesn't match cl_voipProtocol.

Notable difference between usage of speex and opus codecs,
when using Speex client would be sent 80ms at a time.
Using Opus, 60ms is sent at a time. This was changed because
the Opus codec supports encoding up to 60ms at a time.
(Simpler to send only one codec frame in a packet.)
2016-01-06 05:19:10 -06:00
SmileTheory
f965f3c66e OpenGL2: DDS (compressed textures) support. 2015-12-18 06:53:20 -08:00
Zack Middleton
fad66ae222 Maybe fix old MSYS when there is an empty for loop
Based on ioquake3 svn r1485.
2015-10-04 17:20:56 -05:00
Simon McVittie
ad24cfcd55 build: if tput fails, fall back to a reasonable text width
If TERM is not set (which can happen in autobuilders and other
batch environments), or if tput cannot determine the number of
columns for some other reason, then it can fail and not produce
any output. Prior to this change, that would result in passing
field width -4 to fmt, which is an error and causes fmt to
produce no output.
2015-07-22 08:16:02 +01:00
Simon McVittie
2a71948f21 build: define ARCH_STRING in Makefile on Linux and other GNU platforms
GNU platforms (Linux, kFreeBSD, Hurd) have endian.h to determine
endianness, so all architectures except x86_64 are in fact treated
identically, except that their ARCH_STRING is different.
The ARCH_STRING must always be identical to the ARCH from the Makefile,
otherwise the engine will not find its cgame, game and ui plugins
under their expected names and startup will fail. If we pass it in
from the Makefile, then an identical value is guaranteed, and we can
get rid of an increasingly long list of defined(__some_cpu__) tests.

The one remaining quirk is that we test __x86_64__ to determine
whether to define idx64; I've kept that, but separated it from
the ARCH_STRING.

On non-Linux platforms we only support a few architectures anyway,
so keeping the list up to date is less of a burden; *BSD porters
could probably use the same technique to get support for lots of
architectures with little effort, but I have not done that here,
because I cannot test it.

Windows must continue to support preprocessor-based architecture tests
in any case, so that the MSVC solutions (which do not use the Makefile)
can continue to work. However, Windows only runs on a few CPU families,
so this shouldn't be a significant burden in practice.

When cross-compiling, the tools are compiled for the build architecture
(COMPILE_PLATFORM, COMPILE_ARCH) rather than the host architecture
(PLATFORM, ARCH), so define ARCH_STRING to COMPILE_ARCH on a GNU
COMPILE_PLATFORM.
2015-07-14 22:51:57 +01:00
Simon McVittie
c91fab3900 build: canonicalize all ARM variants to "arm", matching q_platform.h
The ARCH in the Makefile must match the ARCH_STRING in q_platform.h;
otherwise, ioquake3 will install (for instance) uiARCH.so but look for
uiARCH_STRING.so, which isn't going to go well (particularly for
the modular renderer).

Like i386, but unlike most (all?) other Linux platforms, uname -m on
32-bit ARM machines can have various results starting with "arm",
depending on the specific CPU version (e.g. Raspberry Pi is armv6l,
RPi2 is armv7l). Again similar to the x86 family,
it's appropriate for them to share an architecture suffix;
q_platform.h has traditionally used "arm" so let's use that.

64-bit ARM makes a clean break from this, much like 64-bit x86 does:
uname -m produces a string not starting with arm (specifically
"aarch64"), and gcc predefines __aarch64__ instead of __arm__.
As a result, it is unaffected by this change.
2015-07-14 22:51:55 +01:00
Simon McVittie
071965b3f0 Makefile: confine $(LIB) to the one platform that needs it, namely irix64
It isn't mentioned anywhere else, and deleting it from the Linux code
path means we don't need to maintain an exhaustive list of 64-bit
architectures.
2015-07-14 22:51:53 +01:00
Zack Middleton
6a03817a9c Merge pull request #4 from smcv/hurd
Add support for the GNU/Hurd architecture
2015-06-30 19:02:46 -05:00
Martin Michlmayr
ebb69f699c Add support for Aarch64 (ARM64)
Add support for Aarch64, the 64-bit ARM architecture.
2015-06-30 14:22:49 -04:00
Zack Middleton
d0a3ba301b Merge pull request #89 from bostick/master
Add mingw prefix for cygwin32 and mingw32
2015-06-18 13:13:16 -05:00
Zack Middleton
9522028a0e Sort tr_image_*.c filenames in Makefile 2015-06-12 14:31:58 -05:00
Tim Angus
76e0c51a1a Merge pull request #110 from zsoltm/mingw64
added mingw64 (msys2) platform support
2015-06-12 16:28:13 +01:00
Tim Angus
708fe6937a use osxcross compilers 2015-06-07 03:48:09 -07:00
Tim Angus
92b74e58cc clang gets upset by some of these compiler options (and they're probably pretty pointless in 2015 anyway) 2015-06-06 22:42:10 +01:00
Simon McVittie
0fc86e9632 Use pkg-config for a system libjpeg if available: libjpeg-turbo has it
Bug: https://github.com/ioquake/ioq3/pull/116
2015-03-18 17:37:42 +00:00
ZsoltM
31fea24321 added mingw64 (msys2) platform support 2015-01-30 22:52:53 +01:00
Zack Middleton
4e029b1f6b Fix compiling lcc using mingw under cygwin
Also have 'make' under cygwin automatically use mingw.
2015-01-27 04:51:03 -06:00
Ludwig Nussel
6214f73af5 a VM for ARMv7l 2014-10-24 13:44:23 +02:00
Brenton Bostick
66edc4b296 Add mingw prefix for cygwin32 and mingw32 2014-10-03 21:59:26 -04:00
Tim Angus
02d197ca08 Bullshit change to test jenkins configuration 2014-08-27 10:36:56 +01:00
Tim Angus
00909a4c16 Add SDL libraries to the builds 2014-08-26 16:59:33 +01:00
Tim Angus
cf7004ffb2 Fix OSX build 2014-08-25 12:03:10 -04:00
Tim Angus
2a3368481d Merge branch 'master' into sdl2
Conflicts:
	Makefile
	code/renderergl2/tr_image.c
2014-08-25 15:00:48 +01:00
hairball
3c52f2dccc Don't use -mwindows with Clang on Windows
Thanks to stigmha for pointing out this doesn't work in Windows.
2014-07-26 00:47:28 -05:00
Zack Middleton
48738599a0 Allow user override of cURL, OpenAL, and SDL libs/cflags 2014-07-20 17:39:27 -05:00
MAN-AT-ARMS
a8dcf60b76 Fix compiling on Linux Mint 2014-07-20 17:32:11 -05:00
Zack Middleton
574f6d1f31 Allow overriding external opus libs/cflags in Makefile
Pointed out by @MAN-AT-ARMS.
2014-07-20 16:55:45 -05:00
Zack Middleton
b02b54883b Fix up vorbis handling in Makefile 2014-07-20 06:14:44 -05:00
Zack Middleton
efa9555d74 Merge branch 'pkg-config' of github.com:smcv/ioq3 into master
Conflicts:
	Makefile
2014-07-20 05:51:17 -05:00
Zack Middleton
7afb433e20 Fix fast-math optimize flag for MinGW x86_64 build
Found by /dev/humancontroller.
2014-07-15 00:23:02 -05:00
Zack Middleton
c55df2c9aa Merge branch 'master' into sdl2 2014-03-24 17:53:08 -05:00
Zack Middleton
cf7d8ef9cf Remove -falign-loops and -falign-jumps from Makefile
Clang warns and errors because of them on various platforms.

Based on pull request #43 by @xhairball.
2014-03-24 13:09:49 -05:00
Tim Angus
1cbb5e9771 Merge pull request #44 from xhairball/features/add-vorbis-1.3.4
Add vorbis 1.3.4 support
2014-03-24 14:15:11 +00:00
MAN-AT-ARMS
5e1011bf70 Update SDL 1.2.15 to Revision 8040 2014-03-09 09:24:54 -04:00
MAN-AT-ARMS
dafed0fd66 Update SDL2 to 2.0.2 2014-03-08 21:33:02 -06:00
hairball
31d8f95427 Remove unnecessary NEED_VORBIS since you have USE_CODEC_VORBIS
Thanks zturtleman for catching this
2014-02-08 22:02:24 +00:00
hairball
cc40051839 Add vorbis 1.3.4 build support 2014-02-08 08:26:03 +00:00
Zack Middleton
ed087bb89e Merge branch 'master' into sdl2 2014-02-07 23:24:12 -06:00
Zack Middleton
c2e2514efc Merge pull request #41 from xhairball/fixes/check-cc-when-cross-compiling-mingw32
When cross compiling on mingw32, make sure it finds a CC
2014-02-07 22:33:02 -06:00
Zack Middleton
d0b1fb4fed Merge branch 'features/upgrade-opus-1.1' of https://github.com/xhairball/ioq3 into opus_update
Conflicts:
	Makefile
2014-02-07 22:12:59 -06:00
Zack Middleton
166f5ab90c Merge branch 'features/upgrade-opusfile-0.5' of https://github.com/xhairball/ioq3 into opus_update 2014-02-07 22:11:31 -06:00
hairball
6fa6ab1064 When cross compiling on mingw32, make sure it finds a CC 2014-02-08 03:57:39 +00:00
hairball
2de340895f Upgrade libogg 1.3.0 to 1.3.1
This is a minor bugfix release with few changes
2014-02-08 03:38:01 +00:00
hairball
b0aed02823 Upgrade opusfile 0.2 to 0.5 2014-02-08 03:29:10 +00:00
hairball
9e0c602795 Upgrade opus 1.0.2 -> 1.1 2014-02-08 03:21:02 +00:00
Andrey Vihrov
7bffad0981 Don't forget to install the renderer2 binary if USE_RENDERER_DLOPEN=0 2013-12-16 18:01:29 +02:00
Tim Angus
32a859c680 More updates to SDL2 libs from MAN-AT-ARMS 2013-08-19 23:19:29 +01:00
Tim Angus
bde7665462 Merge branch 'master' into sdl2
Conflicts:
	code/sdl/sdl_input.c
2013-08-16 23:34:08 +01:00
jeremiah sypult
d9485b696e Makefile builds fall back to traditional archiving when Mac OS X application bundle generation fails 2013-07-18 11:29:23 -05:00
jeremiah sypult
744651f72f Updated Makefile to only build release OS X app bundles 2013-07-18 00:47:00 -05:00
jeremiah sypult
260233d4ec bug 5986 - Configure jenkins to spit out mac .app
https://bugzilla.icculus.org/show_bug.cgi?id=5986
Created make-macosx-app.sh to handle manually creating an app bundle from other scripts.
Updated make-macosx.sh to create bundle with make-macosx-app.sh (TODO: make-macosx-ub.sh support).
Updated Makefile to create bundle with make-macosx-app.sh and zip up the resulting ioquake3.app if ARCHIVE is defined.
2013-07-18 00:11:10 -05:00
Svante Signell
540e4225cc Add support for the GNU/Hurd architecture
[As with GNU/kFreeBSD, it's treated as "Linux": all three use the GNU libc
and runtime linker, which is mostly what matters for ioquake3. -smcv]

Bug-Debian: http://bugs.debian.org/679330
Reviewed-by: Simon McVittie <smcv@debian.org>
2013-05-19 21:50:40 +01:00
Simon McVittie
69999280c6 Find Speex via user override, pkg-config or default search path 2013-05-19 21:32:20 +01:00
Simon McVittie
cff1fcd658 Look for system Vorbis, Opus and Ogg via pkg-config
As usual, the order of precedence is: user override, pkg-config,
or assume they're in standard locations.

In particular, Opus isn't in the default search path on Debian.
2013-05-19 21:31:26 +01:00
Simon McVittie
c817ab5ae0 Find system zlib via user override, pkg-config or in standard locations 2013-05-19 21:31:12 +01:00
Simon McVittie
9ff2fc3324 Allow system libjpeg to be in a non-standard location
It doesn't have pkg-config metadata (at least on Debian), so if the
user doesn't override it, assume normal system paths.
2013-05-19 21:28:31 +01:00
Simon McVittie
2821aa41d7 Allow OpenAL to be in a non-standard location on all platforms
Similar to libcurl, we didn't use OPENAL_LIBS and assumed it was
always "-lopenal".
2013-05-19 21:27:24 +01:00
Simon McVittie
b1da355644 Allow libcurl to be in a non-standard location on all platforms
We didn't add CURL_CFLAGS to CLIENT_CFLAGS on all platforms, and didn't
use CURL_LIBS at all, so if "pkg-config --libs" returned "-L... -lcurl"
or even "/.../libcurl.a", it wouldn't work.
2013-05-19 21:23:50 +01:00
Simon McVittie
608347c84d Centralize checks for Freetype, with a user override
This lets us find a library in a non-standard library directory
(via -L in the pkg-config metadata), and allows overrides similar to
the Autoconf convention, e.g.

    make FREETYPE_CFLAGS=-I/opt/freetype/include \
        FREETYPE_LIBS="-L/opt/freetype/lib -lfreetype"

If pkg-config didn't work, assume that Freetype is in the default
location.
2013-05-19 21:20:43 +01:00
Simon McVittie
1fe4e0c239 Add USE_INTERNAL_LIBS, a default for USE_INTERNAL_*
Linux distributions that want to link dependencies externally will
generally want to link (almost) every dependency externally; similarly,
minimal-dependency builds that want to use the embedded copies of
dependencies will generally want to do so for (almost) every dependency.
Make it easier to choose one of those by setting USE_INTERNAL_LIBS=0
or USE_INTERNAL_LIBS=1, respectively.

The default can still be overridden per-dependency; for instance,
"make USE_INTERNAL_LIBS=0 USE_INTERNAL_OPUS=1" will use the system
version of everything except Opus.
2013-05-19 21:19:52 +01:00
Tim Angus
d9d52f0306 Merge branch 'master' into sdl2
Conflicts:
	Makefile
	code/renderercommon/qgl.h
	code/renderergl1/tr_local.h
	code/sdl/sdl_glimp.c
2013-05-08 14:27:15 +01:00
Jonathan Gray
a88357b93c sync the OpenBSD cflags with Linux 2013-05-05 11:56:24 +10:00
Jonathan Gray
258c4782c6 correct the linked libs on OpenBSD 2013-05-05 11:40:57 +10:00
Tim Angus
efaa87de10 Fix typo preventing OSX native compiles 2013-03-28 11:13:58 +00:00
Tim Angus
0183f3978a Fix OSX app/ub scripts 2013-03-28 09:56:29 +00:00
Zack Middleton
59061e853e Change missionpack QVM build order in Makefile
Now it matches native libs and baseq3 QVMs.
2013-03-27 14:26:34 -05:00
Tim Angus
2b3c5492c7 Add option to create archive of build product 2013-03-27 14:35:11 +00:00
Tim Angus
838fcf45cb Make the build summary more pretty 2013-03-26 23:12:17 +00:00
Tim Angus
946c89b5f1 Fix 'make -jX clean release' 2013-03-26 20:58:55 +00:00
Tim Angus
352cd151e0 Cross compiling for OS X 2013-03-25 22:41:45 +00:00
Tim Angus
4f452fcfed Enable building QVMs when cross-compiling 2013-03-24 22:06:45 +00:00
Tim Angus
cae7ae9ce6 (bug #5904) Fix OpenBSD and Solaris builds 2013-03-23 12:14:03 +00:00
Tim Angus
02a625a1b3 Fix it more 2013-03-22 14:47:37 +00:00
Tim Angus
6155816672 (Hopefully) fix the Jenkins build 2013-03-22 14:26:29 +00:00
Tim Angus
b720b60295 Move cross-make-mingw.sh's functionality to the Makefile and remove it 2013-03-22 13:49:50 +00:00
Tim Angus
e4151c1d55 Add DEBUG_MAKEFILE to... debug the Makefile 2013-03-22 13:42:11 +00:00
Tim Angus
8d70929d12 Ditch 'historical compatibility' and use 'logic' instead 2013-03-22 11:33:27 +00:00
Tim Angus
bba199e795 Fix comment grammar (and test jenkins) 2013-03-21 22:37:44 +00:00
Tim Angus
2c8e751130 Consolidate architecture names
amd64, x64, x86_64 -> x86_64
i386, i86pc, x86 -> x86
powerpc, ppc -> ppc
powerpc64, ppc64 -> ppc64
axp -> alpha

Some exceptions are made for the actual build product names
2013-03-21 18:00:17 +00:00
Tim Angus
dfbad1360f Fix some clang warnings 2013-03-12 21:50:59 +00:00
Tim Angus
78132cf829 Remove old x86_64 JIT compiler 2013-03-11 22:20:10 +00:00
Zack Middleton
2a31f33fc6 Add libogg 1.3.0 2013-02-17 18:56:06 -06:00
Zack Middleton
3dd5c5d862 Add Ogg Opus support 2013-02-17 18:32:05 -06:00
Tim Angus
93e6183ce3 Move some things into renderercommon 2013-02-16 12:15:36 +00:00
Tim Angus
f6fb9eb602 renderer -> renderergl1, rend2 -> renderergl2 2013-02-15 23:46:37 +00:00
Tim Angus
517c65d85e Fix some SMP bits I missed 2013-01-26 21:40:45 +00:00
Tim Angus
51df89ab13 Remove the SMP renderer feature 2013-01-24 22:53:08 +00:00
Tim Angus
b43f766141 Update bundled SDL headers/libs 2013-01-21 22:40:05 +00:00
Tim Angus
f478761e07 Use SDL 2 instead of SDL 1.2 2013-01-17 18:20:03 +00:00
Tim Angus
6999fdba91 Assorted whitespace fixes 2013-01-05 15:35:50 +00:00
Tim Angus
631db38d25 Fix dist target and comment refering to svn 2013-01-05 15:35:32 +00:00
Tim Angus
20ef1b0115 Fix whitespace 2013-01-05 15:05:30 +00:00
Tim Angus
f6c98fd29f Replace svnversion use with git equivalent 2013-01-03 21:08:28 +00:00
Richard Allen
6a7a67a497 More fixes to the macosx buildsystem. This removes the SDL Framework and makes use of a SDL library that is position independant. This also brings back PPC builds into the UB and also as a standa alone build choice. 2012-12-31 01:32:15 +00:00
Richard Allen
1c8fa31c0d Changed the MacOS-X build system to make UB's containing i386 and x86_64 arches and made make-macosx.sh not build UB's but only standard binaries 2012-12-20 00:15:17 +00:00
Zack Middleton
76584dbcec Makefile fixes for OpenBSD by Jonathan Gray. (#5728) 2012-12-16 02:58:47 +00:00