Commit graph

329 commits

Author SHA1 Message Date
Ryan C. Gordon
8e001e6b99 autoupdater should build with $(CC), not $(TOOLS_CC), in Makefile. 2017-05-25 22:01:47 -04:00
Ryan C. Gordon
4729c683fd Initial shot at writing an ioquake3 autoupdater. 2017-05-25 14:13:18 -04:00
Dan Church
537d28556f
Fix build when cloned as submodule
Steps to reproduce:

    git init
    git submodule add -b master git://github.com/ioquake/ioq3.git
    cd ioq3
    make USE_GIT=1
2017-03-30 16:10:40 -05:00
Dominic Fandrey
a47ac2a451 Use -On level from CFLAGS on FreeBSD 2017-03-28 13:09:42 +02:00
Dominic Fandrey
7a237c8020 Do not pull CFLAGS into BASE_CFLAGS on FreeBSD 2017-03-28 13:09:42 +02:00
Eugene Molotov
864f66a1c0 Makefile: using generic windres if specific one is not present in mingw platform 2017-03-23 20:34:27 +05:00
Zachary J. Slater
6e4e6e8925 Merge pull request #91 from lnussel/master
a VM for ARMv7l (Thank you, Ludwig -zjs)
2017-01-24 19:27:13 -10:00
Zack Middleton
7a73646157 Prefer mingw-w64 for cross-compiling 2016-11-01 17:44:40 -05:00
Tim Angus
cce24668f7 Merge pull request #225 from smcv/reproducible-date
Pick up date from SOURCE_DATE_EPOCH, for reproducible builds
2016-09-27 21:05:24 +01:00
Simon McVittie
9c76b546e3 Pick up date from SOURCE_DATE_EPOCH, for reproducible builds
The goal of reproducible builds is that a rebuild of the same source
code with the same compiler, libraries, etc. should result in the same
binaries. SOURCE_DATE_EPOCH provides a standard way for build systems
to fill in the date of the latest source change, typically from a git
commit or from metadata like the debian/changelog in Debian packages.

This does not change anything if SOURCE_DATE_EPOCH is not defined;
the intention is that a larger build system like a Debian package
will define it.

Please see https://reproducible-builds.org/ for more information about
reproducible builds.
2016-09-22 09:02:20 +01:00
Simon McVittie
cab94d0559 Introduce NOTSHLIBLDFLAGS, used to link executables only
This can be used for LDFLAGS that would be inappropriate for shared
libraries, such as the "-fPIE -pie" used to link position-independent
executables. PIEs make it more difficult to exploit various classes
of security vulnerability.
2016-09-22 08:58:18 +01:00
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