Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
74648c0
Sound: added optimized x86_64 mixing for mingw and unix builds
ec- Aug 19, 2023
ed479e5
try to fix osx build
ec- Aug 19, 2023
da7123c
Merge pull request #234 from ec-/20230819
ec- Aug 19, 2023
77fbc0d
Fix Info_RemoveKey line endings
Chomenor Aug 23, 2023
bc8fcc1
Fix info string trailing key issue
Chomenor Aug 23, 2023
a1a28db
Merge pull request #236 from Chomenor/info_trailing_key_fix
ec- Aug 23, 2023
6245408
Vulkan: added some color-input optimized shaders, should improve FPS …
ec- Aug 24, 2023
0fa7d7a
Vulkan: fixed fog rendering with recent color optimizations
ec- Aug 25, 2023
6614cdd
Vulkan: rebind indexes after legacy dlight pass before fog pass
ec- Aug 26, 2023
dde0c69
Vulkan: skip color/tex gen only if previous stage was not optimized a…
ec- Aug 27, 2023
abcf5f8
Vulkan: fix depthFragment shaders in fog, allow fog-collapse for non-…
ec- Aug 30, 2023
e445088
Vulkan: allow more color optimizations, with and without fog
ec- Sep 3, 2023
ac7a93e
Define the MACOS_X flag for macOS builds
Perlence Sep 5, 2023
cf23ae0
Merge pull request #240 from Perlence/define-macos-flag
ec- Sep 8, 2023
e0d34d7
OpenGL: added USE_VBO/USE_FBO definitions to switch corresponding fun…
ec- Sep 9, 2023
2e4175c
Renderers: use more reasonable default backend color
ec- Sep 13, 2023
4a84733
Vulkan: added entity-color optimization for single-stage shaders
ec- Sep 24, 2023
f1fcec7
universal build work + sdl lib included for mac
Bishop-333 Sep 27, 2023
520e89c
think it work (not with dl open yet)
Bishop-333 Sep 27, 2023
050dfd4
Merge pull request #9 from ec-/master
Bishop-333 Sep 27, 2023
fdf3c2d
Update Makefile
Bishop-333 Sep 27, 2023
428fcf1
correct build on macs
Bishop-333 Sep 27, 2023
0e25892
remove useless lines
Bishop-333 Sep 27, 2023
b465a4d
Merge pull request #244 from Bishop-333/apple-update
ec- Sep 28, 2023
05ae5c5
app will search for pk3 inside and next to the app bundle
Bishop-333 Sep 28, 2023
64c09ec
char -> const char
Bishop-333 Sep 28, 2023
288d8f3
Update unix_shared.c
Bishop-333 Sep 28, 2023
8b7302b
remove com_homepath as its useless and correct version in the .app bu…
Bishop-333 Oct 4, 2023
f01356d
cURL: updated prebuilt libraries and headers to version 8.4.0, disabl…
ec- Oct 13, 2023
b900bc3
remove Sys_SetDefaultBasePath from qcommon and make it static void
Bishop-333 Oct 14, 2023
4974a83
Vulkan: fix compiler warning
ec- Oct 14, 2023
3f4f123
Updated changelog
ec- Oct 14, 2023
346da3a
Fix Makefile
ec- Oct 14, 2023
3fda9a7
remove duplicate sdl and move it to libsdl/include/SDL2
Bishop-333 Oct 15, 2023
8411dc5
cleanup made by ec
Bishop-333 Oct 15, 2023
ef83a14
corrected windows build name
Bishop-333 Oct 15, 2023
b86c88b
Update Makefile
Bishop-333 Oct 15, 2023
efa66ee
lipo fix
Bishop-333 Oct 16, 2023
c4a55e9
fix conflicts
Bishop-333 Oct 16, 2023
529c047
Link with vorbisfile. Fixes #248
sarg Oct 16, 2023
b0f5442
Merge pull request #249 from sarg/fix-vorbis
ec- Oct 17, 2023
9749ff5
Merge pull request #245 from Bishop-333/apple-update
ec- Oct 17, 2023
ccd7ab4
Vulkan: add \r_bloom_threshold_mode and \r_bloom_modulate cvars, simi…
ec- Oct 20, 2023
914fc40
Vulkan: substitute \vid_restart fast -> keep_window for now, REF_KEEP…
ec- Oct 29, 2023
93cb470
Filesystem: allow multiple basegames in fs_basegame cvar separated by…
ec- Jan 30, 2024
82ed885
Vulkan: fixed various image layout transition synchronization issues
ec- Feb 3, 2024
629cf29
Renderers: do not merge single lightmap
ec- Feb 3, 2024
0d4cb74
Update build.yml
KG7x Feb 3, 2024
e60ee3c
Update build.yml
KG7x Feb 3, 2024
9c23bdc
Merge pull request #3 from KG7x/actions
KG7x Feb 3, 2024
d42b106
Merge pull request #266 from KG7x/master
ec- Feb 3, 2024
bb6d29f
Vulkan: improve flare visibility test code
ec- Feb 4, 2024
86ce720
Renderers: apply additional lightmap texcoord corrections when needed
ec- Feb 5, 2024
feaf9d4
Update build.yml
ec- Feb 5, 2024
e1b388c
Renderers: apply lightmap texcoord correction only if lightmap is act…
ec- Feb 6, 2024
8f94a0a
Filesystem: reset fs_basegame cvar to last separated item
ec- Feb 7, 2024
adee7a2
Vulkan: added descriptor index definitions
ec- Feb 8, 2024
c368633
Vulkan: fix screenmap image layout transitions
ec- Feb 10, 2024
fddf0a8
Vulkan: do not set transient flag for depth/stencil attachment when b…
ec- Feb 10, 2024
4b2b072
Vulkan: disabled r_ext_alpha_to_coverage for now due to rendering art…
ec- Feb 17, 2024
d90d628
Vulkan: added missing texture mode setup in GL_SetDefaultState()
ec- Mar 4, 2024
51b6ae4
cmd: fixed nested commands offset after command execution
ec- Mar 7, 2024
e613c48
Create quake3e.md
KG7x Mar 26, 2024
d0f5dee
Strip cl_aviPipeFormat
KG7x Mar 26, 2024
d11730a
Update quake3e.htm
KG7x Mar 26, 2024
f9ca298
Merge pull request #276 from KG7x/master
ec- Mar 26, 2024
526944c
Win32: report actual color bits and correct PFD count
ec- Apr 14, 2024
e7884db
OpenGL: fix environment-mapping texcoords in VBO shaders
ec- Apr 14, 2024
63bdea7
Fix server resource leaks during client reconnect
Chomenor May 22, 2024
2baff41
Merge pull request #281 from Chomenor/reconnect_fix
ec- May 23, 2024
ed4af16
server: don't spawn loading clients during map restart
ec- May 25, 2024
3cadc15
Fix 64-bit build warnings
ec- May 25, 2024
7968078
some fixes in build system
KG7x May 26, 2024
b4c5001
Fix grep warnings in macOS builds
KG7x May 26, 2024
2db55b8
Update
KG7x May 26, 2024
14b5e21
server: don't change serverid during map restart
Chomenor May 26, 2024
250179b
Merge pull request #283 from Chomenor/map_restart_static_serverid
ec- May 27, 2024
ceaa373
server: bring back global sv.restartedServerId to avoid potential fal…
ec- May 27, 2024
3bad6ca
server: set client state to CS_CONNECTED during UDP downloads
Chomenor May 29, 2024
266d270
Merge pull request #284 from Chomenor/download_cs_connected
ec- May 29, 2024
38c37ea
Merge pull request #285 from KG7x/KG7x-patch
ec- May 29, 2024
a740cfc
Use nanosleep(2) instead of usleep(3)
alanzhao1 Jun 5, 2024
f8e7b42
server: reworked gamestate retransmission/acknowledgment
ec- Jun 7, 2024
769b69a
Merge pull request #288 from alanzhao1/feature/nanosleep
ec- Jun 7, 2024
68b1e58
Allow src and dest buffers to be overlapped in Q_strncpy() for QVM co…
ec- Jun 7, 2024
c6fe6cf
server: print exact reason of gamestate resending
ec- Jun 8, 2024
9fd02e4
server: do not issue new serverId at map restart
ec- Jun 10, 2024
909ac2b
server: do not send snapshots until client acknowledged gamestate
ec- Jun 18, 2024
8567b04
client: rewrote CL_WritePacket() to allow proper packet duplication -…
ec- Jun 19, 2024
ee60b5d
Spelling fixes
ec- Jun 19, 2024
8d1636c
client: send pending fragments before queueing new ones
ec- Jun 26, 2024
413e2fb
server: cache sv_maxclients value to avoid potential crashes caused b…
ec- Jun 27, 2024
14e33fb
revert "server: do not send snapshots until client acknowledged games…
ec- Jun 27, 2024
f0c43d3
server: optimized gamestate acknowledge
ec- Jul 12, 2024
0c26ee3
Vulkan: enable vertexPipelineStoresAndAtomics along with fragmentStor…
ec- Jul 27, 2024
6bf3d62
Use SDL_WINDOW_FULLSCREEN_DESKTOP on macOS
johannes87 Aug 3, 2024
f5122f4
Merge pull request #295 from johannes87/macos-fullscreen-fix
ec- Aug 24, 2024
e4d7d3a
server: optimize certain gamestate acknowledge cases
ec- Aug 27, 2024
959876a
server: fix ack condition
ec- Aug 28, 2024
b6e7ce4
server: track configstring updates for CS_CONNECTED clients
ec- Aug 29, 2024
054904d
misc: improved 'wait' command handling
ec- Sep 6, 2024
d3dd892
corrected definition
ec- Sep 6, 2024
da163fa
server: suppress false hitch warning during map load
ec- Sep 21, 2024
5702d55
server: handle "wait" delays during map startup, this should provide …
ec- Oct 4, 2024
1719764
update changelog
ec- Oct 14, 2024
84f3130
GithubAction: add macos-aarch64 release artifacts
ec- Oct 14, 2024
27bf0ae
Increase default geometric detail on characters and patches
Calinou Oct 17, 2024
2efc3b5
Merge pull request #300 from Calinou/increase-geometric-detail
ec- Oct 18, 2024
734cea5
Increase default `cl_maxpackets` to 125
Calinou Oct 17, 2024
930538d
Merge pull request #299 from Calinou/increase-maxpackets-snaps
ec- Oct 19, 2024
91fed06
use -j = threads cpu (more correctly for future)
KG7x Oct 25, 2024
9c68e47
add info for windows/msys2
KG7x Oct 25, 2024
df3b121
Merge pull request #302 from KG7x/patch-2
ec- Oct 26, 2024
f259765
Merge pull request #301 from KG7x/patch-1
ec- Oct 26, 2024
81bc2fc
Implement r_teleporterFlash cvar
drjaska Nov 10, 2024
a3b19a3
Merge pull request #303 from drjaska/master
ec- Nov 11, 2024
3a5601b
win32: use GlobalMemoryStatusEx() on modern platforms for Sys_LowPhys…
ec- Nov 11, 2024
95b0601
paste text on CMD-v
Nov 24, 2024
024a3b0
Print messages about missing sounds in developer mode only.
Dec 1, 2024
4de47f8
Merge pull request #306 from snems/master
ec- Dec 17, 2024
60a0f69
Merge branch 'master' into command-v-paste
Dec 18, 2024
0d48d97
OpenGL: perform alpha tests after vertex color multiplication in VBO …
ec- Dec 23, 2024
d523bb4
fix gcc compiler warnings
ec- Dec 23, 2024
f5b387e
Filesystem: allow scanning external directories recursively via FS_MA…
ec- Jan 4, 2025
3c9f9d3
server: don't allow active clients to start downloads
Chomenor Jan 10, 2025
4b6c96e
Merge pull request #313 from Chomenor/download_active_check
ec- Jan 11, 2025
d42f86e
Renderers: fix 1-frame delayed rendering stats with \r_speeds=1
ec- Jan 17, 2025
6b99936
Fixed GCC compiler warnings
ec- Jan 17, 2025
9d8d9a0
fixed GCC compiler warnings
ec- Jan 17, 2025
f7fb7f7
Vulkan: fixed (recently broken) command buffer indexing
ec- Jan 17, 2025
7b0787d
server: delta snapshot developer print fix
Chomenor Jan 17, 2025
66550f1
Vulkan: revert "batch image uploads whenever possible", add more debu…
ec- Jan 25, 2025
5aa9e75
fixed MINGW compiler warnings in debug build
ec- Jan 25, 2025
a33f41f
Merge pull request #317 from Chomenor/delta_print_fix
ec- Jan 25, 2025
01eaea8
win32: try to minimize game window at break point, useful when debugg…
ec- Jan 25, 2025
8aa6fa1
QVM: reuse rounded up data segment space for extra pStack if possible
ec- Jan 25, 2025
424b3fb
Revert "server: delta snapshot developer print fix"
ec- Jan 26, 2025
16643ae
Merge branch 'master' into command-v-paste
gsalsero Mar 14, 2025
503eeba
cmd + v is only available on macos
gsalsero Mar 14, 2025
2481921
Merge pull request #322 from gsalsero/command-v-paste
ec- Mar 14, 2025
6e84c8c
FS: add "." and ".." at the end of list for Sys_ListFiles() for mod c…
ec- Mar 23, 2025
2ca9eb9
FS: more correct strgtr() compatibility
ec- Mar 24, 2025
4c531b9
Server: reset \sv_maxclients modified flag after startup, fixes #320
ec- Apr 5, 2025
ada9f42
QVM: added trap_Cvar_SetDescription_Q3E(const char *name, const char …
ec- Apr 14, 2025
d31b84e
Vulkan: implement image upload queue
ec- Apr 20, 2025
283b7f6
GitHub Actions: update ubuntu version
ec- Apr 20, 2025
2169b1c
Vulkan: handle VK_ERROR_OUT_OF_DATE_KHR more properly during swapchai…
ec- Apr 21, 2025
48cec05
Vulkan: fixed compiler warnings
ec- Apr 22, 2025
9e17aec
server: improved gamestate acknowledge function
ec- May 3, 2025
e4a88f9
Vulkan: do not print presentation info at swapchain restart
ec- May 3, 2025
871e225
Vulkan: use dedicated rendering finished semaphore for each swapchain…
ec- May 8, 2025
a83bd43
Renderers: correct tcMod transform for indexed lightmaps with \r_merg…
ec- May 17, 2025
829e879
Vulkan: fix swapchain re-creation regression, introduced in e4a88f9a2…
ec- May 28, 2025
ef1f50f
Renderers: fix grates on map tscabdm3
ec- May 30, 2025
4a6f688
Merge remote-tracking branch 'upstream/master'
JKSunny May 30, 2025
7754c3a
Vulkan: Add auto-generated shader binding and add identity and fixed …
JKSunny May 31, 2025
e8f3cdb
Vulkan: Resolve broken merge changes
JKSunny May 31, 2025
f5b7361
Vulkan move camera uniform to separate binding instead of dedicated d…
JKSunny May 31, 2025
ce60e78
Renderers: reworked lighting stage detection to fix all known issues
ec- May 31, 2025
56f97da
Vulkan: Fix typo in SPIR-V compiler
JKSunny Jun 1, 2025
a2be05b
Renderers: reworked lighting stage detection to fix all known issues …
JKSunny Jun 1, 2025
4f44c5b
Vulkan: Forgot to commit updated shader binding on recent commit (56f…
JKSunny Jun 1, 2025
a305d5a
Vulkan: Add multithreaded SPIR-V shader compiler support
JKSunny Jun 3, 2025
0d29dc2
Vulkan: Remove stray prototyping variable from multithreaded SPIR-V s…
JKSunny Jun 4, 2025
dc9b09d
Renderers: improved dlight stage selection
ec- Jun 6, 2025
9215b5e
Merge remote-tracking branch 'upstream/master' into merge-upstream
JKSunny Jun 7, 2025
767223e
Vulkan: Remove dedicated pbr desciptor binding method
JKSunny Jun 7, 2025
814f2b5
Vulkan: use larger staging/geometry buffers by default if possible
ec- Jun 19, 2025
c6e32e3
Merge remote-tracking branch 'upstream/master' into merge-upstream
JKSunny Jun 20, 2025
091c0c3
Fix Windows-GCC compile
KG7x Jul 28, 2025
55a5be3
Fixes MSVC builds
KG7x Jul 28, 2025
f0708b5
More correctly for MSYS2 builds & set macos-14
KG7x Aug 5, 2025
ec21adc
Merge pull request #339 from KG7x/KG7x-Fixes
ec- Aug 11, 2025
512a2f4
Vulkan: disable USE_UPLOAD_QUEUE as it causes VK_UNKNOWN_ERROR when d…
ec- Sep 11, 2025
cdb374e
Makefile: disable unsafe FP optimizations for QVM modules (mostly for…
ec- Sep 13, 2025
6e4b533
use minimal msys32 toolchain
ec- Sep 13, 2025
e09da3b
remove explicit CC setup
ec- Sep 13, 2025
ed6e5bd
Merge pull request #342 from ec-/msys32
ec- Sep 13, 2025
f1e35dd
Makefile: override CC passed from command line
ec- Sep 13, 2025
894f6d8
fix uploading artifacts
ec- Sep 13, 2025
11d406d
correct yml syntax
ec- Sep 13, 2025
20e0ecc
switch to 'main' branch to be more fork-friendly for GithubActions
ec- Sep 14, 2025
8298a47
Win32: comment some functions for dedicated builds
ec- Sep 14, 2025
c97f4db
Fix msys2 workflows for x86
KG7x Sep 18, 2025
f8e42ce
Add arm64 Ubuntu build
KG7x Sep 18, 2025
ebdd00e
Merge pull request #343 from KG7x/Fixes
ec- Sep 18, 2025
0edad54
fix: crash when viewing scores after changing model in-game
Jelvan1 Oct 3, 2025
d7a4227
Merge pull request #346 from Jelvan1/fix-model-crash
ec- Oct 3, 2025
87376f5
FS: reworked FS_LoadLibrary() to use predefined search paths only, no…
ec- Oct 7, 2025
050b7f4
Renderers: added support for 'dlight' shader stage keyword to overrid…
ec- Oct 13, 2025
a0d5bd0
Update sv_master2
ec- Oct 13, 2025
8cd90fa
Update changelog
ec- Oct 14, 2025
1377564
Win32: use GetKeyState() instead of GetAsyncKeyState()
ec- Oct 16, 2025
2ba2cfe
IN: sync modifier keys with SDL state
Squizoff Nov 1, 2025
699593b
Fix name
Squizoff Nov 1, 2025
0c3df55
fix github.com/ec-/Quake3e/issues/350
Squizoff Nov 1, 2025
da7ad76
Merge pull request #352 from Squizoff/main
ec- Nov 1, 2025
6adadd4
Renderers: fixed compiler warning
ec- Nov 8, 2025
baf79db
Merge remote-tracking branch 'upstream/main' into merge-upstream
JKSunny Nov 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
233 changes: 164 additions & 69 deletions .github/workflows/build.yml

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ To compile with Vulkan backend - clean solution, right click on `quake3e` projec

---

### windows/msys2

Install the build dependencies:

`MSYS2 MSYS`

* pacman -Syu
* pacman -S make mingw-w64-x86_64-gcc mingw-w64-i686-gcc

Use `MSYS2 MINGW32` or `MSYS2 MINGW64` depending on your target system, then copy resulting binaries from created `build` directory or use command:

`make install DESTDIR=<path_to_game_files>`

---

### windows/mingw

All build dependencies (libraries, headers) are bundled-in
Expand Down
119 changes: 89 additions & 30 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ endif

ifeq ($(COMPILE_PLATFORM),darwin)
USE_SDL=1
USE_LOCAL_HEADERS=1
USE_RENDERER_DLOPEN = 0
endif

ifeq ($(COMPILE_PLATFORM),cygwin)
Expand Down Expand Up @@ -205,6 +207,7 @@ R1DIR=$(MOUNT_DIR)/renderer
R2DIR=$(MOUNT_DIR)/renderer2
RVDIR=$(MOUNT_DIR)/renderervk
SDLDIR=$(MOUNT_DIR)/sdl
SDLHDIR=$(MOUNT_DIR)/libsdl/include/SDL2

CMDIR=$(MOUNT_DIR)/qcommon
UDIR=$(MOUNT_DIR)/unix
Expand Down Expand Up @@ -234,8 +237,8 @@ ifneq ($(call bin_path, $(PKG_CONFIG)),)
OGG_LIBS ?= $(shell $(PKG_CONFIG) --silence-errors --libs ogg || echo -logg)
endif
ifeq ($(USE_SYSTEM_VORBIS),1)
VORBIS_CFLAGS ?= $(shell $(PKG_CONFIG) --silence-errors --cflags vorbis || true)
VORBIS_LIBS ?= $(shell $(PKG_CONFIG) --silence-errors --libs vorbis || echo -lvorbis)
VORBIS_CFLAGS ?= $(shell $(PKG_CONFIG) --silence-errors --cflags vorbisfile || true)
VORBIS_LIBS ?= $(shell $(PKG_CONFIG) --silence-errors --libs vorbisfile || echo -lvorbisfile)
endif
endif

Expand Down Expand Up @@ -264,13 +267,17 @@ ifeq ($(USE_SYSTEM_OGG),1)
endif
ifeq ($(USE_SYSTEM_VORBIS),1)
ifeq ($(VORBIS_LIBS),)
VORBIS_LIBS = -lvorbis
VORBIS_LIBS = -lvorbisfile
endif
endif

# extract version info
ifneq ($(COMPILE_PLATFORM),darwin)
VERSION=$(shell grep ".\+define[ \t]\+Q3_VERSION[ \t]\+\+" $(CMDIR)/q_shared.h | \
sed -e 's/.*".* \([^ ]*\)"/\1/')
else
VERSION=1.32e
endif

# common qvm definition
ifeq ($(ARCH),x86_64)
Expand Down Expand Up @@ -353,24 +360,30 @@ ifdef MINGW
# If CC is already set to something generic, we probably want to use
# something more specific
ifneq ($(findstring $(strip $(CC)),cc gcc),)
CC=
override CC=
endif

ifneq ($(findstring $(strip $(STRIP)),strip),)
override STRIP=
endif

# We need to figure out the correct gcc and windres
ifeq ($(ARCH),x86_64)
MINGW_PREFIXES=x86_64-w64-mingw32 amd64-mingw32msvc
STRIP=x86_64-w64-mingw32-strip
endif
ifeq ($(ARCH),x86)
MINGW_PREFIXES=i686-w64-mingw32 i586-mingw32msvc i686-pc-mingw32
endif

ifndef CC
CC=$(firstword $(strip $(foreach MINGW_PREFIX, $(MINGW_PREFIXES), \
override CC=$(firstword $(strip $(foreach MINGW_PREFIX, $(MINGW_PREFIXES), \
$(call bin_path, $(MINGW_PREFIX)-gcc))))
endif

# STRIP=$(MINGW_PREFIX)-strip -g
ifndef STRIP
override STRIP=$(firstword $(strip $(foreach MINGW_PREFIX, $(MINGW_PREFIXES), \
$(call bin_path, $(MINGW_PREFIX)-strip))))
endif

ifndef WINDRES
WINDRES=$(firstword $(strip $(foreach MINGW_PREFIX, $(MINGW_PREFIXES), \
Expand All @@ -380,7 +393,7 @@ ifdef MINGW
# Some MinGW installations define CC to cc, but don't actually provide cc,
# so check that CC points to a real binary and use gcc if it doesn't
ifeq ($(call bin_path, $(CC)),)
CC=gcc
override CC=gcc
endif

endif
Expand Down Expand Up @@ -415,15 +428,15 @@ ifdef MINGW

BINEXT = .exe

LDFLAGS = -mwindows -Wl,--dynamicbase -Wl,--nxcompat
LDFLAGS += -mwindows -Wl,--dynamicbase -Wl,--nxcompat
LDFLAGS += -Wl,--gc-sections -fvisibility=hidden
LDFLAGS += -lwsock32 -lgdi32 -lwinmm -lole32 -lws2_32 -lpsapi -lcomctl32
LDFLAGS += -flto

CLIENT_LDFLAGS=$(LDFLAGS)

ifeq ($(USE_SDL),1)
BASE_CFLAGS += -DUSE_LOCAL_HEADERS=1 -I$(MOUNT_DIR)/libsdl/windows/include/SDL2
BASE_CFLAGS += -DUSE_LOCAL_HEADERS=1 -I$(SDLHDIR)
#CLIENT_CFLAGS += -DUSE_LOCAL_HEADERS=1
ifeq ($(ARCH),x86)
CLIENT_LDFLAGS += -L$(MOUNT_DIR)/libsdl/windows/mingw/lib32
Expand All @@ -443,7 +456,7 @@ ifdef MINGW
else
CLIENT_LDFLAGS += -L$(MOUNT_DIR)/libcurl/windows/mingw/lib64
endif
CLIENT_LDFLAGS += -lcurl -lwldap32 -lcrypt32
CLIENT_LDFLAGS += -lcurl -lz -lcrypt32
endif

ifeq ($(USE_OGG_VORBIS),1)
Expand All @@ -466,20 +479,40 @@ ifeq ($(COMPILE_PLATFORM),darwin)

BASE_CFLAGS += -Wno-unused-result

BASE_CFLAGS += -DMACOS_X

OPTIMIZE = -O2 -fvisibility=hidden

SHLIBEXT = dylib
SHLIBCFLAGS = -fPIC -fvisibility=hidden
SHLIBLDFLAGS = -dynamiclib $(LDFLAGS)

LDFLAGS =
ARCHEXT = .$(ARCH)

LDFLAGS +=

ifeq ($(ARCH),x86_64)
BASE_CFLAGS += -arch x86_64
LDFLAGS += -arch x86_64
endif
ifeq ($(ARCH),aarch64)
BASE_CFLAGS += -arch arm64
LDFLAGS += -arch arm64
endif

ifeq ($(USE_LOCAL_HEADERS),1)
MACLIBSDIR=$(MOUNT_DIR)/libsdl/macosx
BASE_CFLAGS += -I$(SDLHDIR)
CLIENT_LDFLAGS += $(MACLIBSDIR)/libSDL2-2.0.0.dylib
CLIENT_EXTRA_FILES += $(MACLIBSDIR)/libSDL2-2.0.0.dylib
else
ifneq ($(SDL_INCLUDE),)
BASE_CFLAGS += $(SDL_INCLUDE)
CLIENT_LDFLAGS = $(SDL_LIBS)
else
BASE_CFLAGS += -I/Library/Frameworks/SDL2.framework/Headers
CLIENT_LDFLAGS = -F/Library/Frameworks -framework SDL2
CLIENT_LDFLAGS += -F/Library/Frameworks -framework SDL2
endif
endif

ifeq ($(USE_SYSTEM_JPEG),1)
Expand Down Expand Up @@ -531,7 +564,7 @@ else
SHLIBCFLAGS = -fPIC -fvisibility=hidden
SHLIBLDFLAGS = -shared $(LDFLAGS)

LDFLAGS = -lm
LDFLAGS += -lm
LDFLAGS += -Wl,--gc-sections -fvisibility=hidden

ifeq ($(USE_SDL),1)
Expand Down Expand Up @@ -622,6 +655,11 @@ $(echo_cmd) "CC $<"
$(Q)$(CC) $(CFLAGS) -o $@ -c $<
endef

define DO_CC_QVM
$(echo_cmd) "CC_QVM $<"
$(Q)$(CC) $(CFLAGS) -fno-fast-math -o $@ -c $<
endef

define DO_REND_CC
$(echo_cmd) "REND_CC $<"
$(Q)$(CC) $(CFLAGS) $(RENDCFLAGS) -o $@ -c $<
Expand All @@ -648,6 +686,11 @@ $(echo_cmd) "DED_CC $<"
$(Q)$(CC) $(CFLAGS) -DDEDICATED -o $@ -c $<
endef

define DO_DED_CC_QVM
$(echo_cmd) "DED_CC_QVM $<"
$(Q)$(CC) $(CFLAGS) -fno-fast-math -DDEDICATED -o $@ -c $<
endef

define DO_WINDRES
$(echo_cmd) "WINDRES $<"
$(Q)$(WINDRES) -i $< -o $@
Expand Down Expand Up @@ -704,6 +747,7 @@ targets: makedirs tools
@echo " COMPILE_ARCH: $(COMPILE_ARCH)"
ifdef MINGW
@echo " WINDRES: $(WINDRES)"
@echo " STRIP: $(STRIP)"
endif
@echo " CC: $(CC)"
@echo ""
Expand All @@ -726,7 +770,7 @@ endif
makedirs:
@if [ ! -d $(BUILD_DIR) ];then $(MKDIR) $(BUILD_DIR);fi
@if [ ! -d $(B) ];then $(MKDIR) $(B);fi
@if [ ! -d $(B)/client ];then $(MKDIR) $(B)/client;fi
@if [ ! -d $(B)/client ];then $(MKDIR) $(B)/client/qvm;fi
@if [ ! -d $(B)/client/jpeg ];then $(MKDIR) $(B)/client/jpeg;fi
ifeq ($(USE_SYSTEM_OGG),0)
@if [ ! -d $(B)/client/ogg ];then $(MKDIR) $(B)/client/ogg;fi
Expand All @@ -739,7 +783,7 @@ endif
@if [ ! -d $(B)/rend2/glsl ];then $(MKDIR) $(B)/rend2/glsl;fi
@if [ ! -d $(B)/rendv ];then $(MKDIR) $(B)/rendv;fi
ifneq ($(BUILD_SERVER),0)
@if [ ! -d $(B)/ded ];then $(MKDIR) $(B)/ded;fi
@if [ ! -d $(B)/ded ];then $(MKDIR) $(B)/ded/qvm;fi
endif

#############################################################################
Expand Down Expand Up @@ -1043,8 +1087,6 @@ Q3OBJ = \
\
$(B)/client/unzip.o \
$(B)/client/puff.o \
$(B)/client/vm.o \
$(B)/client/vm_interpreted.o \
\
$(B)/client/be_aas_bspq3.o \
$(B)/client/be_aas_cluster.o \
Expand Down Expand Up @@ -1105,18 +1147,27 @@ ifndef MINGW
endif
endif

ifeq ($(ARCH),x86_64)
Q3OBJ += \
$(B)/client/snd_mix_x86_64.o
endif

Q3OBJ += \
$(B)/client/qvm/vm.o \
$(B)/client/qvm/vm_interpreted.o

ifeq ($(HAVE_VM_COMPILED),true)
ifeq ($(ARCH),x86)
Q3OBJ += $(B)/client/vm_x86.o
Q3OBJ += $(B)/client/qvm/vm_x86.o
endif
ifeq ($(ARCH),x86_64)
Q3OBJ += $(B)/client/vm_x86.o
Q3OBJ += $(B)/client/qvm/vm_x86.o
endif
ifeq ($(ARCH),arm)
Q3OBJ += $(B)/client/vm_armv7l.o
Q3OBJ += $(B)/client/qvm/vm_armv7l.o
endif
ifeq ($(ARCH),aarch64)
Q3OBJ += $(B)/client/vm_aarch64.o
Q3OBJ += $(B)/client/qvm/vm_aarch64.o
endif
endif

Expand Down Expand Up @@ -1194,8 +1245,7 @@ endif # !MINGW

$(B)/$(TARGET_CLIENT): $(Q3OBJ)
$(echo_cmd) "LD $@"
$(Q)$(CC) -o $@ $(Q3OBJ) $(CLIENT_LDFLAGS) \
$(LDFLAGS)
$(Q)$(CC) -o $@ $(Q3OBJ) $(CLIENT_LDFLAGS) $(LDFLAGS)

# modular renderers

Expand Down Expand Up @@ -1254,8 +1304,6 @@ Q3DOBJ = \
$(B)/ded/q_shared.o \
\
$(B)/ded/unzip.o \
$(B)/ded/vm.o \
$(B)/ded/vm_interpreted.o \
\
$(B)/ded/be_aas_bspq3.o \
$(B)/ded/be_aas_cluster.o \
Expand Down Expand Up @@ -1299,22 +1347,27 @@ else
$(B)/ded/unix_shared.o
endif

Q3DOBJ += \
$(B)/ded/qvm/vm.o \
$(B)/ded/qvm/vm_interpreted.o

ifeq ($(HAVE_VM_COMPILED),true)
ifeq ($(ARCH),x86)
Q3DOBJ += $(B)/ded/vm_x86.o
Q3DOBJ += $(B)/ded/qvm/vm_x86.o
endif
ifeq ($(ARCH),x86_64)
Q3DOBJ += $(B)/ded/vm_x86.o
Q3DOBJ += $(B)/ded/qvm/vm_x86.o
endif
ifeq ($(ARCH),arm)
Q3DOBJ += $(B)/ded/vm_armv7l.o
Q3DOBJ += $(B)/ded/qvm/vm_armv7l.o
endif
ifeq ($(ARCH),aarch64)
Q3DOBJ += $(B)/ded/vm_aarch64.o
Q3DOBJ += $(B)/ded/qvm/vm_aarch64.o
endif
endif

$(B)/$(TARGET_SERVER): $(Q3DOBJ)
$(echo_cmd) $(Q3DOBJ)
$(echo_cmd) "LD $@"
$(Q)$(CC) -o $@ $(Q3DOBJ) $(LDFLAGS)

Expand All @@ -1334,6 +1387,9 @@ $(B)/client/%.o: $(SDIR)/%.c
$(B)/client/%.o: $(CMDIR)/%.c
$(DO_CC)

$(B)/client/qvm/%.o: $(CMDIR)/%.c
$(DO_CC_QVM)

$(B)/client/%.o: $(BLIBDIR)/%.c
$(DO_BOT_CC)

Expand Down Expand Up @@ -1400,6 +1456,9 @@ $(B)/ded/%.o: $(SDIR)/%.c
$(B)/ded/%.o: $(CMDIR)/%.c
$(DO_DED_CC)

$(B)/ded/qvm/%.o: $(CMDIR)/%.c
$(DO_DED_CC_QVM)

$(B)/ded/%.o: $(BLIBDIR)/%.c
$(DO_BOT_CC)

Expand Down
Loading