2009-02-28 14:41:18 +00:00
|
|
|
# ------------------------------------------------------ #
|
|
|
|
# Makefile for the "Yamagi Quake 2 Client" #
|
|
|
|
# #
|
|
|
|
# Just type "make" to compile the #
|
2018-08-14 13:01:45 +00:00
|
|
|
# - Client (quake2) #
|
2010-10-18 15:08:13 +00:00
|
|
|
# - Server (q2ded) #
|
2011-10-09 16:55:23 +00:00
|
|
|
# - Quake II Game (baseq2) #
|
2018-08-14 13:01:45 +00:00
|
|
|
# - Renderer libraries (gl1, gl3, soft) #
|
2009-02-28 14:41:18 +00:00
|
|
|
# #
|
2012-04-25 09:32:11 +00:00
|
|
|
# Base dependencies: #
|
2018-07-23 13:52:48 +00:00
|
|
|
# - SDL 2.0 #
|
2009-02-28 14:41:18 +00:00
|
|
|
# - libGL #
|
2021-01-10 17:55:42 +00:00
|
|
|
# - Vulkan headers #
|
2009-02-28 14:41:18 +00:00
|
|
|
# #
|
2018-08-14 13:01:45 +00:00
|
|
|
# Optional dependencies: #
|
2020-03-09 09:06:32 +00:00
|
|
|
# - CURL #
|
2014-01-27 16:32:12 +00:00
|
|
|
# - OpenAL #
|
|
|
|
# #
|
2009-02-28 14:41:18 +00:00
|
|
|
# Platforms: #
|
|
|
|
# - FreeBSD #
|
2012-08-22 15:58:00 +00:00
|
|
|
# - Linux #
|
2021-01-10 17:55:42 +00:00
|
|
|
# - NetBSD #
|
2012-08-22 15:58:00 +00:00
|
|
|
# - OpenBSD #
|
2015-03-21 07:39:55 +00:00
|
|
|
# - OS X #
|
2012-06-05 08:37:34 +00:00
|
|
|
# - Windows (MinGW) #
|
2012-04-29 13:57:33 +00:00
|
|
|
# ------------------------------------------------------ #
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2021-01-10 17:55:42 +00:00
|
|
|
# Variables
|
|
|
|
# ---------
|
|
|
|
|
|
|
|
# - ASAN: Builds with address sanitizer, includes DEBUG.
|
|
|
|
# - DEBUG: Builds a debug build, forces -O0 and adds debug symbols.
|
|
|
|
# - VERBOSE: Prints full compile, linker and misc commands.
|
|
|
|
# - UBSAN: Builds with undefined behavior sanitizer, includes DEBUG.
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2012-04-25 09:32:11 +00:00
|
|
|
# User configurable options
|
|
|
|
# -------------------------
|
|
|
|
|
2018-11-20 17:15:19 +00:00
|
|
|
# Enables HTTP support through cURL. Used for
|
|
|
|
# HTTP download.
|
|
|
|
WITH_CURL:=yes
|
|
|
|
|
2012-04-29 13:54:15 +00:00
|
|
|
# Enables the optional OpenAL sound system.
|
2012-06-05 07:56:37 +00:00
|
|
|
# To use it your system needs libopenal.so.1
|
2012-09-14 09:21:02 +00:00
|
|
|
# or openal32.dll (we recommend openal-soft)
|
2012-06-05 07:56:37 +00:00
|
|
|
# installed
|
|
|
|
WITH_OPENAL:=yes
|
2012-04-25 10:09:30 +00:00
|
|
|
|
2020-03-10 08:18:25 +00:00
|
|
|
# Sets an RPATH to $ORIGIN/lib. It can be used to
|
|
|
|
# inject custom libraries, e.g. a patches libSDL.so
|
|
|
|
# or libopenal.so. Not supported on Windows.
|
|
|
|
WITH_RPATH:=yes
|
|
|
|
|
|
|
|
# Enable systemwide installation of game assets.
|
2012-04-29 13:54:15 +00:00
|
|
|
WITH_SYSTEMWIDE:=no
|
2012-06-04 07:51:17 +00:00
|
|
|
|
2012-09-14 09:21:02 +00:00
|
|
|
# This will set the default SYSTEMDIR, a non-empty string
|
2012-06-05 09:12:23 +00:00
|
|
|
# would actually be used. On Windows normals slashes (/)
|
2014-01-01 09:32:27 +00:00
|
|
|
# instead of backslashed (\) should be used! The string
|
|
|
|
# MUST NOT be surrounded by quotation marks!
|
|
|
|
WITH_SYSTEMDIR:=""
|
2012-04-29 13:54:15 +00:00
|
|
|
|
2015-03-21 07:39:55 +00:00
|
|
|
# This will set the build options to create an MacOS .app-bundle.
|
|
|
|
# The app-bundle itself will not be created, but the runtime paths
|
|
|
|
# will be set to expect the game-data in *.app/
|
|
|
|
# Contents/Resources
|
|
|
|
OSX_APP:=yes
|
|
|
|
|
2014-02-16 19:03:10 +00:00
|
|
|
# This is an optional configuration file, it'll be used in
|
|
|
|
# case of presence.
|
2020-03-09 09:08:58 +00:00
|
|
|
CONFIG_FILE:=config.mk
|
2014-02-16 19:03:10 +00:00
|
|
|
|
2014-02-26 19:40:17 +00:00
|
|
|
# ----------
|
|
|
|
|
2014-02-16 19:03:10 +00:00
|
|
|
# In case a of a configuration file being present, we'll just use it
|
|
|
|
ifeq ($(wildcard $(CONFIG_FILE)), $(CONFIG_FILE))
|
|
|
|
include $(CONFIG_FILE)
|
|
|
|
endif
|
2012-04-25 09:32:11 +00:00
|
|
|
|
2012-06-03 09:18:26 +00:00
|
|
|
# Detect the OS
|
|
|
|
ifdef SystemRoot
|
2020-03-09 09:08:58 +00:00
|
|
|
YQ2_OSTYPE ?= Windows
|
2012-06-03 09:18:26 +00:00
|
|
|
else
|
2017-04-02 13:58:35 +00:00
|
|
|
YQ2_OSTYPE ?= $(shell uname -s)
|
2012-06-03 09:18:26 +00:00
|
|
|
endif
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2014-01-27 16:32:12 +00:00
|
|
|
# Special case for MinGW
|
2017-04-02 13:58:35 +00:00
|
|
|
ifneq (,$(findstring MINGW,$(YQ2_OSTYPE)))
|
2020-03-24 12:37:31 +00:00
|
|
|
YQ2_OSTYPE := Windows
|
2014-01-27 16:32:12 +00:00
|
|
|
endif
|
|
|
|
|
2012-06-03 09:18:26 +00:00
|
|
|
# Detect the architecture
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
2021-01-09 15:59:46 +00:00
|
|
|
ifdef MINGW_CHOST
|
|
|
|
ifeq ($(MINGW_CHOST), x86_64-w64-mingw32)
|
|
|
|
YQ2_ARCH ?= x86_64
|
|
|
|
else # i686-w64-mingw32
|
|
|
|
YQ2_ARCH ?= i386
|
|
|
|
endif
|
|
|
|
else # windows, but MINGW_CHOST not defined
|
2016-06-08 17:10:43 +00:00
|
|
|
ifdef PROCESSOR_ARCHITEW6432
|
|
|
|
# 64 bit Windows
|
2017-04-02 13:58:35 +00:00
|
|
|
YQ2_ARCH ?= $(PROCESSOR_ARCHITEW6432)
|
2012-06-03 09:18:26 +00:00
|
|
|
else
|
2016-06-08 17:10:43 +00:00
|
|
|
# 32 bit Windows
|
2017-04-02 13:58:35 +00:00
|
|
|
YQ2_ARCH ?= $(PROCESSOR_ARCHITECTURE)
|
2012-06-03 09:18:26 +00:00
|
|
|
endif
|
2021-01-09 15:59:46 +00:00
|
|
|
endif # windows but MINGW_CHOST not defined
|
2016-06-08 17:10:43 +00:00
|
|
|
else
|
2021-07-03 15:02:58 +00:00
|
|
|
ifneq ($(YQ2_OSTYPE), Darwin)
|
2017-04-02 13:58:35 +00:00
|
|
|
# Normalize some abiguous YQ2_ARCH strings
|
2022-05-20 10:51:39 +00:00
|
|
|
YQ2_ARCH ?= $(shell uname -m | sed -e 's/i.86/i386/' -e 's/amd64/x86_64/' -e 's/arm64/aarch64/' -e 's/^arm.*/arm/')
|
2021-07-03 15:02:58 +00:00
|
|
|
else
|
|
|
|
YQ2_ARCH ?= $(shell uname -m)
|
|
|
|
endif
|
2009-02-28 14:41:18 +00:00
|
|
|
endif
|
|
|
|
|
2017-09-21 16:15:12 +00:00
|
|
|
# Detect the compiler
|
|
|
|
ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang version"), 1)
|
|
|
|
COMPILER := clang
|
2018-08-14 13:01:45 +00:00
|
|
|
COMPILERVER := $(shell $(CC) -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/')
|
|
|
|
else ifeq ($(shell $(CC) -v 2>&1 | grep -c -E "(gcc version|gcc-Version)"), 1)
|
2017-09-21 16:15:12 +00:00
|
|
|
COMPILER := gcc
|
2018-08-14 13:01:45 +00:00
|
|
|
COMPILERVER := $(shell $(CC) -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/')
|
2017-09-21 16:15:12 +00:00
|
|
|
else
|
|
|
|
COMPILER := unknown
|
|
|
|
endif
|
|
|
|
|
2020-10-08 09:53:38 +00:00
|
|
|
# ASAN includes DEBUG
|
|
|
|
ifdef ASAN
|
|
|
|
DEBUG=1
|
|
|
|
endif
|
|
|
|
|
2021-01-10 17:55:42 +00:00
|
|
|
# UBSAN includes DEBUG
|
|
|
|
ifdef UBSAN
|
|
|
|
DEBUG=1
|
|
|
|
endif
|
|
|
|
|
2009-02-28 14:41:18 +00:00
|
|
|
# ----------
|
|
|
|
|
2020-03-09 08:37:29 +00:00
|
|
|
# Base CFLAGS. These may be overridden by the environment.
|
|
|
|
# Highest supported optimizations are -O2, higher levels
|
|
|
|
# will likely break this crappy code.
|
|
|
|
ifdef DEBUG
|
|
|
|
CFLAGS ?= -O0 -g -Wall -pipe
|
2020-10-08 09:53:38 +00:00
|
|
|
ifdef ASAN
|
2021-06-21 14:04:36 +00:00
|
|
|
override CFLAGS += -fsanitize=address -DUSE_SANITIZER
|
2020-10-08 09:53:38 +00:00
|
|
|
endif
|
2021-01-10 17:55:42 +00:00
|
|
|
ifdef UBSAN
|
2021-06-21 14:04:36 +00:00
|
|
|
override CFLAGS += -fsanitize=undefined -DUSE_SANITIZER
|
2021-01-10 17:55:42 +00:00
|
|
|
endif
|
2020-03-09 08:37:29 +00:00
|
|
|
else
|
|
|
|
CFLAGS ?= -O2 -Wall -pipe -fomit-frame-pointer
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Always needed are:
|
|
|
|
# -fno-strict-aliasing since the source doesn't comply
|
|
|
|
# with strict aliasing rules and it's next to impossible
|
|
|
|
# to get it there...
|
|
|
|
# -fwrapv for defined integer wrapping. MSVC6 did this
|
|
|
|
# and the game code requires it.
|
2020-10-08 09:58:14 +00:00
|
|
|
# -fvisibility=hidden to keep symbols hidden. This is
|
|
|
|
# mostly best practice and not really necessary.
|
2023-04-15 17:57:26 +00:00
|
|
|
override CFLAGS += -fno-strict-aliasing -fwrapv -fvisibility=hidden
|
2020-03-09 08:37:29 +00:00
|
|
|
|
|
|
|
# -MMD to generate header dependencies. Unsupported by
|
|
|
|
# the Clang shipped with OS X.
|
|
|
|
ifneq ($(YQ2_OSTYPE), Darwin)
|
2020-03-13 08:19:32 +00:00
|
|
|
override CFLAGS += -MMD
|
2020-03-09 08:37:29 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# OS X architecture.
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Darwin)
|
2020-04-21 11:57:09 +00:00
|
|
|
override CFLAGS += -arch $(YQ2_ARCH)
|
2015-03-21 07:39:55 +00:00
|
|
|
endif
|
2011-10-09 16:55:23 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2020-03-18 14:58:22 +00:00
|
|
|
# ARM needs a sane minimum architecture. We need the `yield`
|
|
|
|
# opcode, arm6k is the first iteration that supports it. arm6k
|
|
|
|
# is also the first Raspberry PI generation and older hardware
|
|
|
|
# is likely too slow to run the game. We're not enforcing the
|
|
|
|
# minimum architecture, but if you're build for something older
|
2020-04-03 06:24:40 +00:00
|
|
|
# like arm5 the `yield` opcode isn't compiled in and the game
|
|
|
|
# (especially q2ded) will consume more CPU time than necessary.
|
2020-03-18 14:58:22 +00:00
|
|
|
ifeq ($(YQ2_ARCH), arm)
|
|
|
|
CFLAGS += -march=armv6k
|
|
|
|
endif
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2018-08-14 13:01:45 +00:00
|
|
|
# Switch of some annoying warnings.
|
|
|
|
ifeq ($(COMPILER), clang)
|
|
|
|
# -Wno-missing-braces because otherwise clang complains
|
|
|
|
# about totally valid 'vec3_t bla = {0}' constructs.
|
2020-03-13 08:19:32 +00:00
|
|
|
override CFLAGS += -Wno-missing-braces
|
2018-08-14 13:01:45 +00:00
|
|
|
else ifeq ($(COMPILER), gcc)
|
|
|
|
# GCC 8.0 or higher.
|
|
|
|
ifeq ($(shell test $(COMPILERVER) -ge 80000; echo $$?),0)
|
|
|
|
# -Wno-format-truncation and -Wno-format-overflow
|
|
|
|
# because GCC spams about 50 false positives.
|
2020-03-13 08:19:32 +00:00
|
|
|
override CFLAGS += -Wno-format-truncation -Wno-format-overflow
|
2018-08-14 13:01:45 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2016-06-08 17:10:43 +00:00
|
|
|
# Defines the operating system and architecture
|
2020-03-13 08:19:32 +00:00
|
|
|
override CFLAGS += -DYQ2OSTYPE=\"$(YQ2_OSTYPE)\" -DYQ2ARCH=\"$(YQ2_ARCH)\"
|
2016-06-08 17:10:43 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2020-04-21 11:57:09 +00:00
|
|
|
# For reproduceable builds, look here for details:
|
2016-06-30 09:05:40 +00:00
|
|
|
# https://reproducible-builds.org/specs/source-date-epoch/
|
|
|
|
ifdef SOURCE_DATE_EPOCH
|
2020-03-13 08:19:32 +00:00
|
|
|
override CFLAGS += -DBUILD_DATE=\"$(shell date --utc --date="@${SOURCE_DATE_EPOCH}" +"%b %_d %Y" | sed -e 's/ /\\ /g')\"
|
2016-06-30 09:05:40 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2021-01-09 15:59:46 +00:00
|
|
|
# Using the default x87 float math on 32bit x86 causes rounding trouble
|
|
|
|
# -ffloat-store could work around that, but the better solution is to
|
|
|
|
# just enforce SSE - every x86 CPU since Pentium3 supports that
|
|
|
|
# and this should even improve the performance on old CPUs
|
2017-09-21 16:15:12 +00:00
|
|
|
ifeq ($(YQ2_ARCH), i386)
|
2021-01-09 15:59:46 +00:00
|
|
|
override CFLAGS += -msse -mfpmath=sse
|
2017-09-21 16:15:12 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Force SSE math on x86_64. All sane compilers should do this
|
|
|
|
# anyway, just to protect us from broken Linux distros.
|
|
|
|
ifeq ($(YQ2_ARCH), x86_64)
|
2020-03-13 08:19:32 +00:00
|
|
|
override CFLAGS += -mfpmath=sse
|
2017-09-21 16:15:12 +00:00
|
|
|
endif
|
|
|
|
|
2021-06-06 16:40:47 +00:00
|
|
|
# Disable floating-point expression contraction. While this shouldn't be
|
|
|
|
# a problem for C (only for C++) better be safe than sorry. See
|
|
|
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100839 for details.
|
|
|
|
ifeq ($(COMPILER), gcc)
|
|
|
|
override CFLAGS += -ffp-contract=off
|
|
|
|
endif
|
|
|
|
|
2017-09-21 16:15:12 +00:00
|
|
|
# ----------
|
|
|
|
|
2018-08-14 13:01:45 +00:00
|
|
|
# Systemwide installation.
|
2012-04-29 13:54:15 +00:00
|
|
|
ifeq ($(WITH_SYSTEMWIDE),yes)
|
2020-03-13 08:19:32 +00:00
|
|
|
override CFLAGS += -DSYSTEMWIDE
|
2012-04-29 13:54:15 +00:00
|
|
|
ifneq ($(WITH_SYSTEMDIR),"")
|
2020-03-13 08:19:32 +00:00
|
|
|
override CFLAGS += -DSYSTEMDIR=\"$(WITH_SYSTEMDIR)\"
|
2012-04-29 13:54:15 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2020-03-13 08:35:01 +00:00
|
|
|
# We don't support encrypted ZIP files.
|
|
|
|
ZIPCFLAGS := -DNOUNCRYPT
|
|
|
|
|
2018-02-20 08:42:45 +00:00
|
|
|
# Just set IOAPI_NO_64 on everything that's not Linux or Windows,
|
|
|
|
# otherwise minizip will use fopen64(), fseek64() and friends that
|
|
|
|
# may be unavailable. This is - of course - not really correct, in
|
|
|
|
# a better world we would set -DIOAPI_NO_64 to force everything to
|
|
|
|
# fopen(), fseek() and so on and -D_FILE_OFFSET_BITS=64 to let the
|
|
|
|
# libc headers do their work. Currently we can't do that because
|
|
|
|
# Quake II uses nearly everywere int instead of off_t...
|
|
|
|
#
|
|
|
|
# This may have the side effect that ZIP files larger than 2GB are
|
|
|
|
# unsupported. But I doubt that anyone has such large files, they
|
|
|
|
# would likely hit other internal limits.
|
|
|
|
ifneq ($(YQ2_OSTYPE),Windows)
|
|
|
|
ifneq ($(YQ2_OSTYPE),Linux)
|
|
|
|
ZIPCFLAGS += -DIOAPI_NO_64
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2018-08-14 13:01:45 +00:00
|
|
|
# Extra CFLAGS for SDL.
|
2013-08-25 22:55:31 +00:00
|
|
|
SDLCFLAGS := $(shell sdl2-config --cflags)
|
2011-10-09 16:55:23 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# Base include path.
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE),Linux)
|
2020-03-13 08:35:01 +00:00
|
|
|
INCLUDE ?= -I/usr/include
|
2017-04-02 13:58:35 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE),FreeBSD)
|
2020-03-13 08:35:01 +00:00
|
|
|
INCLUDE ?= -I/usr/local/include
|
2020-11-24 13:07:58 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE),NetBSD)
|
|
|
|
INCLUDE ?= -I/usr/X11R7/include -I/usr/pkg/include
|
2017-04-02 13:58:35 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE),OpenBSD)
|
2020-03-13 08:35:01 +00:00
|
|
|
INCLUDE ?= -I/usr/local/include
|
2017-04-02 13:58:35 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE),Windows)
|
2020-03-13 08:35:01 +00:00
|
|
|
INCLUDE ?= -I/usr/include
|
2012-04-29 13:57:33 +00:00
|
|
|
endif
|
2009-04-10 13:11:49 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2020-04-21 11:57:09 +00:00
|
|
|
# Base LDFLAGS. This is just the library path.
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE),Linux)
|
2020-03-09 08:53:54 +00:00
|
|
|
LDFLAGS ?= -L/usr/lib
|
2017-04-02 13:58:35 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE),FreeBSD)
|
2020-03-09 08:53:54 +00:00
|
|
|
LDFLAGS ?= -L/usr/local/lib
|
2020-11-24 13:07:58 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE),NetBSD)
|
2020-11-24 13:11:19 +00:00
|
|
|
LDFLAGS ?= -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib
|
2017-04-02 13:58:35 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE),OpenBSD)
|
2020-03-09 08:53:54 +00:00
|
|
|
LDFLAGS ?= -L/usr/local/lib
|
2017-04-02 13:58:35 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE),Windows)
|
2020-03-09 08:53:54 +00:00
|
|
|
LDFLAGS ?= -L/usr/lib
|
|
|
|
endif
|
|
|
|
|
2020-10-08 09:53:38 +00:00
|
|
|
# Link address sanitizer if requested.
|
|
|
|
ifdef ASAN
|
2021-06-21 14:04:36 +00:00
|
|
|
override LDFLAGS += -fsanitize=address
|
2020-10-08 09:53:38 +00:00
|
|
|
endif
|
|
|
|
|
2021-01-10 17:55:42 +00:00
|
|
|
# Link undefined behavior sanitizer if requested.
|
|
|
|
ifdef UBSAN
|
2021-06-21 14:04:36 +00:00
|
|
|
override LDFLAGS += -fsanitize=undefined
|
2021-01-10 17:55:42 +00:00
|
|
|
endif
|
|
|
|
|
2020-03-09 08:53:54 +00:00
|
|
|
# Required libraries.
|
|
|
|
ifeq ($(YQ2_OSTYPE),Linux)
|
2021-06-21 14:04:36 +00:00
|
|
|
LDLIBS ?= -lm -ldl -rdynamic
|
2020-03-09 08:53:54 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE),FreeBSD)
|
2021-06-21 14:04:36 +00:00
|
|
|
LDLIBS ?= -lm
|
2020-11-24 13:07:58 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE),NetBSD)
|
2021-06-21 14:04:36 +00:00
|
|
|
LDLIBS ?= -lm
|
2020-03-09 08:53:54 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE),OpenBSD)
|
2021-06-21 14:04:36 +00:00
|
|
|
LDLIBS ?= -lm
|
2020-03-09 08:53:54 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE),Windows)
|
2021-06-21 14:04:36 +00:00
|
|
|
LDLIBS ?= -lws2_32 -lwinmm -static-libgcc
|
2017-04-02 13:58:35 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE), Darwin)
|
2021-06-21 14:04:36 +00:00
|
|
|
LDLIBS ?= -arch $(YQ2_ARCH)
|
2020-06-26 12:43:06 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE), Haiku)
|
2021-06-21 14:04:36 +00:00
|
|
|
LDLIBS ?= -lm -lnetwork
|
2021-06-13 07:25:56 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE), SunOS)
|
2021-06-21 14:04:36 +00:00
|
|
|
LDLIBS ?= -lm -lsocket -lnsl
|
2012-04-29 13:57:33 +00:00
|
|
|
endif
|
2009-03-04 15:12:31 +00:00
|
|
|
|
2021-06-21 14:04:36 +00:00
|
|
|
# ASAN and UBSAN must not be linked
|
|
|
|
# with --no-undefined. OSX and OpenBSD
|
|
|
|
# don't support it at all.
|
|
|
|
ifndef ASAN
|
|
|
|
ifndef UBSAN
|
2018-08-14 13:01:45 +00:00
|
|
|
ifneq ($(YQ2_OSTYPE), Darwin)
|
|
|
|
ifneq ($(YQ2_OSTYPE), OpenBSD)
|
2020-03-13 08:19:32 +00:00
|
|
|
override LDFLAGS += -Wl,--no-undefined
|
2016-12-21 19:21:36 +00:00
|
|
|
endif
|
2018-08-14 13:01:45 +00:00
|
|
|
endif
|
2021-06-21 14:04:36 +00:00
|
|
|
endif
|
|
|
|
endif
|
2016-10-01 23:47:37 +00:00
|
|
|
|
2009-03-04 15:12:31 +00:00
|
|
|
# ----------
|
|
|
|
|
2011-10-09 16:55:23 +00:00
|
|
|
# Extra LDFLAGS for SDL
|
2017-05-25 09:18:19 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Darwin)
|
2017-01-31 16:51:46 +00:00
|
|
|
SDLLDFLAGS := -lSDL2
|
2017-05-25 09:18:19 +00:00
|
|
|
else # not Darwin
|
2013-08-25 22:55:31 +00:00
|
|
|
SDLLDFLAGS := $(shell sdl2-config --libs)
|
2017-05-25 09:18:19 +00:00
|
|
|
endif # Darwin
|
2011-10-09 16:55:23 +00:00
|
|
|
|
2018-08-14 13:01:45 +00:00
|
|
|
# The renderer libs don't need libSDL2main, libmingw32 or -mwindows.
|
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
|
|
|
DLL_SDLLDFLAGS = $(subst -mwindows,,$(subst -lmingw32,,$(subst -lSDL2main,,$(SDLLDFLAGS))))
|
|
|
|
endif
|
|
|
|
|
2011-10-09 16:55:23 +00:00
|
|
|
# ----------
|
|
|
|
|
2011-12-08 11:15:38 +00:00
|
|
|
# When make is invoked by "make VERBOSE=1" print
|
|
|
|
# the compiler and linker commands.
|
|
|
|
ifdef VERBOSE
|
|
|
|
Q :=
|
|
|
|
else
|
|
|
|
Q := @
|
2012-04-29 13:57:33 +00:00
|
|
|
endif
|
2011-12-08 11:15:38 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2012-06-11 09:13:10 +00:00
|
|
|
# Phony targets
|
2023-09-18 19:23:31 +00:00
|
|
|
.PHONY : all client game icon server ref_gl1 ref_gl3 ref_gles3 ref_soft ref_vk ref_gl4
|
2012-06-11 09:13:10 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# Builds everything
|
2023-09-18 19:23:31 +00:00
|
|
|
all: config client server game ref_gl1 ref_gl3 ref_gles3 ref_soft ref_vk ref_gl4
|
2013-04-27 19:11:45 +00:00
|
|
|
|
2017-04-10 06:53:32 +00:00
|
|
|
# ----------
|
|
|
|
|
2013-04-27 19:11:45 +00:00
|
|
|
# Print config values
|
|
|
|
config:
|
|
|
|
@echo "Build configuration"
|
|
|
|
@echo "============================"
|
2021-01-09 15:59:46 +00:00
|
|
|
@echo "YQ2_ARCH = $(YQ2_ARCH) COMPILER = $(COMPILER)"
|
2020-03-09 09:06:32 +00:00
|
|
|
@echo "WITH_CURL = $(WITH_CURL)"
|
2013-04-27 19:11:45 +00:00
|
|
|
@echo "WITH_OPENAL = $(WITH_OPENAL)"
|
2020-01-11 13:55:45 +00:00
|
|
|
@echo "WITH_RPATH = $(WITH_RPATH)"
|
2013-04-27 19:11:45 +00:00
|
|
|
@echo "WITH_SYSTEMWIDE = $(WITH_SYSTEMWIDE)"
|
|
|
|
@echo "WITH_SYSTEMDIR = $(WITH_SYSTEMDIR)"
|
|
|
|
@echo "============================"
|
2013-08-25 22:55:31 +00:00
|
|
|
@echo ""
|
2017-12-09 11:30:52 +00:00
|
|
|
|
2011-10-09 16:55:23 +00:00
|
|
|
# ----------
|
2009-03-04 15:12:31 +00:00
|
|
|
|
2018-08-14 13:01:45 +00:00
|
|
|
# Special target to compile the icon on Windows
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
2012-06-11 09:13:10 +00:00
|
|
|
icon:
|
|
|
|
@echo "===> WR build/icon/icon.res"
|
2014-02-08 09:08:20 +00:00
|
|
|
${Q}mkdir -p build/icon
|
2015-11-04 20:05:30 +00:00
|
|
|
${Q}windres src/backends/windows/icon.rc -O COFF -o build/icon/icon.res
|
2012-06-11 09:13:10 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# Cleanup
|
|
|
|
clean:
|
2016-10-01 22:40:52 +00:00
|
|
|
@echo "===> CLEAN"
|
|
|
|
${Q}rm -Rf build release/*
|
|
|
|
|
|
|
|
cleanall:
|
2010-11-26 12:28:00 +00:00
|
|
|
@echo "===> CLEAN"
|
2011-12-08 11:15:38 +00:00
|
|
|
${Q}rm -Rf build release
|
2012-04-29 13:57:33 +00:00
|
|
|
|
2009-03-05 11:28:58 +00:00
|
|
|
# ----------
|
|
|
|
|
2012-04-29 13:57:33 +00:00
|
|
|
# The client
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
2012-06-04 07:51:17 +00:00
|
|
|
client:
|
2017-12-17 04:10:49 +00:00
|
|
|
@echo "===> Building yquake2.exe"
|
2014-01-27 16:32:12 +00:00
|
|
|
${Q}mkdir -p release
|
2017-12-17 04:10:49 +00:00
|
|
|
$(MAKE) release/yquake2.exe
|
|
|
|
@echo "===> Building quake2.exe Wrapper"
|
2012-06-04 07:51:17 +00:00
|
|
|
$(MAKE) release/quake2.exe
|
|
|
|
|
|
|
|
build/client/%.o: %.c
|
|
|
|
@echo "===> CC $<"
|
2014-02-08 09:08:20 +00:00
|
|
|
${Q}mkdir -p $(@D)
|
2018-08-14 09:12:38 +00:00
|
|
|
${Q}$(CC) -c $(CFLAGS) $(SDLCFLAGS) $(ZIPCFLAGS) $(INCLUDE) -o $@ $<
|
2012-06-04 07:51:17 +00:00
|
|
|
|
2018-08-14 13:01:45 +00:00
|
|
|
release/yquake2.exe : LDFLAGS += -mwindows
|
|
|
|
|
2018-12-11 13:11:30 +00:00
|
|
|
ifeq ($(WITH_CURL),yes)
|
2018-12-12 19:57:43 +00:00
|
|
|
release/yquake2.exe : CFLAGS += -DUSE_CURL
|
2018-12-11 13:11:30 +00:00
|
|
|
endif
|
|
|
|
|
2012-06-04 07:51:17 +00:00
|
|
|
ifeq ($(WITH_OPENAL),yes)
|
2018-08-14 09:51:55 +00:00
|
|
|
release/yquake2.exe : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"openal32.dll"'
|
2012-06-04 07:51:17 +00:00
|
|
|
endif
|
|
|
|
|
2015-03-20 15:59:29 +00:00
|
|
|
else # not Windows
|
2016-10-01 22:40:52 +00:00
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
client:
|
2012-06-04 07:51:17 +00:00
|
|
|
@echo "===> Building quake2"
|
2011-12-08 11:15:38 +00:00
|
|
|
${Q}mkdir -p release
|
2012-04-29 13:57:33 +00:00
|
|
|
$(MAKE) release/quake2
|
2010-11-26 12:28:00 +00:00
|
|
|
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Darwin)
|
2018-09-11 13:05:19 +00:00
|
|
|
build/client/%.o : %.c
|
2015-03-21 07:39:55 +00:00
|
|
|
@echo "===> CC $<"
|
|
|
|
${Q}mkdir -p $(@D)
|
2020-04-21 11:57:09 +00:00
|
|
|
${Q}$(CC) -arch $(YQ2_ARCH) -x objective-c -c $(CFLAGS) $(SDLCFLAGS) $(ZIPCFLAGS) $(INCLUDE) $< -o $@
|
2018-08-14 13:01:45 +00:00
|
|
|
else
|
|
|
|
build/client/%.o: %.c
|
|
|
|
@echo "===> CC $<"
|
|
|
|
${Q}mkdir -p $(@D)
|
|
|
|
${Q}$(CC) -c $(CFLAGS) $(SDLCFLAGS) $(ZIPCFLAGS) $(INCLUDE) -o $@ $<
|
2015-03-21 07:39:55 +00:00
|
|
|
endif
|
|
|
|
|
2016-12-21 18:42:36 +00:00
|
|
|
release/quake2 : CFLAGS += -Wno-unused-result
|
|
|
|
|
2018-11-20 17:15:19 +00:00
|
|
|
ifeq ($(WITH_CURL),yes)
|
|
|
|
release/quake2 : CFLAGS += -DUSE_CURL
|
|
|
|
endif
|
|
|
|
|
2012-04-25 10:09:30 +00:00
|
|
|
ifeq ($(WITH_OPENAL),yes)
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), OpenBSD)
|
2018-08-14 09:51:55 +00:00
|
|
|
release/quake2 : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"libopenal.so"'
|
2017-04-02 13:58:35 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE), Darwin)
|
2018-08-14 09:51:55 +00:00
|
|
|
release/quake2 : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"libopenal.dylib"' -I/usr/local/opt/openal-soft/include
|
2017-10-20 21:10:03 +00:00
|
|
|
release/quake2 : LDFLAGS += -L/usr/local/opt/openal-soft/lib -rpath /usr/local/opt/openal-soft/lib
|
2012-08-12 03:59:40 +00:00
|
|
|
else
|
2018-08-14 09:51:55 +00:00
|
|
|
release/quake2 : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"libopenal.so.1"'
|
2012-08-12 03:59:40 +00:00
|
|
|
endif
|
2018-08-14 13:01:45 +00:00
|
|
|
endif
|
|
|
|
|
2020-08-09 15:52:11 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Linux)
|
|
|
|
release/quake2 : CFLAGS += -DHAVE_EXECINFO
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(YQ2_OSTYPE), Darwin)
|
|
|
|
release/quake2 : CFLAGS += -DHAVE_EXECINFO
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(YQ2_OSTYPE), SunOS)
|
|
|
|
release/quake2 : CFLAGS += -DHAVE_EXECINFO
|
|
|
|
endif
|
|
|
|
|
2018-08-14 13:01:45 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), FreeBSD)
|
2020-08-09 15:52:11 +00:00
|
|
|
release/quake2 : CFLAGS += -DHAVE_EXECINFO
|
2021-06-21 14:04:36 +00:00
|
|
|
release/quake2 : LDLIBS += -lexecinfo
|
2020-11-24 13:07:58 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(YQ2_OSTYPE), NetBSD)
|
|
|
|
release/quake2 : CFLAGS += -DHAVE_EXECINFO
|
2021-06-21 14:04:36 +00:00
|
|
|
release/quake2 : LDLIBS += -lexecinfo
|
2020-08-09 15:52:11 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(YQ2_OSTYPE), OpenBSD)
|
|
|
|
release/quake2 : CFLAGS += -DHAVE_EXECINFO
|
2021-06-21 14:04:36 +00:00
|
|
|
release/quake2 : LDLIBS += -lexecinfo
|
2020-08-09 15:52:11 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(YQ2_OSTYPE), Haiku)
|
|
|
|
release/quake2 : CFLAGS += -DHAVE_EXECINFO
|
2021-06-21 14:04:36 +00:00
|
|
|
release/quake2 : LDLIBS += -lexecinfo
|
2018-08-14 13:01:45 +00:00
|
|
|
endif
|
2012-04-25 10:09:30 +00:00
|
|
|
|
2020-03-10 08:18:25 +00:00
|
|
|
ifeq ($(WITH_RPATH),yes)
|
2020-05-21 00:30:52 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Darwin)
|
2020-05-21 00:39:09 +00:00
|
|
|
release/quake2 : LDFLAGS += -Wl,-rpath,'@executable_path/lib'
|
2020-05-21 00:30:52 +00:00
|
|
|
else
|
2013-11-09 12:47:04 +00:00
|
|
|
release/quake2 : LDFLAGS += -Wl,-z,origin,-rpath='$$ORIGIN/lib'
|
|
|
|
endif
|
2013-06-15 07:23:02 +00:00
|
|
|
endif
|
2020-05-21 00:30:52 +00:00
|
|
|
endif
|
2012-09-14 09:21:02 +00:00
|
|
|
|
2009-03-05 09:47:10 +00:00
|
|
|
# ----------
|
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# The server
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
2010-11-26 12:28:00 +00:00
|
|
|
server:
|
2012-06-03 11:06:48 +00:00
|
|
|
@echo "===> Building q2ded"
|
2014-01-27 16:32:12 +00:00
|
|
|
${Q}mkdir -p release
|
2012-06-04 07:32:35 +00:00
|
|
|
$(MAKE) release/q2ded.exe
|
2012-06-03 11:06:48 +00:00
|
|
|
|
|
|
|
build/server/%.o: %.c
|
|
|
|
@echo "===> CC $<"
|
2014-01-27 16:32:12 +00:00
|
|
|
${Q}mkdir -p $(@D)
|
2018-08-14 09:12:38 +00:00
|
|
|
${Q}$(CC) -c $(CFLAGS) $(ZIPCFLAGS) $(INCLUDE) -o $@ $<
|
2012-06-04 07:32:35 +00:00
|
|
|
|
|
|
|
release/q2ded.exe : CFLAGS += -DDEDICATED_ONLY
|
|
|
|
|
2015-03-20 15:59:29 +00:00
|
|
|
else # not Windows
|
2018-08-14 09:12:38 +00:00
|
|
|
|
2012-06-03 11:06:48 +00:00
|
|
|
server:
|
|
|
|
@echo "===> Building q2ded"
|
2011-12-08 11:15:38 +00:00
|
|
|
${Q}mkdir -p release
|
2010-11-26 12:28:00 +00:00
|
|
|
$(MAKE) release/q2ded
|
2009-03-05 16:34:42 +00:00
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
build/server/%.o: %.c
|
2012-06-03 11:06:48 +00:00
|
|
|
@echo "===> CC $<"
|
2011-12-08 11:15:38 +00:00
|
|
|
${Q}mkdir -p $(@D)
|
2018-08-14 09:12:38 +00:00
|
|
|
${Q}$(CC) -c $(CFLAGS) $(ZIPCFLAGS) $(INCLUDE) -o $@ $<
|
2009-03-05 16:34:42 +00:00
|
|
|
|
2016-12-21 18:42:36 +00:00
|
|
|
release/q2ded : CFLAGS += -DDEDICATED_ONLY -Wno-unused-result
|
2009-03-09 16:10:05 +00:00
|
|
|
|
2018-07-13 12:32:31 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), FreeBSD)
|
2021-06-21 14:04:36 +00:00
|
|
|
release/q2ded : LDLIBS += -lexecinfo
|
2018-07-13 12:32:31 +00:00
|
|
|
endif
|
2012-06-04 07:32:35 +00:00
|
|
|
endif
|
2012-04-25 09:32:11 +00:00
|
|
|
|
2016-10-01 22:40:52 +00:00
|
|
|
# ----------
|
|
|
|
|
2016-12-21 19:42:20 +00:00
|
|
|
# The OpenGL 1.x renderer lib
|
2016-10-01 22:40:52 +00:00
|
|
|
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
2016-10-01 22:40:52 +00:00
|
|
|
|
2017-04-02 14:23:00 +00:00
|
|
|
ref_gl1:
|
|
|
|
@echo "===> Building ref_gl1.dll"
|
|
|
|
$(MAKE) release/ref_gl1.dll
|
2016-10-01 22:40:52 +00:00
|
|
|
|
2021-06-29 07:01:13 +00:00
|
|
|
release/ref_gl1.dll : LDFLAGS += -shared
|
|
|
|
release/ref_gl1.dll : LDLIBS += -lopengl32
|
2016-10-02 02:53:44 +00:00
|
|
|
|
2017-04-02 13:58:35 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE), Darwin)
|
2016-10-01 22:40:52 +00:00
|
|
|
|
2017-04-02 14:23:00 +00:00
|
|
|
ref_gl1:
|
|
|
|
@echo "===> Building ref_gl1.dylib"
|
|
|
|
$(MAKE) release/ref_gl1.dylib
|
2016-10-01 22:40:52 +00:00
|
|
|
|
|
|
|
|
2017-04-02 14:23:00 +00:00
|
|
|
release/ref_gl1.dylib : LDFLAGS += -shared -framework OpenGL
|
2016-12-21 19:21:36 +00:00
|
|
|
|
2016-10-01 22:40:52 +00:00
|
|
|
else # not Windows or Darwin
|
|
|
|
|
2017-04-02 14:23:00 +00:00
|
|
|
ref_gl1:
|
|
|
|
@echo "===> Building ref_gl1.so"
|
|
|
|
$(MAKE) release/ref_gl1.so
|
2016-10-01 22:40:52 +00:00
|
|
|
|
|
|
|
|
2017-04-02 14:23:00 +00:00
|
|
|
release/ref_gl1.so : CFLAGS += -fPIC
|
2021-06-21 14:04:36 +00:00
|
|
|
release/ref_gl1.so : LDFLAGS += -shared
|
|
|
|
release/ref_gl1.so : LDLIBS += -lGL
|
2016-10-01 22:40:52 +00:00
|
|
|
|
2018-08-14 13:01:45 +00:00
|
|
|
endif # OS specific ref_gl1 stuff
|
2016-10-01 22:40:52 +00:00
|
|
|
|
2017-04-02 14:23:00 +00:00
|
|
|
build/ref_gl1/%.o: %.c
|
2016-10-01 22:40:52 +00:00
|
|
|
@echo "===> CC $<"
|
|
|
|
${Q}mkdir -p $(@D)
|
2018-07-16 11:45:14 +00:00
|
|
|
${Q}$(CC) -c $(CFLAGS) $(SDLCFLAGS) $(INCLUDE) -o $@ $<
|
2016-10-01 22:40:52 +00:00
|
|
|
|
2016-12-21 19:42:20 +00:00
|
|
|
# ----------
|
|
|
|
|
|
|
|
# The OpenGL 3.x renderer lib
|
|
|
|
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
2016-12-21 19:42:20 +00:00
|
|
|
|
|
|
|
ref_gl3:
|
|
|
|
@echo "===> Building ref_gl3.dll"
|
|
|
|
$(MAKE) release/ref_gl3.dll
|
|
|
|
|
2022-04-26 17:18:45 +00:00
|
|
|
release/ref_gl3.dll : GLAD_INCLUDE = -Isrc/client/refresh/gl3/glad/include
|
2016-12-21 19:42:20 +00:00
|
|
|
release/ref_gl3.dll : LDFLAGS += -shared
|
|
|
|
|
2017-04-02 13:58:35 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE), Darwin)
|
2016-12-21 19:42:20 +00:00
|
|
|
|
|
|
|
ref_gl3:
|
|
|
|
@echo "===> Building ref_gl3.dylib"
|
|
|
|
$(MAKE) release/ref_gl3.dylib
|
|
|
|
|
2022-04-26 17:18:45 +00:00
|
|
|
release/ref_gl3.dylib : GLAD_INCLUDE = -Isrc/client/refresh/gl3/glad/include
|
2017-01-31 16:51:46 +00:00
|
|
|
release/ref_gl3.dylib : LDFLAGS += -shared
|
|
|
|
|
2016-12-21 19:42:20 +00:00
|
|
|
else # not Windows or Darwin
|
|
|
|
|
|
|
|
ref_gl3:
|
|
|
|
@echo "===> Building ref_gl3.so"
|
|
|
|
$(MAKE) release/ref_gl3.so
|
|
|
|
|
2022-04-26 17:18:45 +00:00
|
|
|
release/ref_gl3.so : GLAD_INCLUDE = -Isrc/client/refresh/gl3/glad/include
|
2016-12-21 19:42:20 +00:00
|
|
|
release/ref_gl3.so : CFLAGS += -fPIC
|
|
|
|
release/ref_gl3.so : LDFLAGS += -shared
|
|
|
|
|
2022-04-26 17:18:45 +00:00
|
|
|
endif # OS specific ref_gl3 stuff
|
|
|
|
|
|
|
|
build/ref_gl3/%.o: %.c
|
|
|
|
@echo "===> CC $<"
|
|
|
|
${Q}mkdir -p $(@D)
|
|
|
|
${Q}$(CC) -c $(CFLAGS) $(SDLCFLAGS) $(INCLUDE) $(GLAD_INCLUDE) -o $@ $<
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
|
|
|
# The OpenGL ES 3.0 renderer lib
|
|
|
|
|
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
|
|
|
|
|
|
|
ref_gles3:
|
|
|
|
@echo "===> Building ref_gles3.dll"
|
|
|
|
$(MAKE) release/ref_gles3.dll
|
|
|
|
|
|
|
|
release/ref_gles3.dll : GLAD_INCLUDE = -Isrc/client/refresh/gl3/glad-gles3/include
|
|
|
|
|
2020-02-23 04:29:09 +00:00
|
|
|
# YQ2_GL3_GLES3 is for GLES3, DYQ2_GL3_GLES is for things that are identical
|
|
|
|
# in both GLES3 and GLES2 (in case we ever support that)
|
2022-04-26 17:18:45 +00:00
|
|
|
release/ref_gles3.dll : CFLAGS += -DYQ2_GL3_GLES3 -DYQ2_GL3_GLES
|
|
|
|
|
|
|
|
release/ref_gles3.dll : LDFLAGS += -shared
|
|
|
|
|
|
|
|
else ifeq ($(YQ2_OSTYPE), Darwin)
|
|
|
|
|
|
|
|
ref_gles3:
|
|
|
|
@echo "===> Building ref_gles3.dylib"
|
|
|
|
$(MAKE) release/ref_gles3.dylib
|
|
|
|
|
|
|
|
release/ref_gles3.dylib : GLAD_INCLUDE = -Isrc/client/refresh/gl3/glad-gles3/include
|
|
|
|
|
|
|
|
# YQ2_GL3_GLES3 is for GLES3, DYQ2_GL3_GLES is for things that are identical
|
|
|
|
# in both GLES3 and GLES2 (in case we ever support that)
|
|
|
|
release/ref_gles3.dylib : CFLAGS += -DYQ2_GL3_GLES3 -DYQ2_GL3_GLES
|
|
|
|
|
|
|
|
release/ref_gles3.dylib : LDFLAGS += -shared
|
|
|
|
|
|
|
|
else # not Windows or Darwin
|
|
|
|
|
|
|
|
ref_gles3:
|
|
|
|
@echo "===> Building ref_gles3.so"
|
|
|
|
$(MAKE) release/ref_gles3.so
|
|
|
|
|
|
|
|
release/ref_gles3.so : GLAD_INCLUDE = -Isrc/client/refresh/gl3/glad-gles3/include
|
|
|
|
|
|
|
|
# YQ2_GL3_GLES3 is for GLES3, DYQ2_GL3_GLES is for things that are identical
|
|
|
|
# in both GLES3 and GLES2 (in case we ever support that)
|
|
|
|
release/ref_gles3.so : CFLAGS += -DYQ2_GL3_GLES3 -DYQ2_GL3_GLES -fPIC
|
|
|
|
|
|
|
|
release/ref_gles3.so : LDFLAGS += -shared
|
|
|
|
|
|
|
|
GLAD_INCLUDE = -Isrc/client/refresh/gl3/glad-gles3/include
|
2020-02-23 04:29:09 +00:00
|
|
|
|
2018-08-14 13:01:45 +00:00
|
|
|
endif # OS specific ref_gl3 stuff
|
2016-12-21 19:42:20 +00:00
|
|
|
|
2022-04-26 17:18:45 +00:00
|
|
|
build/ref_gles3/%.o: %.c
|
2016-12-21 19:42:20 +00:00
|
|
|
@echo "===> CC $<"
|
|
|
|
${Q}mkdir -p $(@D)
|
|
|
|
${Q}$(CC) -c $(CFLAGS) $(SDLCFLAGS) $(INCLUDE) $(GLAD_INCLUDE) -o $@ $<
|
2016-10-01 22:40:52 +00:00
|
|
|
|
2009-03-09 16:10:05 +00:00
|
|
|
# ----------
|
|
|
|
|
2023-09-18 19:23:31 +00:00
|
|
|
# The OpenGL 4.6 renderer lib
|
|
|
|
|
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
|
|
|
|
|
|
|
ref_gl4:
|
|
|
|
@echo "===> Building ref_gl4.dll"
|
|
|
|
${Q}mkdir -p release
|
|
|
|
$(MAKE) release/ref_gl4.dll
|
|
|
|
|
|
|
|
release/ref_gl4.dll : GLAD_INCLUDE = -Isrc/client/refresh/gl4/glad/include
|
|
|
|
release/ref_gl4.dll : LDFLAGS += -shared
|
|
|
|
|
|
|
|
else # not Windows or Darwin - macOS doesn't support OpenGL 4.6
|
|
|
|
|
|
|
|
ref_gl4:
|
|
|
|
@echo "===> Building ref_gl4.so"
|
|
|
|
${Q}mkdir -p release
|
|
|
|
$(MAKE) release/ref_gl4.so
|
|
|
|
|
|
|
|
release/ref_gl4.so : GLAD_INCLUDE = -Isrc/client/refresh/gl4/glad/include
|
|
|
|
release/ref_gl4.so : CFLAGS += -fPIC
|
|
|
|
release/ref_gl4.so : LDFLAGS += -shared
|
|
|
|
|
|
|
|
endif # OS specific ref_gl4 stuff
|
|
|
|
|
|
|
|
build/ref_gl4/%.o: %.c
|
|
|
|
@echo "===> CC $<"
|
|
|
|
${Q}mkdir -p $(@D)
|
|
|
|
${Q}$(CC) -c $(CFLAGS) $(SDLCFLAGS) $(INCLUDE) $(GLAD_INCLUDE) -o $@ $<
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2017-12-09 11:30:52 +00:00
|
|
|
# The soft renderer lib
|
|
|
|
|
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
|
|
|
|
|
|
|
ref_soft:
|
|
|
|
@echo "===> Building ref_soft.dll"
|
|
|
|
$(MAKE) release/ref_soft.dll
|
|
|
|
|
|
|
|
release/ref_soft.dll : LDFLAGS += -shared
|
|
|
|
|
|
|
|
else ifeq ($(YQ2_OSTYPE), Darwin)
|
|
|
|
|
|
|
|
ref_soft:
|
|
|
|
@echo "===> Building ref_soft.dylib"
|
|
|
|
$(MAKE) release/ref_soft.dylib
|
|
|
|
|
|
|
|
release/ref_soft.dylib : LDFLAGS += -shared
|
|
|
|
|
|
|
|
else # not Windows or Darwin
|
|
|
|
|
|
|
|
ref_soft:
|
|
|
|
@echo "===> Building ref_soft.so"
|
|
|
|
$(MAKE) release/ref_soft.so
|
|
|
|
|
|
|
|
release/ref_soft.so : CFLAGS += -fPIC
|
|
|
|
release/ref_soft.so : LDFLAGS += -shared
|
|
|
|
|
2018-08-14 13:01:45 +00:00
|
|
|
endif # OS specific ref_soft stuff
|
2017-12-09 11:30:52 +00:00
|
|
|
|
|
|
|
build/ref_soft/%.o: %.c
|
|
|
|
@echo "===> CC $<"
|
|
|
|
${Q}mkdir -p $(@D)
|
2020-02-23 04:29:09 +00:00
|
|
|
${Q}$(CC) -c $(CFLAGS) $(SDLCFLAGS) $(INCLUDE) -o $@ $<
|
2017-12-09 11:30:52 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2023-09-17 11:17:14 +00:00
|
|
|
# The vk renderer lib
|
|
|
|
|
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
|
|
|
|
|
|
|
ref_vk:
|
|
|
|
@echo "===> Building ref_vk.dll"
|
|
|
|
$(MAKE) release/ref_vk.dll
|
|
|
|
|
|
|
|
release/ref_vk.dll : LDFLAGS += -shared
|
|
|
|
|
|
|
|
else ifeq ($(YQ2_OSTYPE), Darwin)
|
|
|
|
|
|
|
|
ref_vk:
|
|
|
|
@echo "===> Building ref_vk.dylib"
|
|
|
|
$(MAKE) release/ref_vk.dylib
|
|
|
|
|
|
|
|
release/ref_vk.dylib : LDFLAGS += -shared
|
|
|
|
|
|
|
|
else # not Windows or Darwin
|
|
|
|
|
|
|
|
ref_vk:
|
|
|
|
@echo "===> Building ref_vk.so"
|
|
|
|
$(MAKE) release/ref_vk.so
|
|
|
|
|
|
|
|
release/ref_vk.so : CFLAGS += -fPIC
|
|
|
|
release/ref_vk.so : LDFLAGS += -shared
|
|
|
|
|
|
|
|
endif # OS specific ref_vk stuff
|
|
|
|
|
|
|
|
build/ref_vk/%.o: %.c
|
|
|
|
@echo "===> CC $<"
|
|
|
|
${Q}mkdir -p $(@D)
|
|
|
|
${Q}$(CC) -c $(CFLAGS) $(SDLCFLAGS) $(INCLUDE) -o $@ $<
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# The baseq2 game
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
2012-06-04 07:32:35 +00:00
|
|
|
game:
|
|
|
|
@echo "===> Building baseq2/game.dll"
|
2014-01-27 16:32:12 +00:00
|
|
|
${Q}mkdir -p release/baseq2
|
2012-06-04 07:32:35 +00:00
|
|
|
$(MAKE) release/baseq2/game.dll
|
|
|
|
|
|
|
|
build/baseq2/%.o: %.c
|
|
|
|
@echo "===> CC $<"
|
2014-01-27 16:32:12 +00:00
|
|
|
${Q}mkdir -p $(@D)
|
2012-06-04 07:32:35 +00:00
|
|
|
${Q}$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
|
|
|
|
|
|
|
|
release/baseq2/game.dll : LDFLAGS += -shared
|
2018-08-14 13:01:45 +00:00
|
|
|
|
2017-04-02 13:58:35 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE), Darwin)
|
2018-08-14 13:01:45 +00:00
|
|
|
|
2015-08-12 16:55:35 +00:00
|
|
|
game:
|
2015-11-06 17:52:45 +00:00
|
|
|
@echo "===> Building baseq2/game.dylib"
|
2015-08-12 16:55:35 +00:00
|
|
|
${Q}mkdir -p release/baseq2
|
2015-11-06 17:52:45 +00:00
|
|
|
$(MAKE) release/baseq2/game.dylib
|
2015-08-12 16:55:35 +00:00
|
|
|
|
|
|
|
build/baseq2/%.o: %.c
|
|
|
|
@echo "===> CC $<"
|
|
|
|
${Q}mkdir -p $(@D)
|
|
|
|
${Q}$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
|
|
|
|
|
2015-11-06 17:52:45 +00:00
|
|
|
release/baseq2/game.dylib : CFLAGS += -fPIC
|
|
|
|
release/baseq2/game.dylib : LDFLAGS += -shared
|
2018-08-14 13:01:45 +00:00
|
|
|
|
2015-08-12 16:55:35 +00:00
|
|
|
else # not Windows or Darwin
|
2018-08-14 13:01:45 +00:00
|
|
|
|
2011-10-09 16:55:23 +00:00
|
|
|
game:
|
2012-06-04 07:32:35 +00:00
|
|
|
@echo "===> Building baseq2/game.so"
|
2011-12-08 11:15:38 +00:00
|
|
|
${Q}mkdir -p release/baseq2
|
2010-11-26 12:28:00 +00:00
|
|
|
$(MAKE) release/baseq2/game.so
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
build/baseq2/%.o: %.c
|
2012-06-04 07:32:35 +00:00
|
|
|
@echo "===> CC $<"
|
2011-12-08 11:15:38 +00:00
|
|
|
${Q}mkdir -p $(@D)
|
|
|
|
${Q}$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2016-12-21 18:42:36 +00:00
|
|
|
release/baseq2/game.so : CFLAGS += -fPIC -Wno-unused-result
|
2010-11-26 12:28:00 +00:00
|
|
|
release/baseq2/game.so : LDFLAGS += -shared
|
2012-06-04 07:32:35 +00:00
|
|
|
endif
|
2012-09-14 09:21:02 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
# ----------
|
|
|
|
|
2011-10-09 16:55:23 +00:00
|
|
|
# Used by the game
|
|
|
|
GAME_OBJS_ = \
|
|
|
|
src/common/shared/flash.o \
|
2012-06-02 09:32:45 +00:00
|
|
|
src/common/shared/rand.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/common/shared/shared.o \
|
2012-11-05 19:16:35 +00:00
|
|
|
src/game/g_ai.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/game/g_chase.o \
|
|
|
|
src/game/g_cmds.o \
|
|
|
|
src/game/g_combat.o \
|
|
|
|
src/game/g_func.o \
|
|
|
|
src/game/g_items.o \
|
|
|
|
src/game/g_main.o \
|
|
|
|
src/game/g_misc.o \
|
|
|
|
src/game/g_monster.o \
|
|
|
|
src/game/g_phys.o \
|
|
|
|
src/game/g_spawn.o \
|
|
|
|
src/game/g_svcmds.o \
|
|
|
|
src/game/g_target.o \
|
|
|
|
src/game/g_trigger.o \
|
|
|
|
src/game/g_turret.o \
|
|
|
|
src/game/g_utils.o \
|
|
|
|
src/game/g_weapon.o \
|
|
|
|
src/game/monster/berserker/berserker.o \
|
|
|
|
src/game/monster/boss2/boss2.o \
|
|
|
|
src/game/monster/boss3/boss3.o \
|
|
|
|
src/game/monster/boss3/boss31.o \
|
|
|
|
src/game/monster/boss3/boss32.o \
|
|
|
|
src/game/monster/brain/brain.o \
|
|
|
|
src/game/monster/chick/chick.o \
|
|
|
|
src/game/monster/flipper/flipper.o \
|
|
|
|
src/game/monster/float/float.o \
|
|
|
|
src/game/monster/flyer/flyer.o \
|
|
|
|
src/game/monster/gladiator/gladiator.o \
|
|
|
|
src/game/monster/gunner/gunner.o \
|
|
|
|
src/game/monster/hover/hover.o \
|
|
|
|
src/game/monster/infantry/infantry.o \
|
|
|
|
src/game/monster/insane/insane.o \
|
|
|
|
src/game/monster/medic/medic.o \
|
|
|
|
src/game/monster/misc/move.o \
|
|
|
|
src/game/monster/mutant/mutant.o \
|
|
|
|
src/game/monster/parasite/parasite.o \
|
|
|
|
src/game/monster/soldier/soldier.o \
|
|
|
|
src/game/monster/supertank/supertank.o \
|
|
|
|
src/game/monster/tank/tank.o \
|
|
|
|
src/game/player/client.o \
|
|
|
|
src/game/player/hud.o \
|
|
|
|
src/game/player/trail.o \
|
|
|
|
src/game/player/view.o \
|
|
|
|
src/game/player/weapon.o \
|
2012-11-05 19:16:35 +00:00
|
|
|
src/game/savegame/savegame.o
|
2012-04-29 13:57:33 +00:00
|
|
|
|
2009-04-10 13:11:49 +00:00
|
|
|
# ----------
|
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# Used by the client
|
|
|
|
CLIENT_OBJS_ := \
|
2015-04-11 18:11:19 +00:00
|
|
|
src/backends/generic/misc.o \
|
2010-11-26 12:28:00 +00:00
|
|
|
src/client/cl_cin.o \
|
|
|
|
src/client/cl_console.o \
|
|
|
|
src/client/cl_download.o \
|
|
|
|
src/client/cl_effects.o \
|
|
|
|
src/client/cl_entities.o \
|
|
|
|
src/client/cl_input.o \
|
|
|
|
src/client/cl_inventory.o \
|
|
|
|
src/client/cl_keyboard.o \
|
|
|
|
src/client/cl_lights.o \
|
|
|
|
src/client/cl_main.o \
|
|
|
|
src/client/cl_network.o \
|
|
|
|
src/client/cl_parse.o \
|
|
|
|
src/client/cl_particles.o \
|
|
|
|
src/client/cl_prediction.o \
|
|
|
|
src/client/cl_screen.o \
|
|
|
|
src/client/cl_tempentities.o \
|
|
|
|
src/client/cl_view.o \
|
2018-12-12 05:57:58 +00:00
|
|
|
src/client/curl/download.o \
|
2018-12-11 13:11:30 +00:00
|
|
|
src/client/curl/qcurl.o \
|
2018-08-07 07:43:34 +00:00
|
|
|
src/client/input/sdl.o \
|
2023-09-17 08:54:57 +00:00
|
|
|
src/client/cinema/smacker.o \
|
2010-11-26 12:28:00 +00:00
|
|
|
src/client/menu/menu.o \
|
|
|
|
src/client/menu/qmenu.o \
|
|
|
|
src/client/menu/videomenu.o \
|
2018-08-07 07:31:08 +00:00
|
|
|
src/client/sound/sdl.o \
|
2013-04-21 09:30:07 +00:00
|
|
|
src/client/sound/ogg.o \
|
2013-04-21 09:18:32 +00:00
|
|
|
src/client/sound/openal.o \
|
2018-08-07 07:23:07 +00:00
|
|
|
src/client/sound/qal.o \
|
2013-04-20 13:09:57 +00:00
|
|
|
src/client/sound/sound.o \
|
2013-04-21 09:32:20 +00:00
|
|
|
src/client/sound/wave.o \
|
2018-08-07 08:08:20 +00:00
|
|
|
src/client/vid/glimp_sdl.o \
|
2018-08-07 08:00:21 +00:00
|
|
|
src/client/vid/vid.o \
|
2012-06-07 11:54:08 +00:00
|
|
|
src/common/argproc.o \
|
|
|
|
src/common/clientserver.o \
|
2012-06-07 13:04:45 +00:00
|
|
|
src/common/collision.o \
|
2023-10-08 12:19:33 +00:00
|
|
|
src/common/cmodels.o \
|
2010-11-26 12:28:00 +00:00
|
|
|
src/common/crc.o \
|
2012-06-07 11:35:33 +00:00
|
|
|
src/common/cmdparser.o \
|
2010-11-26 12:28:00 +00:00
|
|
|
src/common/cvar.o \
|
|
|
|
src/common/filesystem.o \
|
2012-06-03 13:26:31 +00:00
|
|
|
src/common/glob.o \
|
2010-11-26 12:28:00 +00:00
|
|
|
src/common/md4.o \
|
2012-06-07 12:33:09 +00:00
|
|
|
src/common/movemsg.o \
|
2017-09-07 11:31:52 +00:00
|
|
|
src/common/frame.o \
|
2010-11-26 12:28:00 +00:00
|
|
|
src/common/netchan.o \
|
|
|
|
src/common/pmove.o \
|
|
|
|
src/common/szone.o \
|
|
|
|
src/common/zone.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/common/shared/flash.o \
|
2012-06-02 09:32:45 +00:00
|
|
|
src/common/shared/rand.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/common/shared/shared.o \
|
2023-08-13 12:07:44 +00:00
|
|
|
src/common/shared/utils.o \
|
2010-11-26 12:28:00 +00:00
|
|
|
src/common/unzip/ioapi.o \
|
2018-08-10 08:16:13 +00:00
|
|
|
src/common/unzip/miniz.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/common/unzip/unzip.o \
|
|
|
|
src/server/sv_cmd.o \
|
|
|
|
src/server/sv_conless.o \
|
|
|
|
src/server/sv_entities.o \
|
|
|
|
src/server/sv_game.o \
|
|
|
|
src/server/sv_init.o \
|
|
|
|
src/server/sv_main.o \
|
|
|
|
src/server/sv_save.o \
|
|
|
|
src/server/sv_send.o \
|
|
|
|
src/server/sv_user.o \
|
2017-12-09 11:30:52 +00:00
|
|
|
src/server/sv_world.o
|
2012-06-04 07:51:17 +00:00
|
|
|
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
2012-06-04 07:51:17 +00:00
|
|
|
CLIENT_OBJS_ += \
|
2018-02-03 17:09:19 +00:00
|
|
|
src/backends/windows/main.o \
|
2012-08-01 12:12:05 +00:00
|
|
|
src/backends/windows/network.o \
|
2012-11-06 19:47:13 +00:00
|
|
|
src/backends/windows/system.o \
|
2018-02-04 10:25:31 +00:00
|
|
|
src/backends/windows/shared/hunk.o
|
2012-06-04 07:51:17 +00:00
|
|
|
else
|
|
|
|
CLIENT_OBJS_ += \
|
2012-08-01 11:58:10 +00:00
|
|
|
src/backends/unix/main.o \
|
2012-11-05 19:16:35 +00:00
|
|
|
src/backends/unix/network.o \
|
|
|
|
src/backends/unix/signalhandler.o \
|
2012-11-06 19:47:13 +00:00
|
|
|
src/backends/unix/system.o \
|
|
|
|
src/backends/unix/shared/hunk.o
|
2012-06-04 07:51:17 +00:00
|
|
|
endif
|
2011-10-09 16:55:23 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2017-04-10 06:53:32 +00:00
|
|
|
REFGL1_OBJS_ := \
|
2018-01-11 09:58:32 +00:00
|
|
|
src/client/refresh/gl1/qgl.o \
|
|
|
|
src/client/refresh/gl1/gl1_draw.o \
|
|
|
|
src/client/refresh/gl1/gl1_image.o \
|
|
|
|
src/client/refresh/gl1/gl1_light.o \
|
|
|
|
src/client/refresh/gl1/gl1_lightmap.o \
|
|
|
|
src/client/refresh/gl1/gl1_main.o \
|
|
|
|
src/client/refresh/gl1/gl1_mesh.o \
|
|
|
|
src/client/refresh/gl1/gl1_misc.o \
|
|
|
|
src/client/refresh/gl1/gl1_model.o \
|
|
|
|
src/client/refresh/gl1/gl1_scrap.o \
|
|
|
|
src/client/refresh/gl1/gl1_surf.o \
|
|
|
|
src/client/refresh/gl1/gl1_warp.o \
|
|
|
|
src/client/refresh/gl1/gl1_sdl.o \
|
2023-10-05 16:24:15 +00:00
|
|
|
src/client/refresh/files/light.o \
|
2022-10-30 19:44:21 +00:00
|
|
|
src/client/refresh/files/surf.o \
|
2022-09-25 19:51:12 +00:00
|
|
|
src/client/refresh/files/models.o \
|
2016-10-01 22:40:52 +00:00
|
|
|
src/client/refresh/files/pcx.o \
|
|
|
|
src/client/refresh/files/stb.o \
|
|
|
|
src/client/refresh/files/wal.o \
|
2023-10-11 21:29:47 +00:00
|
|
|
src/client/refresh/files/warp.o \
|
2018-07-23 14:40:06 +00:00
|
|
|
src/client/refresh/files/pvs.o \
|
2017-06-12 16:21:09 +00:00
|
|
|
src/common/shared/shared.o \
|
2023-08-13 12:07:44 +00:00
|
|
|
src/common/shared/utils.o \
|
2023-10-08 12:19:33 +00:00
|
|
|
src/common/cmodels.o \
|
2017-06-12 16:21:09 +00:00
|
|
|
src/common/md4.o
|
2017-12-09 11:30:52 +00:00
|
|
|
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
2017-04-10 06:53:32 +00:00
|
|
|
REFGL1_OBJS_ += \
|
2018-02-04 10:25:31 +00:00
|
|
|
src/backends/windows/shared/hunk.o
|
2016-10-01 22:40:52 +00:00
|
|
|
else # not Windows
|
2017-04-10 06:53:32 +00:00
|
|
|
REFGL1_OBJS_ += \
|
2016-10-01 22:40:52 +00:00
|
|
|
src/backends/unix/shared/hunk.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2016-12-21 19:42:20 +00:00
|
|
|
REFGL3_OBJS_ := \
|
2016-12-23 02:36:47 +00:00
|
|
|
src/client/refresh/gl3/gl3_draw.o \
|
|
|
|
src/client/refresh/gl3/gl3_image.o \
|
2017-01-29 04:21:27 +00:00
|
|
|
src/client/refresh/gl3/gl3_light.o \
|
|
|
|
src/client/refresh/gl3/gl3_lightmap.o \
|
2016-12-21 19:42:20 +00:00
|
|
|
src/client/refresh/gl3/gl3_main.o \
|
2017-01-29 04:21:27 +00:00
|
|
|
src/client/refresh/gl3/gl3_mesh.o \
|
2016-12-23 02:36:47 +00:00
|
|
|
src/client/refresh/gl3/gl3_misc.o \
|
|
|
|
src/client/refresh/gl3/gl3_model.o \
|
2016-12-21 19:42:20 +00:00
|
|
|
src/client/refresh/gl3/gl3_sdl.o \
|
2017-01-29 04:21:27 +00:00
|
|
|
src/client/refresh/gl3/gl3_surf.o \
|
2017-01-08 16:23:32 +00:00
|
|
|
src/client/refresh/gl3/gl3_warp.o \
|
2017-01-22 03:59:18 +00:00
|
|
|
src/client/refresh/gl3/gl3_shaders.o \
|
2023-10-05 16:24:15 +00:00
|
|
|
src/client/refresh/files/light.o \
|
2022-10-30 19:44:21 +00:00
|
|
|
src/client/refresh/files/surf.o \
|
2022-09-25 19:51:12 +00:00
|
|
|
src/client/refresh/files/models.o \
|
2016-12-21 19:42:20 +00:00
|
|
|
src/client/refresh/files/pcx.o \
|
2016-12-23 02:36:47 +00:00
|
|
|
src/client/refresh/files/stb.o \
|
2016-12-29 03:35:34 +00:00
|
|
|
src/client/refresh/files/wal.o \
|
2023-10-11 21:29:47 +00:00
|
|
|
src/client/refresh/files/warp.o \
|
2018-07-23 14:40:06 +00:00
|
|
|
src/client/refresh/files/pvs.o \
|
2017-06-12 16:21:09 +00:00
|
|
|
src/common/shared/shared.o \
|
2023-08-13 12:07:44 +00:00
|
|
|
src/common/shared/utils.o \
|
2023-10-08 12:19:33 +00:00
|
|
|
src/common/cmodels.o \
|
2017-06-12 16:21:09 +00:00
|
|
|
src/common/md4.o
|
2016-12-21 19:42:20 +00:00
|
|
|
|
2022-04-26 17:18:45 +00:00
|
|
|
REFGL3_OBJS_GLADE_ := \
|
2020-02-23 04:29:09 +00:00
|
|
|
src/client/refresh/gl3/glad/src/glad.o
|
2022-04-26 17:18:45 +00:00
|
|
|
|
|
|
|
REFGL3_OBJS_GLADEES_ := \
|
|
|
|
src/client/refresh/gl3/glad-gles3/src/glad.o
|
2020-02-23 04:29:09 +00:00
|
|
|
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
2016-12-21 19:42:20 +00:00
|
|
|
REFGL3_OBJS_ += \
|
2018-02-04 10:25:31 +00:00
|
|
|
src/backends/windows/shared/hunk.o
|
2016-12-21 19:42:20 +00:00
|
|
|
else # not Windows
|
|
|
|
REFGL3_OBJS_ += \
|
|
|
|
src/backends/unix/shared/hunk.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2023-09-18 19:23:31 +00:00
|
|
|
REFGL4_OBJS_ := \
|
|
|
|
src/client/refresh/gl4/gl4_draw.o \
|
|
|
|
src/client/refresh/gl4/gl4_image.o \
|
|
|
|
src/client/refresh/gl4/gl4_light.o \
|
|
|
|
src/client/refresh/gl4/gl4_lightmap.o \
|
|
|
|
src/client/refresh/gl4/gl4_main.o \
|
|
|
|
src/client/refresh/gl4/gl4_mesh.o \
|
|
|
|
src/client/refresh/gl4/gl4_misc.o \
|
|
|
|
src/client/refresh/gl4/gl4_model.o \
|
|
|
|
src/client/refresh/gl4/gl4_sdl.o \
|
|
|
|
src/client/refresh/gl4/gl4_surf.o \
|
|
|
|
src/client/refresh/gl4/gl4_warp.o \
|
|
|
|
src/client/refresh/gl4/gl4_shaders.o \
|
2023-10-05 16:24:15 +00:00
|
|
|
src/client/refresh/files/light.o \
|
2023-09-18 19:23:31 +00:00
|
|
|
src/client/refresh/files/surf.o \
|
|
|
|
src/client/refresh/files/models.o \
|
|
|
|
src/client/refresh/files/pcx.o \
|
|
|
|
src/client/refresh/files/stb.o \
|
|
|
|
src/client/refresh/files/wal.o \
|
2023-10-11 21:29:47 +00:00
|
|
|
src/client/refresh/files/warp.o \
|
2023-09-18 19:23:31 +00:00
|
|
|
src/client/refresh/files/pvs.o \
|
|
|
|
src/common/shared/shared.o \
|
2023-10-08 12:19:33 +00:00
|
|
|
src/common/cmodels.o \
|
2023-09-18 19:23:31 +00:00
|
|
|
src/common/md4.o
|
|
|
|
|
|
|
|
REFGL4_OBJS_GLADE_ := \
|
|
|
|
src/client/refresh/gl4/glad/src/glad.o
|
|
|
|
|
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
|
|
|
REFGL4_OBJS_ += \
|
|
|
|
src/backends/windows/shared/hunk.o
|
|
|
|
else # not Windows
|
|
|
|
REFGL4_OBJS_ += \
|
|
|
|
src/backends/unix/shared/hunk.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2017-12-09 11:30:52 +00:00
|
|
|
REFSOFT_OBJS_ := \
|
2018-01-11 10:09:00 +00:00
|
|
|
src/client/refresh/soft/sw_aclip.o \
|
|
|
|
src/client/refresh/soft/sw_alias.o \
|
|
|
|
src/client/refresh/soft/sw_bsp.o \
|
|
|
|
src/client/refresh/soft/sw_draw.o \
|
|
|
|
src/client/refresh/soft/sw_edge.o \
|
|
|
|
src/client/refresh/soft/sw_image.o \
|
|
|
|
src/client/refresh/soft/sw_light.o \
|
|
|
|
src/client/refresh/soft/sw_main.o \
|
|
|
|
src/client/refresh/soft/sw_misc.o \
|
|
|
|
src/client/refresh/soft/sw_model.o \
|
|
|
|
src/client/refresh/soft/sw_part.o \
|
|
|
|
src/client/refresh/soft/sw_poly.o \
|
2019-01-30 20:42:21 +00:00
|
|
|
src/client/refresh/soft/sw_polyset.o \
|
2018-01-11 10:09:00 +00:00
|
|
|
src/client/refresh/soft/sw_rast.o \
|
|
|
|
src/client/refresh/soft/sw_scan.o \
|
|
|
|
src/client/refresh/soft/sw_sprite.o \
|
|
|
|
src/client/refresh/soft/sw_surf.o \
|
2023-10-05 16:24:15 +00:00
|
|
|
src/client/refresh/files/light.o \
|
2022-10-30 19:44:21 +00:00
|
|
|
src/client/refresh/files/surf.o \
|
2022-09-25 19:51:12 +00:00
|
|
|
src/client/refresh/files/models.o \
|
2017-12-09 11:30:52 +00:00
|
|
|
src/client/refresh/files/pcx.o \
|
|
|
|
src/client/refresh/files/stb.o \
|
|
|
|
src/client/refresh/files/wal.o \
|
2018-07-23 14:40:06 +00:00
|
|
|
src/client/refresh/files/pvs.o \
|
2017-12-09 11:30:52 +00:00
|
|
|
src/common/shared/shared.o \
|
2023-08-13 12:07:44 +00:00
|
|
|
src/common/shared/utils.o \
|
2023-10-08 12:19:33 +00:00
|
|
|
src/common/cmodels.o \
|
2017-12-09 11:30:52 +00:00
|
|
|
src/common/md4.o
|
|
|
|
|
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
|
|
|
REFSOFT_OBJS_ += \
|
2018-02-04 10:25:31 +00:00
|
|
|
src/backends/windows/shared/hunk.o
|
2017-12-09 11:30:52 +00:00
|
|
|
else # not Windows
|
|
|
|
REFSOFT_OBJS_ += \
|
|
|
|
src/backends/unix/shared/hunk.o
|
|
|
|
endif
|
|
|
|
|
2023-09-17 11:17:14 +00:00
|
|
|
# ----------
|
2023-09-18 19:23:31 +00:00
|
|
|
|
2023-09-17 11:17:14 +00:00
|
|
|
REFVK_OBJS_ := \
|
|
|
|
src/client/refresh/vk/vk_buffer.o \
|
|
|
|
src/client/refresh/vk/vk_cmd.o \
|
|
|
|
src/client/refresh/vk/vk_common.o \
|
|
|
|
src/client/refresh/vk/vk_device.o \
|
|
|
|
src/client/refresh/vk/vk_draw.o \
|
|
|
|
src/client/refresh/vk/vk_image.o \
|
|
|
|
src/client/refresh/vk/vk_light.o \
|
2023-10-06 15:38:24 +00:00
|
|
|
src/client/refresh/vk/vk_lightmap.o \
|
2023-09-17 11:17:14 +00:00
|
|
|
src/client/refresh/vk/vk_mesh.o \
|
|
|
|
src/client/refresh/vk/vk_model.o \
|
|
|
|
src/client/refresh/vk/vk_pipeline.o \
|
|
|
|
src/client/refresh/vk/vk_main.o \
|
|
|
|
src/client/refresh/vk/vk_misc.o \
|
|
|
|
src/client/refresh/vk/vk_surf.o \
|
|
|
|
src/client/refresh/vk/vk_shaders.o \
|
|
|
|
src/client/refresh/vk/vk_swapchain.o \
|
|
|
|
src/client/refresh/vk/vk_validation.o \
|
|
|
|
src/client/refresh/vk/vk_warp.o \
|
|
|
|
src/client/refresh/vk/vk_util.o \
|
|
|
|
src/client/refresh/vk/volk/volk.o \
|
2023-10-05 16:24:15 +00:00
|
|
|
src/client/refresh/files/light.o \
|
2023-09-17 11:17:14 +00:00
|
|
|
src/client/refresh/files/surf.o \
|
|
|
|
src/client/refresh/files/models.o \
|
|
|
|
src/client/refresh/files/pcx.o \
|
|
|
|
src/client/refresh/files/stb.o \
|
|
|
|
src/client/refresh/files/wal.o \
|
2023-10-11 21:29:47 +00:00
|
|
|
src/client/refresh/files/warp.o \
|
2023-09-17 11:17:14 +00:00
|
|
|
src/client/refresh/files/pvs.o \
|
|
|
|
src/common/shared/shared.o \
|
|
|
|
src/common/shared/utils.o \
|
2023-10-08 12:19:33 +00:00
|
|
|
src/common/cmodels.o \
|
2023-09-17 11:17:14 +00:00
|
|
|
src/common/md4.o
|
|
|
|
|
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
|
|
|
REFVK_OBJS_ += \
|
|
|
|
src/backends/windows/shared/hunk.o
|
|
|
|
else # not Windows
|
|
|
|
REFVK_OBJS_ += \
|
|
|
|
src/backends/unix/shared/hunk.o
|
|
|
|
endif
|
|
|
|
|
2017-12-09 11:30:52 +00:00
|
|
|
# ----------
|
|
|
|
|
2011-10-09 16:55:23 +00:00
|
|
|
# Used by the server
|
|
|
|
SERVER_OBJS_ := \
|
2018-08-07 09:45:26 +00:00
|
|
|
src/backends/generic/misc.o \
|
2012-06-07 11:54:08 +00:00
|
|
|
src/common/argproc.o \
|
|
|
|
src/common/clientserver.o \
|
2012-06-07 13:04:45 +00:00
|
|
|
src/common/collision.o \
|
2023-10-08 12:19:33 +00:00
|
|
|
src/common/cmodels.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/common/crc.o \
|
2012-06-07 11:35:33 +00:00
|
|
|
src/common/cmdparser.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/common/cvar.o \
|
|
|
|
src/common/filesystem.o \
|
2012-06-03 13:26:31 +00:00
|
|
|
src/common/glob.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/common/md4.o \
|
2017-09-07 11:31:52 +00:00
|
|
|
src/common/frame.o \
|
2012-06-07 12:33:09 +00:00
|
|
|
src/common/movemsg.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/common/netchan.o \
|
|
|
|
src/common/pmove.o \
|
|
|
|
src/common/szone.o \
|
|
|
|
src/common/zone.o \
|
2012-06-02 09:32:45 +00:00
|
|
|
src/common/shared/rand.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/common/shared/shared.o \
|
2023-08-13 12:07:44 +00:00
|
|
|
src/common/shared/utils.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/common/unzip/ioapi.o \
|
2018-08-10 08:16:13 +00:00
|
|
|
src/common/unzip/miniz.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/common/unzip/unzip.o \
|
|
|
|
src/server/sv_cmd.o \
|
|
|
|
src/server/sv_conless.o \
|
|
|
|
src/server/sv_entities.o \
|
|
|
|
src/server/sv_game.o \
|
|
|
|
src/server/sv_init.o \
|
|
|
|
src/server/sv_main.o \
|
|
|
|
src/server/sv_save.o \
|
|
|
|
src/server/sv_send.o \
|
|
|
|
src/server/sv_user.o \
|
2018-08-07 09:45:26 +00:00
|
|
|
src/server/sv_world.o
|
2012-06-03 09:18:26 +00:00
|
|
|
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
2012-06-03 10:14:05 +00:00
|
|
|
SERVER_OBJS_ += \
|
2018-02-03 17:09:19 +00:00
|
|
|
src/backends/windows/main.o \
|
2012-08-01 12:12:05 +00:00
|
|
|
src/backends/windows/network.o \
|
2012-11-06 19:47:13 +00:00
|
|
|
src/backends/windows/system.o \
|
2018-02-04 10:25:31 +00:00
|
|
|
src/backends/windows/shared/hunk.o
|
2015-03-20 15:59:29 +00:00
|
|
|
else # not Windows
|
2012-06-03 09:18:26 +00:00
|
|
|
SERVER_OBJS_ += \
|
2012-08-01 11:58:10 +00:00
|
|
|
src/backends/unix/main.o \
|
2012-11-05 19:16:35 +00:00
|
|
|
src/backends/unix/network.o \
|
|
|
|
src/backends/unix/signalhandler.o \
|
2012-11-06 19:47:13 +00:00
|
|
|
src/backends/unix/system.o \
|
|
|
|
src/backends/unix/shared/hunk.o
|
2012-06-03 09:18:26 +00:00
|
|
|
endif
|
2012-04-29 13:57:33 +00:00
|
|
|
|
2011-10-09 16:55:23 +00:00
|
|
|
# ----------
|
2010-11-26 12:28:00 +00:00
|
|
|
|
2023-08-26 23:18:24 +00:00
|
|
|
# Rewrite paths to our object directory.
|
2010-11-26 12:28:00 +00:00
|
|
|
CLIENT_OBJS = $(patsubst %,build/client/%,$(CLIENT_OBJS_))
|
2017-04-10 06:53:32 +00:00
|
|
|
REFGL1_OBJS = $(patsubst %,build/ref_gl1/%,$(REFGL1_OBJS_))
|
2016-12-21 19:42:20 +00:00
|
|
|
REFGL3_OBJS = $(patsubst %,build/ref_gl3/%,$(REFGL3_OBJS_))
|
2022-04-26 17:18:45 +00:00
|
|
|
REFGL3_OBJS += $(patsubst %,build/ref_gl3/%,$(REFGL3_OBJS_GLADE_))
|
|
|
|
REFGLES3_OBJS = $(patsubst %,build/ref_gles3/%,$(REFGL3_OBJS_))
|
|
|
|
REFGLES3_OBJS += $(patsubst %,build/ref_gles3/%,$(REFGL3_OBJS_GLADEES_))
|
2023-09-18 19:23:31 +00:00
|
|
|
REFGL4_OBJS = $(patsubst %,build/ref_gl4/%,$(REFGL4_OBJS_))
|
|
|
|
REFGL4_OBJS += $(patsubst %,build/ref_gl4/%,$(REFGL4_OBJS_GLADE_))
|
2017-12-09 11:30:52 +00:00
|
|
|
REFSOFT_OBJS = $(patsubst %,build/ref_soft/%,$(REFSOFT_OBJS_))
|
2023-09-17 11:17:14 +00:00
|
|
|
REFVK_OBJS = $(patsubst %,build/ref_vk/%,$(REFVK_OBJS_))
|
2010-11-26 12:28:00 +00:00
|
|
|
SERVER_OBJS = $(patsubst %,build/server/%,$(SERVER_OBJS_))
|
2011-10-09 16:55:23 +00:00
|
|
|
GAME_OBJS = $(patsubst %,build/baseq2/%,$(GAME_OBJS_))
|
2010-09-01 08:58:58 +00:00
|
|
|
|
2009-03-04 15:12:31 +00:00
|
|
|
# ----------
|
|
|
|
|
2018-08-14 13:01:45 +00:00
|
|
|
# Generate header dependencies.
|
2012-04-29 13:57:33 +00:00
|
|
|
CLIENT_DEPS= $(CLIENT_OBJS:.o=.d)
|
2020-01-25 15:53:35 +00:00
|
|
|
GAME_DEPS= $(GAME_OBJS:.o=.d)
|
2017-04-10 06:53:32 +00:00
|
|
|
REFGL1_DEPS= $(REFGL1_OBJS:.o=.d)
|
2016-12-21 19:42:20 +00:00
|
|
|
REFGL3_DEPS= $(REFGL3_OBJS:.o=.d)
|
2022-04-26 17:18:45 +00:00
|
|
|
REFGLES3_DEPS= $(REFGLES3_OBJS:.o=.d)
|
2023-09-18 19:23:31 +00:00
|
|
|
REFGL4_DEPS= $(REFGL4_OBJS:.o=.d)
|
2017-12-09 11:30:52 +00:00
|
|
|
REFSOFT_DEPS= $(REFSOFT_OBJS:.o=.d)
|
2023-09-17 11:17:14 +00:00
|
|
|
REFVK_DEPS= $(REFVK_OBJS:.o=.d)
|
2012-04-29 13:57:33 +00:00
|
|
|
SERVER_DEPS= $(SERVER_OBJS:.o=.d)
|
2009-03-05 11:28:58 +00:00
|
|
|
|
2018-08-14 13:01:45 +00:00
|
|
|
# Suck header dependencies in.
|
2012-04-29 13:57:33 +00:00
|
|
|
-include $(CLIENT_DEPS)
|
2020-01-25 15:53:35 +00:00
|
|
|
-include $(GAME_DEPS)
|
2017-04-10 06:53:32 +00:00
|
|
|
-include $(REFGL1_DEPS)
|
2016-12-21 19:42:20 +00:00
|
|
|
-include $(REFGL3_DEPS)
|
2022-04-26 17:18:45 +00:00
|
|
|
-include $(REFGLES3_DEPS)
|
2023-09-18 19:23:31 +00:00
|
|
|
-include $(REFGL4_DEPS)
|
2023-09-17 11:17:14 +00:00
|
|
|
-include $(REFVK_DEPS)
|
2012-04-29 13:57:33 +00:00
|
|
|
-include $(SERVER_DEPS)
|
2009-03-05 16:34:42 +00:00
|
|
|
|
|
|
|
# ----------
|
2009-03-09 16:10:05 +00:00
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# release/quake2
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
2017-12-17 04:10:49 +00:00
|
|
|
release/yquake2.exe : $(CLIENT_OBJS) icon
|
2012-06-04 07:51:17 +00:00
|
|
|
@echo "===> LD $@"
|
2021-06-21 14:04:36 +00:00
|
|
|
${Q}$(CC) $(LDFLAGS) build/icon/icon.res $(CLIENT_OBJS) $(LDLIBS) $(SDLLDFLAGS) -o $@
|
2014-01-27 16:32:12 +00:00
|
|
|
$(Q)strip $@
|
2017-12-17 05:06:33 +00:00
|
|
|
release/quake2.exe : src/win-wrapper/wrapper.c icon
|
2018-02-03 12:29:14 +00:00
|
|
|
$(Q)$(CC) -Wall -mwindows build/icon/icon.res src/win-wrapper/wrapper.c -o $@
|
2017-12-17 04:10:49 +00:00
|
|
|
$(Q)strip $@
|
2012-06-04 07:51:17 +00:00
|
|
|
else
|
2013-06-15 07:23:02 +00:00
|
|
|
release/quake2 : $(CLIENT_OBJS)
|
2012-06-04 07:51:17 +00:00
|
|
|
@echo "===> LD $@"
|
2021-06-21 14:04:36 +00:00
|
|
|
${Q}$(CC) $(LDFLAGS) $(CLIENT_OBJS) $(LDLIBS) $(SDLLDFLAGS) -o $@
|
2012-06-04 07:51:17 +00:00
|
|
|
endif
|
2012-09-14 09:21:02 +00:00
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# release/q2ded
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
2012-06-11 09:13:10 +00:00
|
|
|
release/q2ded.exe : $(SERVER_OBJS) icon
|
2020-01-25 15:53:35 +00:00
|
|
|
@echo "===> LD $@"
|
2021-06-21 14:04:36 +00:00
|
|
|
${Q}$(CC) $(LDFLAGS) build/icon/icon.res $(SERVER_OBJS) $(LDLIBS) $(SDLLDFLAGS) -o $@
|
2014-01-27 16:32:12 +00:00
|
|
|
$(Q)strip $@
|
2012-06-03 09:18:26 +00:00
|
|
|
else
|
2011-10-09 16:55:23 +00:00
|
|
|
release/q2ded : $(SERVER_OBJS)
|
2012-06-04 09:49:11 +00:00
|
|
|
@echo "===> LD $@"
|
2021-06-21 14:04:36 +00:00
|
|
|
${Q}$(CC) $(LDFLAGS) $(SERVER_OBJS) $(LDLIBS) -o $@
|
2012-06-03 09:18:26 +00:00
|
|
|
endif
|
2010-11-26 12:28:00 +00:00
|
|
|
|
2017-04-02 14:23:00 +00:00
|
|
|
# release/ref_gl1.so
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
2017-04-10 06:53:32 +00:00
|
|
|
release/ref_gl1.dll : $(REFGL1_OBJS)
|
2016-10-01 22:40:52 +00:00
|
|
|
@echo "===> LD $@"
|
2021-06-21 14:04:36 +00:00
|
|
|
${Q}$(CC) $(LDFLAGS) $(REFGL1_OBJS) $(LDLIBS) $(DLL_SDLLDFLAGS) -o $@
|
2016-10-01 22:40:52 +00:00
|
|
|
$(Q)strip $@
|
2017-04-02 13:58:35 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE), Darwin)
|
2017-04-10 06:53:32 +00:00
|
|
|
release/ref_gl1.dylib : $(REFGL1_OBJS)
|
2016-10-01 22:40:52 +00:00
|
|
|
@echo "===> LD $@"
|
2021-06-21 14:04:36 +00:00
|
|
|
${Q}$(CC) $(LDFLAGS) $(REFGL1_OBJS) $(LDLIBS) $(SDLLDFLAGS) -o $@
|
2016-10-01 22:40:52 +00:00
|
|
|
else
|
2017-04-10 06:53:32 +00:00
|
|
|
release/ref_gl1.so : $(REFGL1_OBJS)
|
2016-10-01 22:40:52 +00:00
|
|
|
@echo "===> LD $@"
|
2021-06-21 14:04:36 +00:00
|
|
|
${Q}$(CC) $(LDFLAGS) $(REFGL1_OBJS) $(LDLIBS) $(SDLLDFLAGS) -o $@
|
2016-10-01 22:40:52 +00:00
|
|
|
endif
|
|
|
|
|
2016-12-21 19:42:20 +00:00
|
|
|
# release/ref_gl3.so
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
2016-12-21 19:42:20 +00:00
|
|
|
release/ref_gl3.dll : $(REFGL3_OBJS)
|
|
|
|
@echo "===> LD $@"
|
2021-06-21 14:04:36 +00:00
|
|
|
${Q}$(CC) $(LDFLAGS) $(REFGL3_OBJS) $(LDLIBS) $(DLL_SDLLDFLAGS) -o $@
|
2016-12-21 19:42:20 +00:00
|
|
|
$(Q)strip $@
|
2017-04-02 13:58:35 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE), Darwin)
|
2016-12-21 19:42:20 +00:00
|
|
|
release/ref_gl3.dylib : $(REFGL3_OBJS)
|
|
|
|
@echo "===> LD $@"
|
2021-06-21 14:04:36 +00:00
|
|
|
${Q}$(CC) $(LDFLAGS) $(REFGL3_OBJS) $(LDLIBS) $(SDLLDFLAGS) -o $@
|
2016-12-21 19:42:20 +00:00
|
|
|
else
|
|
|
|
release/ref_gl3.so : $(REFGL3_OBJS)
|
|
|
|
@echo "===> LD $@"
|
2021-06-21 14:04:36 +00:00
|
|
|
${Q}$(CC) $(LDFLAGS) $(REFGL3_OBJS) $(LDLIBS) $(SDLLDFLAGS) -o $@
|
2016-12-21 19:42:20 +00:00
|
|
|
endif
|
|
|
|
|
2022-04-26 17:18:45 +00:00
|
|
|
# release/ref_gles3.so
|
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
|
|
|
release/ref_gles3.dll : $(REFGLES3_OBJS)
|
|
|
|
@echo "===> LD $@"
|
|
|
|
${Q}$(CC) $(LDFLAGS) $(REFGLES3_OBJS) $(LDLIBS) $(DLL_SDLLDFLAGS) -o $@
|
|
|
|
$(Q)strip $@
|
|
|
|
else ifeq ($(YQ2_OSTYPE), Darwin)
|
|
|
|
release/ref_gles3.dylib : $(REFGLES3_OBJS)
|
|
|
|
@echo "===> LD $@"
|
|
|
|
${Q}$(CC) $(LDFLAGS) $(REFGLES3_OBJS) $(LDLIBS) $(SDLLDFLAGS) -o $@
|
|
|
|
else
|
|
|
|
release/ref_gles3.so : $(REFGLES3_OBJS)
|
|
|
|
@echo "===> LD $@"
|
|
|
|
${Q}$(CC) $(LDFLAGS) $(REFGLES3_OBJS) $(LDLIBS) $(SDLLDFLAGS) -o $@
|
|
|
|
endif
|
|
|
|
|
2023-09-18 19:23:31 +00:00
|
|
|
# release/ref_gl4.so
|
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
|
|
|
release/ref_gl4.dll : $(REFGL4_OBJS)
|
|
|
|
@echo "===> LD $@"
|
|
|
|
${Q}$(CC) $(LDFLAGS) $(REFGL4_OBJS) $(LDLIBS) $(DLL_SDLLDFLAGS) -o $@
|
|
|
|
$(Q)strip $@
|
|
|
|
|
|
|
|
else
|
|
|
|
release/ref_gl4.so : $(REFGL4_OBJS)
|
|
|
|
@echo "===> LD $@"
|
|
|
|
${Q}$(CC) $(LDFLAGS) $(REFGL4_OBJS) $(LDLIBS) $(SDLLDFLAGS) -o $@
|
|
|
|
endif
|
|
|
|
|
2017-12-09 11:30:52 +00:00
|
|
|
# release/ref_soft.so
|
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
|
|
|
release/ref_soft.dll : $(REFSOFT_OBJS)
|
|
|
|
@echo "===> LD $@"
|
2021-06-21 14:04:36 +00:00
|
|
|
${Q}$(CC) $(LDFLAGS) $(REFSOFT_OBJS) $(LDLIBS) $(DLL_SDLLDFLAGS) -o $@
|
2017-12-09 11:30:52 +00:00
|
|
|
$(Q)strip $@
|
|
|
|
else ifeq ($(YQ2_OSTYPE), Darwin)
|
|
|
|
release/ref_soft.dylib : $(REFSOFT_OBJS)
|
|
|
|
@echo "===> LD $@"
|
2021-06-21 14:04:36 +00:00
|
|
|
${Q}$(CC) $(LDFLAGS) $(REFSOFT_OBJS) $(LDLIBS) $(SDLLDFLAGS) -o $@
|
2017-12-09 11:30:52 +00:00
|
|
|
else
|
|
|
|
release/ref_soft.so : $(REFSOFT_OBJS)
|
|
|
|
@echo "===> LD $@"
|
2021-06-21 14:04:36 +00:00
|
|
|
${Q}$(CC) $(LDFLAGS) $(REFSOFT_OBJS) $(LDLIBS) $(SDLLDFLAGS) -o $@
|
2017-12-09 11:30:52 +00:00
|
|
|
endif
|
|
|
|
|
2023-09-17 11:17:14 +00:00
|
|
|
# release/ref_vk.so
|
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
|
|
|
release/ref_vk.dll : $(REFVK_OBJS)
|
|
|
|
@echo "===> LD $@"
|
|
|
|
${Q}$(CC) $(LDFLAGS) $(REFVK_OBJS) $(LDLIBS) $(DLL_SDLLDFLAGS) -o $@
|
|
|
|
else ifeq ($(YQ2_OSTYPE), Darwin)
|
|
|
|
release/ref_vk.dylib : $(REFVK_OBJS)
|
|
|
|
@echo "===> LD $@"
|
|
|
|
${Q}$(CC) $(LDFLAGS) $(REFVK_OBJS) $(LDLIBS) $(SDLLDFLAGS) -o $@
|
|
|
|
else
|
|
|
|
release/ref_vk.so : $(REFVK_OBJS)
|
|
|
|
@echo "===> LD $@"
|
|
|
|
${Q}$(CC) $(LDFLAGS) $(REFVK_OBJS) $(LDLIBS) $(SDLLDFLAGS) -o $@
|
|
|
|
endif
|
|
|
|
|
2011-10-09 16:55:23 +00:00
|
|
|
# release/baseq2/game.so
|
2017-04-02 13:58:35 +00:00
|
|
|
ifeq ($(YQ2_OSTYPE), Windows)
|
2012-06-04 07:32:35 +00:00
|
|
|
release/baseq2/game.dll : $(GAME_OBJS)
|
|
|
|
@echo "===> LD $@"
|
2021-06-21 14:04:36 +00:00
|
|
|
${Q}$(CC) $(LDFLAGS) $(GAME_OBJS) $(LDLIBS) -o $@
|
2014-01-27 16:32:12 +00:00
|
|
|
$(Q)strip $@
|
2017-04-02 13:58:35 +00:00
|
|
|
else ifeq ($(YQ2_OSTYPE), Darwin)
|
2015-11-06 17:52:45 +00:00
|
|
|
release/baseq2/game.dylib : $(GAME_OBJS)
|
2015-08-12 16:55:35 +00:00
|
|
|
@echo "===> LD $@"
|
2021-06-21 14:04:36 +00:00
|
|
|
${Q}$(CC) $(LDFLAGS) $(GAME_OBJS) $(LDLIBS) -o $@
|
2012-06-04 07:32:35 +00:00
|
|
|
else
|
2011-10-09 16:55:23 +00:00
|
|
|
release/baseq2/game.so : $(GAME_OBJS)
|
2012-06-04 07:32:35 +00:00
|
|
|
@echo "===> LD $@"
|
2021-06-21 14:04:36 +00:00
|
|
|
${Q}$(CC) $(LDFLAGS) $(GAME_OBJS) $(LDLIBS) -o $@
|
2012-06-04 07:32:35 +00:00
|
|
|
endif
|
2012-09-14 09:21:02 +00:00
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# ----------
|