2011-06-30 20:39:19 +00:00
|
|
|
#
|
2012-03-30 13:12:20 +00:00
|
|
|
# Reaction Makefile
|
2011-06-30 20:39:19 +00:00
|
|
|
#
|
|
|
|
# GNU Make required
|
|
|
|
#
|
2019-01-05 02:16:41 +00:00
|
|
|
COMPILE_PLATFORM=$(shell uname | sed -e 's/_.*//' | tr '[:upper:]' '[:lower:]' | sed -e 's/\//_/g')
|
|
|
|
COMPILE_ARCH=$(shell uname -m | sed -e 's/i.86/x86/' | sed -e 's/^arm.*/arm/')
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
ifeq ($(COMPILE_PLATFORM),sunos)
|
|
|
|
# Solaris uname and GNU uname differ
|
2019-01-05 02:16:41 +00:00
|
|
|
COMPILE_ARCH=$(shell uname -p | sed -e 's/i.86/x86/')
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef BUILD_STANDALONE
|
2011-06-30 20:43:07 +00:00
|
|
|
BUILD_STANDALONE =
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
ifndef BUILD_CLIENT
|
2011-06-30 20:43:07 +00:00
|
|
|
BUILD_CLIENT =
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
ifndef BUILD_SERVER
|
2011-06-30 20:43:07 +00:00
|
|
|
BUILD_SERVER =
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
ifndef BUILD_GAME_SO
|
2011-06-30 20:43:07 +00:00
|
|
|
BUILD_GAME_SO =
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
ifndef BUILD_GAME_QVM
|
2011-06-30 20:43:07 +00:00
|
|
|
BUILD_GAME_QVM =
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
2012-03-30 13:12:20 +00:00
|
|
|
ifndef BUILD_BASEGAME
|
|
|
|
BUILD_BASEGAME =
|
|
|
|
endif
|
2011-06-30 20:39:19 +00:00
|
|
|
ifndef BUILD_MISSIONPACK
|
2011-06-30 20:43:07 +00:00
|
|
|
BUILD_MISSIONPACK=
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
2013-07-21 23:15:13 +00:00
|
|
|
ifndef BUILD_RENDERER_OPENGL2
|
|
|
|
BUILD_RENDERER_OPENGL2=
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
2019-01-05 02:16:41 +00:00
|
|
|
ifndef BUILD_AUTOUPDATER # DON'T build unless you mean to!
|
|
|
|
BUILD_AUTOUPDATER=0
|
|
|
|
endif
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
#
|
|
|
|
# If you require a different configuration from the defaults below, create a
|
|
|
|
# new file named "Makefile.local" in the same directory as this file and define
|
|
|
|
# your parameters there. This allows you to change configuration without
|
|
|
|
# causing problems with keeping up to date with the repository.
|
|
|
|
#
|
|
|
|
#############################################################################
|
|
|
|
-include Makefile.local
|
|
|
|
|
2015-09-23 02:30:18 +00:00
|
|
|
ifeq ($(COMPILE_PLATFORM),cygwin)
|
|
|
|
PLATFORM=mingw32
|
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
ifndef PLATFORM
|
|
|
|
PLATFORM=$(COMPILE_PLATFORM)
|
|
|
|
endif
|
|
|
|
export PLATFORM
|
|
|
|
|
2015-09-23 02:30:18 +00:00
|
|
|
ifeq ($(PLATFORM),mingw32)
|
|
|
|
MINGW=1
|
|
|
|
endif
|
|
|
|
ifeq ($(PLATFORM),mingw64)
|
|
|
|
MINGW=1
|
|
|
|
endif
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
ifeq ($(COMPILE_ARCH),i86pc)
|
|
|
|
COMPILE_ARCH=x86
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(COMPILE_ARCH),amd64)
|
|
|
|
COMPILE_ARCH=x86_64
|
|
|
|
endif
|
|
|
|
ifeq ($(COMPILE_ARCH),x64)
|
|
|
|
COMPILE_ARCH=x86_64
|
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
ifeq ($(COMPILE_ARCH),powerpc)
|
|
|
|
COMPILE_ARCH=ppc
|
|
|
|
endif
|
|
|
|
ifeq ($(COMPILE_ARCH),powerpc64)
|
|
|
|
COMPILE_ARCH=ppc64
|
|
|
|
endif
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
ifeq ($(COMPILE_ARCH),axp)
|
|
|
|
COMPILE_ARCH=alpha
|
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
ifndef ARCH
|
|
|
|
ARCH=$(COMPILE_ARCH)
|
|
|
|
endif
|
|
|
|
export ARCH
|
|
|
|
|
|
|
|
ifneq ($(PLATFORM),$(COMPILE_PLATFORM))
|
|
|
|
CROSS_COMPILING=1
|
|
|
|
else
|
|
|
|
CROSS_COMPILING=0
|
|
|
|
|
|
|
|
ifneq ($(ARCH),$(COMPILE_ARCH))
|
|
|
|
CROSS_COMPILING=1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
export CROSS_COMPILING
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
ifndef VERSION
|
|
|
|
VERSION=1.36
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef CLIENTBIN
|
|
|
|
CLIENTBIN=Reaction
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef SERVERBIN
|
|
|
|
SERVERBIN=Reactionded
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef BASEGAME
|
|
|
|
BASEGAME=Boomstick
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef BASEGAME_CFLAGS
|
|
|
|
BASEGAME_CFLAGS=
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef MISSIONPACK
|
|
|
|
MISSIONPACK=missionpack
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef MISSIONPACK_CFLAGS
|
|
|
|
MISSIONPACK_CFLAGS=-DMISSIONPACK
|
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
ifndef COPYDIR
|
|
|
|
COPYDIR="/usr/local/games/Reaction"
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef COPYBINDIR
|
|
|
|
COPYBINDIR=$(COPYDIR)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef MOUNT_DIR
|
|
|
|
MOUNT_DIR=code
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef BUILD_DIR
|
|
|
|
BUILD_DIR=build
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef TEMPDIR
|
|
|
|
TEMPDIR=/tmp
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef GENERATE_DEPENDENCIES
|
|
|
|
GENERATE_DEPENDENCIES=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef USE_OPENAL
|
|
|
|
USE_OPENAL=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef USE_OPENAL_DLOPEN
|
|
|
|
USE_OPENAL_DLOPEN=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef USE_CURL
|
|
|
|
USE_CURL=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef USE_CURL_DLOPEN
|
2015-09-23 02:30:18 +00:00
|
|
|
ifdef MINGW
|
2011-06-30 20:39:19 +00:00
|
|
|
USE_CURL_DLOPEN=0
|
|
|
|
else
|
|
|
|
USE_CURL_DLOPEN=1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef USE_CODEC_VORBIS
|
2019-01-05 02:16:41 +00:00
|
|
|
USE_CODEC_VORBIS=1
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
ifndef USE_CODEC_OPUS
|
|
|
|
USE_CODEC_OPUS=1
|
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
ifndef USE_MUMBLE
|
|
|
|
USE_MUMBLE=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef USE_VOIP
|
|
|
|
USE_VOIP=1
|
|
|
|
endif
|
|
|
|
|
2012-10-04 13:47:15 +00:00
|
|
|
ifndef USE_FREETYPE
|
|
|
|
USE_FREETYPE=0
|
|
|
|
endif
|
|
|
|
|
2015-09-23 02:30:18 +00:00
|
|
|
ifndef USE_INTERNAL_LIBS
|
|
|
|
USE_INTERNAL_LIBS=1
|
|
|
|
endif
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
ifndef USE_INTERNAL_OGG
|
2015-09-23 02:30:18 +00:00
|
|
|
USE_INTERNAL_OGG=$(USE_INTERNAL_LIBS)
|
2013-07-21 23:15:13 +00:00
|
|
|
endif
|
|
|
|
|
2014-05-03 22:47:46 +00:00
|
|
|
ifndef USE_INTERNAL_VORBIS
|
2015-09-23 02:30:18 +00:00
|
|
|
USE_INTERNAL_VORBIS=$(USE_INTERNAL_LIBS)
|
2014-05-03 22:47:46 +00:00
|
|
|
endif
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
ifndef USE_INTERNAL_OPUS
|
2015-09-23 02:30:18 +00:00
|
|
|
USE_INTERNAL_OPUS=$(USE_INTERNAL_LIBS)
|
2013-07-21 23:15:13 +00:00
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
ifndef USE_INTERNAL_ZLIB
|
2015-09-23 02:30:18 +00:00
|
|
|
USE_INTERNAL_ZLIB=$(USE_INTERNAL_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef USE_INTERNAL_JPEG
|
2015-09-23 02:30:18 +00:00
|
|
|
USE_INTERNAL_JPEG=$(USE_INTERNAL_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef USE_LOCAL_HEADERS
|
2015-09-23 02:30:18 +00:00
|
|
|
USE_LOCAL_HEADERS=$(USE_INTERNAL_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
|
2012-01-13 16:30:06 +00:00
|
|
|
ifndef USE_RENDERER_DLOPEN
|
|
|
|
USE_RENDERER_DLOPEN=1
|
|
|
|
endif
|
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
ifndef USE_YACC
|
|
|
|
USE_YACC=0
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef USE_AUTOUPDATER # DON'T include unless you mean to!
|
|
|
|
USE_AUTOUPDATER=0
|
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
ifndef DEBUG_CFLAGS
|
2019-01-05 02:16:41 +00:00
|
|
|
DEBUG_CFLAGS=-ggdb -O0
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
BD=$(BUILD_DIR)/debug-$(PLATFORM)-$(ARCH)
|
|
|
|
BR=$(BUILD_DIR)/release-$(PLATFORM)-$(ARCH)
|
|
|
|
CDIR=$(MOUNT_DIR)/client
|
|
|
|
SDIR=$(MOUNT_DIR)/server
|
2013-07-21 23:15:13 +00:00
|
|
|
RCOMMONDIR=$(MOUNT_DIR)/renderercommon
|
|
|
|
RGL1DIR=$(MOUNT_DIR)/renderergl1
|
|
|
|
RGL2DIR=$(MOUNT_DIR)/renderergl2
|
2011-06-30 20:39:19 +00:00
|
|
|
CMDIR=$(MOUNT_DIR)/qcommon
|
|
|
|
SDLDIR=$(MOUNT_DIR)/sdl
|
|
|
|
ASMDIR=$(MOUNT_DIR)/asm
|
|
|
|
SYSDIR=$(MOUNT_DIR)/sys
|
|
|
|
GDIR=$(MOUNT_DIR)/game
|
|
|
|
CGDIR=$(MOUNT_DIR)/cgame
|
|
|
|
BLIBDIR=$(MOUNT_DIR)/botlib
|
|
|
|
NDIR=$(MOUNT_DIR)/null
|
|
|
|
UIDIR=$(MOUNT_DIR)/ui
|
2011-07-11 19:05:03 +00:00
|
|
|
Q3UIDIR=$(MOUNT_DIR)/ui
|
2011-06-30 20:39:19 +00:00
|
|
|
JPDIR=$(MOUNT_DIR)/jpeg-8c
|
2019-01-05 01:18:00 +00:00
|
|
|
OGGDIR=$(MOUNT_DIR)/libogg-1.3.3
|
|
|
|
VORBISDIR=$(MOUNT_DIR)/libvorbis-1.3.6
|
|
|
|
OPUSDIR=$(MOUNT_DIR)/opus-1.2.1
|
|
|
|
OPUSFILEDIR=$(MOUNT_DIR)/opusfile-0.9
|
2011-06-30 20:39:19 +00:00
|
|
|
ZDIR=$(MOUNT_DIR)/zlib
|
|
|
|
Q3ASMDIR=$(MOUNT_DIR)/tools/asm
|
|
|
|
LBURGDIR=$(MOUNT_DIR)/tools/lcc/lburg
|
|
|
|
Q3CPPDIR=$(MOUNT_DIR)/tools/lcc/cpp
|
|
|
|
Q3LCCETCDIR=$(MOUNT_DIR)/tools/lcc/etc
|
|
|
|
Q3LCCSRCDIR=$(MOUNT_DIR)/tools/lcc/src
|
2019-01-05 02:16:41 +00:00
|
|
|
AUTOUPDATERSRCDIR=$(MOUNT_DIR)/autoupdater
|
|
|
|
LIBTOMCRYPTSRCDIR=$(AUTOUPDATERSRCDIR)/rsa_tools/libtomcrypt-1.17
|
|
|
|
TOMSFASTMATHSRCDIR=$(AUTOUPDATERSRCDIR)/rsa_tools/tomsfastmath-0.13.1
|
2011-06-30 20:39:19 +00:00
|
|
|
LOKISETUPDIR=misc/setup
|
|
|
|
NSISDIR=misc/nsis
|
2014-05-08 22:59:04 +00:00
|
|
|
SDLHDIR=$(MOUNT_DIR)/SDL2
|
2011-06-30 20:39:19 +00:00
|
|
|
LIBSDIR=$(MOUNT_DIR)/libs
|
|
|
|
|
|
|
|
bin_path=$(shell which $(1) 2> /dev/null)
|
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
# The autoupdater uses curl, so figure out its flags no matter what.
|
2011-06-30 20:39:19 +00:00
|
|
|
# We won't need this if we only build the server
|
2019-01-05 02:16:41 +00:00
|
|
|
|
|
|
|
# set PKG_CONFIG_PATH or PKG_CONFIG to influence this, e.g.
|
|
|
|
# PKG_CONFIG_PATH=/opt/cross/i386-mingw32msvc/lib/pkgconfig or
|
|
|
|
# PKG_CONFIG=arm-linux-gnueabihf-pkg-config
|
|
|
|
ifeq ($(CROSS_COMPILING),0)
|
|
|
|
PKG_CONFIG ?= pkg-config
|
|
|
|
else
|
|
|
|
ifneq ($(PKG_CONFIG_PATH),)
|
|
|
|
PKG_CONFIG ?= pkg-config
|
|
|
|
else
|
|
|
|
# Don't use host pkg-config when cross-compiling.
|
|
|
|
# (unknown-pkg-config is meant to be a non-existant command.)
|
|
|
|
PKG_CONFIG ?= unknown-pkg-config
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(call bin_path, $(PKG_CONFIG)),)
|
|
|
|
CURL_CFLAGS ?= $(shell $(PKG_CONFIG) --silence-errors --cflags libcurl)
|
|
|
|
CURL_LIBS ?= $(shell $(PKG_CONFIG) --silence-errors --libs libcurl)
|
|
|
|
OPENAL_CFLAGS ?= $(shell $(PKG_CONFIG) --silence-errors --cflags openal)
|
|
|
|
OPENAL_LIBS ?= $(shell $(PKG_CONFIG) --silence-errors --libs openal)
|
|
|
|
SDL_CFLAGS ?= $(shell $(PKG_CONFIG) --silence-errors --cflags sdl2|sed 's/-Dmain=SDL_main//')
|
|
|
|
SDL_LIBS ?= $(shell $(PKG_CONFIG) --silence-errors --libs sdl2)
|
|
|
|
else
|
|
|
|
# assume they're in the system default paths (no -I or -L needed)
|
|
|
|
CURL_LIBS ?= -lcurl
|
|
|
|
OPENAL_LIBS ?= -lopenal
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Use sdl2-config if all else fails
|
|
|
|
ifeq ($(SDL_CFLAGS),)
|
|
|
|
ifneq ($(call bin_path, sdl2-config),)
|
|
|
|
SDL_CFLAGS = $(shell sdl2-config --cflags)
|
|
|
|
SDL_LIBS = $(shell sdl2-config --libs)
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
# Add git version info
|
|
|
|
USE_GIT=
|
|
|
|
ifeq ($(wildcard .git),.git)
|
|
|
|
GIT_REV=$(shell git show -s --pretty=format:%h-%ad --date=short)
|
|
|
|
ifneq ($(GIT_REV),)
|
|
|
|
VERSION:=$(VERSION)_GIT_$(GIT_REV)
|
|
|
|
USE_GIT=1
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# SETUP AND BUILD -- LINUX
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
INSTALL=install
|
2019-01-05 02:16:41 +00:00
|
|
|
MKDIR=mkdir -p
|
2015-09-23 02:30:18 +00:00
|
|
|
EXTRA_FILES=
|
|
|
|
CLIENT_EXTRA_FILES=
|
2011-06-30 20:39:19 +00:00
|
|
|
|
2015-09-23 02:30:18 +00:00
|
|
|
ifneq (,$(findstring "$(COMPILE_PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu"))
|
|
|
|
TOOLS_CFLAGS += -DARCH_STRING=\"$(COMPILE_ARCH)\"
|
|
|
|
endif
|
2011-06-30 20:39:19 +00:00
|
|
|
|
2015-09-23 02:30:18 +00:00
|
|
|
ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu"))
|
2011-06-30 20:39:19 +00:00
|
|
|
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
|
2015-09-23 02:30:18 +00:00
|
|
|
-pipe -DUSE_ICON -DARCH_STRING=\\\"$(ARCH)\\\" -DREACTION
|
2012-01-13 16:30:06 +00:00
|
|
|
CLIENT_CFLAGS += $(SDL_CFLAGS) -DREACTION
|
2011-06-30 20:39:19 +00:00
|
|
|
|
2015-09-23 02:30:18 +00:00
|
|
|
OPTIMIZEVM = -O3
|
2011-06-30 20:39:19 +00:00
|
|
|
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
|
|
|
|
|
|
|
|
ifeq ($(ARCH),x86_64)
|
2015-09-23 02:30:18 +00:00
|
|
|
OPTIMIZEVM = -O3
|
2011-06-30 20:39:19 +00:00
|
|
|
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
|
|
|
|
HAVE_VM_COMPILED = true
|
|
|
|
else
|
2013-07-21 23:15:13 +00:00
|
|
|
ifeq ($(ARCH),x86)
|
2015-09-23 02:30:18 +00:00
|
|
|
OPTIMIZEVM = -O3 -march=i586
|
2011-06-30 20:39:19 +00:00
|
|
|
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
|
|
|
|
HAVE_VM_COMPILED=true
|
|
|
|
else
|
|
|
|
ifeq ($(ARCH),ppc)
|
2019-01-05 02:16:41 +00:00
|
|
|
ALTIVEC_CFLAGS = -maltivec
|
2011-06-30 20:39:19 +00:00
|
|
|
HAVE_VM_COMPILED=true
|
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),ppc64)
|
2019-01-05 02:16:41 +00:00
|
|
|
ALTIVEC_CFLAGS = -maltivec
|
2011-06-30 20:39:19 +00:00
|
|
|
HAVE_VM_COMPILED=true
|
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),sparc)
|
|
|
|
OPTIMIZE += -mtune=ultrasparc3 -mv8plus
|
|
|
|
OPTIMIZEVM += -mtune=ultrasparc3 -mv8plus
|
|
|
|
HAVE_VM_COMPILED=true
|
|
|
|
endif
|
2019-01-05 02:16:41 +00:00
|
|
|
ifeq ($(ARCH),armv7l)
|
|
|
|
HAVE_VM_COMPILED=true
|
|
|
|
endif
|
2011-06-30 20:39:19 +00:00
|
|
|
ifeq ($(ARCH),alpha)
|
|
|
|
# According to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=410555
|
|
|
|
# -ffast-math will cause the client to die with SIGFPE on Alpha
|
|
|
|
OPTIMIZE = $(OPTIMIZEVM)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
SHLIBEXT=so
|
|
|
|
SHLIBCFLAGS=-fPIC -fvisibility=hidden
|
|
|
|
SHLIBLDFLAGS=-shared $(LDFLAGS)
|
|
|
|
|
|
|
|
THREAD_LIBS=-lpthread
|
|
|
|
LIBS=-ldl -lm
|
2019-01-05 02:16:41 +00:00
|
|
|
AUTOUPDATER_LIBS += -ldl
|
2011-06-30 20:39:19 +00:00
|
|
|
|
2012-01-13 16:30:06 +00:00
|
|
|
CLIENT_LIBS=$(SDL_LIBS)
|
2019-01-05 02:16:41 +00:00
|
|
|
RENDERER_LIBS = $(SDL_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
ifeq ($(USE_OPENAL),1)
|
|
|
|
ifneq ($(USE_OPENAL_DLOPEN),1)
|
2015-09-23 02:30:18 +00:00
|
|
|
CLIENT_LIBS += $(THREAD_LIBS) $(OPENAL_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_CURL),1)
|
2015-09-23 02:30:18 +00:00
|
|
|
CLIENT_CFLAGS += $(CURL_CFLAGS)
|
2011-06-30 20:39:19 +00:00
|
|
|
ifneq ($(USE_CURL_DLOPEN),1)
|
2015-09-23 02:30:18 +00:00
|
|
|
CLIENT_LIBS += $(CURL_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_MUMBLE),1)
|
|
|
|
CLIENT_LIBS += -lrt
|
|
|
|
endif
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
ifeq ($(ARCH),x86)
|
2011-06-30 20:39:19 +00:00
|
|
|
# linux32 make ...
|
|
|
|
BASE_CFLAGS += -m32
|
|
|
|
else
|
|
|
|
ifeq ($(ARCH),ppc64)
|
|
|
|
BASE_CFLAGS += -m64
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
else # ifeq Linux
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# SETUP AND BUILD -- MAC OS X
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),darwin)
|
|
|
|
HAVE_VM_COMPILED=true
|
2013-07-21 23:15:13 +00:00
|
|
|
LIBS = -framework Cocoa
|
2011-06-30 20:39:19 +00:00
|
|
|
CLIENT_LIBS=
|
2012-01-13 16:30:06 +00:00
|
|
|
RENDERER_LIBS=
|
2019-01-05 02:16:41 +00:00
|
|
|
OPTIMIZEVM = -O3
|
|
|
|
|
|
|
|
# Default minimum Mac OS X version
|
|
|
|
ifeq ($(MACOSX_VERSION_MIN),)
|
|
|
|
MACOSX_VERSION_MIN=10.7
|
|
|
|
endif
|
2013-07-21 23:15:13 +00:00
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
MACOSX_MAJOR=$(shell echo $(MACOSX_VERSION_MIN) | cut -d. -f1)
|
|
|
|
MACOSX_MINOR=$(shell echo $(MACOSX_VERSION_MIN) | cut -d. -f2)
|
|
|
|
ifeq ($(shell test $(MACOSX_MINOR) -gt 9; echo $$?),0)
|
|
|
|
# Multiply and then remove decimal. 10.10 -> 101000.0 -> 101000
|
|
|
|
MAC_OS_X_VERSION_MIN_REQUIRED=$(shell echo "$(MACOSX_MAJOR) * 10000 + $(MACOSX_MINOR) * 100" | bc | cut -d. -f1)
|
|
|
|
else
|
|
|
|
# Multiply by 100 and then remove decimal. 10.7 -> 1070.0 -> 1070
|
|
|
|
MAC_OS_X_VERSION_MIN_REQUIRED=$(shell echo "$(MACOSX_VERSION_MIN) * 100" | bc | cut -d. -f1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
LDFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN)
|
|
|
|
BASE_CFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN) \
|
|
|
|
-DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) \
|
|
|
|
-DREACTION
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
ifeq ($(ARCH),ppc)
|
2019-01-05 02:16:41 +00:00
|
|
|
BASE_CFLAGS += -arch ppc
|
|
|
|
ALTIVEC_CFLAGS = -faltivec
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),ppc64)
|
2019-01-05 02:16:41 +00:00
|
|
|
BASE_CFLAGS += -arch ppc64
|
|
|
|
ALTIVEC_CFLAGS = -faltivec
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
2013-07-21 23:15:13 +00:00
|
|
|
ifeq ($(ARCH),x86)
|
2011-06-30 20:39:19 +00:00
|
|
|
OPTIMIZEVM += -march=prescott -mfpmath=sse
|
|
|
|
# x86 vm will crash without -mstackrealign since MMX instructions will be
|
|
|
|
# used no matter what and they corrupt the frame pointer in VM calls
|
2012-01-13 16:30:06 +00:00
|
|
|
BASE_CFLAGS += -arch i386 -m32 -mstackrealign
|
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),x86_64)
|
2019-01-05 02:16:41 +00:00
|
|
|
OPTIMIZEVM += -mfpmath=sse
|
|
|
|
BASE_CFLAGS += -arch x86_64
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
# When compiling on OSX for OSX, we're not cross compiling as far as the
|
|
|
|
# Makefile is concerned, as target architecture is specified as a compiler
|
|
|
|
# argument
|
|
|
|
ifeq ($(COMPILE_PLATFORM),darwin)
|
|
|
|
CROSS_COMPILING=0
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CROSS_COMPILING),1)
|
2015-09-23 02:30:18 +00:00
|
|
|
ifeq ($(ARCH),x86_64)
|
|
|
|
CC=x86_64-apple-darwin13-cc
|
|
|
|
RANLIB=x86_64-apple-darwin13-ranlib
|
2013-07-21 23:15:13 +00:00
|
|
|
else
|
|
|
|
ifeq ($(ARCH),x86)
|
2015-09-23 02:30:18 +00:00
|
|
|
CC=i386-apple-darwin13-cc
|
|
|
|
RANLIB=i386-apple-darwin13-ranlib
|
2013-07-21 23:15:13 +00:00
|
|
|
else
|
|
|
|
$(error Architecture $(ARCH) is not supported when cross compiling)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
BASE_CFLAGS += -fno-strict-aliasing -fno-common -pipe
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
ifeq ($(USE_OPENAL),1)
|
2019-01-05 02:16:41 +00:00
|
|
|
ifneq ($(USE_LOCAL_HEADERS),1)
|
|
|
|
CLIENT_CFLAGS += -I/System/Library/Frameworks/OpenAL.framework/Headers
|
|
|
|
endif
|
2011-06-30 20:39:19 +00:00
|
|
|
ifneq ($(USE_OPENAL_DLOPEN),1)
|
|
|
|
CLIENT_LIBS += -framework OpenAL
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_CURL),1)
|
2015-09-23 02:30:18 +00:00
|
|
|
CLIENT_CFLAGS += $(CURL_CFLAGS)
|
2011-06-30 20:39:19 +00:00
|
|
|
ifneq ($(USE_CURL_DLOPEN),1)
|
2015-09-23 02:30:18 +00:00
|
|
|
CLIENT_LIBS += $(CURL_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
BASE_CFLAGS += -D_THREAD_SAFE=1
|
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
CLIENT_LIBS += -framework IOKit
|
|
|
|
RENDERER_LIBS += -framework OpenGL
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
ifeq ($(USE_LOCAL_HEADERS),1)
|
2019-01-05 02:16:41 +00:00
|
|
|
# libSDL2-2.0.0.dylib for PPC is SDL 2.0.1 + changes to compile
|
|
|
|
ifneq ($(findstring $(ARCH),ppc ppc64),)
|
|
|
|
BASE_CFLAGS += -I$(SDLHDIR)/include-macppc
|
|
|
|
else
|
|
|
|
BASE_CFLAGS += -I$(SDLHDIR)/include
|
|
|
|
endif
|
2011-06-30 20:39:19 +00:00
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
# We copy sdlmain before ranlib'ing it so that subversion doesn't think
|
|
|
|
# the file has been modified by each build.
|
|
|
|
LIBSDLMAIN=$(B)/libSDL2main.a
|
|
|
|
LIBSDLMAINSRC=$(LIBSDIR)/macosx/libSDL2main.a
|
|
|
|
CLIENT_LIBS += $(LIBSDIR)/macosx/libSDL2-2.0.0.dylib
|
|
|
|
RENDERER_LIBS += $(LIBSDIR)/macosx/libSDL2-2.0.0.dylib
|
|
|
|
CLIENT_EXTRA_FILES += $(LIBSDIR)/macosx/libSDL2-2.0.0.dylib
|
|
|
|
else
|
|
|
|
BASE_CFLAGS += -I/Library/Frameworks/SDL2.framework/Headers
|
|
|
|
CLIENT_LIBS += -framework SDL2
|
|
|
|
RENDERER_LIBS += -framework SDL2
|
|
|
|
endif
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
|
|
|
|
|
|
|
|
SHLIBEXT=dylib
|
|
|
|
SHLIBCFLAGS=-fPIC -fno-common
|
2012-01-13 16:30:06 +00:00
|
|
|
SHLIBLDFLAGS=-dynamiclib $(LDFLAGS) -Wl,-U,_com_altivec
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
NOTSHLIBCFLAGS=-mdynamic-no-pic
|
|
|
|
|
|
|
|
else # ifeq darwin
|
|
|
|
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# SETUP AND BUILD -- MINGW32
|
|
|
|
#############################################################################
|
|
|
|
|
2015-09-23 02:30:18 +00:00
|
|
|
ifdef MINGW
|
2011-06-30 20:39:19 +00:00
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
ifeq ($(CROSS_COMPILING),1)
|
|
|
|
# If CC is already set to something generic, we probably want to use
|
|
|
|
# something more specific
|
|
|
|
ifneq ($(findstring $(strip $(CC)),cc gcc),)
|
|
|
|
CC=
|
|
|
|
endif
|
|
|
|
|
|
|
|
# We need to figure out the correct gcc and windres
|
|
|
|
ifeq ($(ARCH),x86_64)
|
2019-01-05 02:16:41 +00:00
|
|
|
MINGW_PREFIXES=x86_64-w64-mingw32 amd64-mingw32msvc
|
2013-07-21 23:15:13 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),x86)
|
2019-01-05 02:16:41 +00:00
|
|
|
MINGW_PREFIXES=i686-w64-mingw32 i586-mingw32msvc i686-pc-mingw32
|
2013-07-21 23:15:13 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef CC
|
2019-01-05 02:16:41 +00:00
|
|
|
CC=$(firstword $(strip $(foreach MINGW_PREFIX, $(MINGW_PREFIXES), \
|
|
|
|
$(call bin_path, $(MINGW_PREFIX)-gcc))))
|
2013-07-21 23:15:13 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef WINDRES
|
2019-01-05 02:16:41 +00:00
|
|
|
WINDRES=$(firstword $(strip $(foreach MINGW_PREFIX, $(MINGW_PREFIXES), \
|
|
|
|
$(call bin_path, $(MINGW_PREFIX)-windres))))
|
2013-07-21 23:15:13 +00:00
|
|
|
endif
|
|
|
|
else
|
|
|
|
# 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
|
|
|
|
endif
|
2011-06-30 20:39:19 +00:00
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# using generic windres if specific one is not present
|
|
|
|
ifndef WINDRES
|
|
|
|
WINDRES=windres
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
|
2014-05-03 22:47:46 +00:00
|
|
|
ifeq ($(CC),)
|
|
|
|
$(error Cannot find a suitable cross compiler for $(PLATFORM))
|
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
|
2012-01-13 16:30:06 +00:00
|
|
|
-DUSE_ICON -DREACTION
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
# In the absence of wspiapi.h, require Windows XP or later
|
|
|
|
ifeq ($(shell test -e $(CMDIR)/wspiapi.h; echo $$?),1)
|
|
|
|
BASE_CFLAGS += -DWINVER=0x501
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_OPENAL),1)
|
|
|
|
CLIENT_CFLAGS += $(OPENAL_CFLAGS)
|
2012-01-13 16:30:06 +00:00
|
|
|
ifneq ($(USE_OPENAL_DLOPEN),1)
|
2011-06-30 20:39:19 +00:00
|
|
|
CLIENT_LDFLAGS += $(OPENAL_LDFLAGS)
|
|
|
|
endif
|
|
|
|
endif
|
2013-07-21 23:15:13 +00:00
|
|
|
|
|
|
|
ifeq ($(ARCH),x86_64)
|
2015-09-23 02:30:18 +00:00
|
|
|
OPTIMIZEVM = -O3
|
|
|
|
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
|
2011-06-30 20:39:19 +00:00
|
|
|
HAVE_VM_COMPILED = true
|
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),x86)
|
2015-09-23 02:30:18 +00:00
|
|
|
OPTIMIZEVM = -O3 -march=i586
|
2011-06-30 20:39:19 +00:00
|
|
|
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
|
|
|
|
HAVE_VM_COMPILED = true
|
|
|
|
endif
|
|
|
|
|
|
|
|
SHLIBEXT=dll
|
|
|
|
SHLIBCFLAGS=
|
2016-03-03 21:18:53 +00:00
|
|
|
SHLIBLDFLAGS=-shared $(LDFLAGS)
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
BINEXT=.exe
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
ifeq ($(CROSS_COMPILING),0)
|
|
|
|
TOOLS_BINEXT=.exe
|
|
|
|
endif
|
|
|
|
|
2015-09-23 02:30:18 +00:00
|
|
|
ifeq ($(COMPILE_PLATFORM),cygwin)
|
|
|
|
TOOLS_BINEXT=.exe
|
|
|
|
TOOLS_CC=$(CC)
|
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
LIBS= -lws2_32 -lwinmm -lpsapi
|
2019-01-05 02:16:41 +00:00
|
|
|
AUTOUPDATER_LIBS += -lwininet
|
|
|
|
|
2015-09-23 02:30:18 +00:00
|
|
|
# clang 3.4 doesn't support this
|
|
|
|
ifneq ("$(CC)", $(findstring "$(CC)", "clang" "clang++"))
|
|
|
|
CLIENT_LDFLAGS += -mwindows
|
|
|
|
endif
|
2012-01-13 16:30:06 +00:00
|
|
|
CLIENT_LIBS = -lgdi32 -lole32
|
2019-01-05 02:16:41 +00:00
|
|
|
RENDERER_LIBS = -lgdi32 -lole32 -static-libgcc
|
2013-07-21 23:15:13 +00:00
|
|
|
|
2012-10-04 13:47:15 +00:00
|
|
|
ifeq ($(USE_FREETYPE),1)
|
2015-09-23 02:30:18 +00:00
|
|
|
FREETYPE_CFLAGS = -Ifreetype2
|
2012-10-04 13:47:15 +00:00
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
ifeq ($(USE_CURL),1)
|
|
|
|
CLIENT_CFLAGS += $(CURL_CFLAGS)
|
|
|
|
ifneq ($(USE_CURL_DLOPEN),1)
|
|
|
|
ifeq ($(USE_LOCAL_HEADERS),1)
|
|
|
|
CLIENT_CFLAGS += -DCURL_STATICLIB
|
2013-07-21 23:15:13 +00:00
|
|
|
ifeq ($(ARCH),x86_64)
|
2019-01-05 02:16:41 +00:00
|
|
|
CLIENT_LIBS += $(LIBSDIR)/win64/libcurl.a -lcrypt32
|
2012-01-13 16:30:06 +00:00
|
|
|
else
|
2019-01-05 02:16:41 +00:00
|
|
|
CLIENT_LIBS += $(LIBSDIR)/win32/libcurl.a -lcrypt32
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
else
|
|
|
|
CLIENT_LIBS += $(CURL_LIBS)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(ARCH),x86)
|
|
|
|
# build 32bit
|
|
|
|
BASE_CFLAGS += -m32
|
|
|
|
else
|
|
|
|
BASE_CFLAGS += -m64
|
|
|
|
endif
|
|
|
|
|
|
|
|
# libmingw32 must be linked before libSDLmain
|
|
|
|
CLIENT_LIBS += -lmingw32
|
2012-01-13 16:30:06 +00:00
|
|
|
RENDERER_LIBS += -lmingw32
|
2013-07-21 23:15:13 +00:00
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
ifeq ($(USE_LOCAL_HEADERS),1)
|
|
|
|
CLIENT_CFLAGS += -I$(SDLHDIR)/include
|
2013-07-21 23:15:13 +00:00
|
|
|
ifeq ($(ARCH),x86)
|
2014-05-08 22:59:04 +00:00
|
|
|
CLIENT_LIBS += $(LIBSDIR)/win32/libSDL2main.a \
|
|
|
|
$(LIBSDIR)/win32/libSDL2.dll.a
|
|
|
|
RENDERER_LIBS += $(LIBSDIR)/win32/libSDL2main.a \
|
|
|
|
$(LIBSDIR)/win32/libSDL2.dll.a
|
|
|
|
SDLDLL=SDL2.dll
|
2015-09-23 02:30:18 +00:00
|
|
|
CLIENT_EXTRA_FILES += $(LIBSDIR)/win32/SDL2.dll
|
2011-06-30 20:39:19 +00:00
|
|
|
else
|
2014-05-08 22:59:04 +00:00
|
|
|
CLIENT_LIBS += $(LIBSDIR)/win64/libSDL264main.a \
|
|
|
|
$(LIBSDIR)/win64/libSDL264.dll.a
|
|
|
|
RENDERER_LIBS += $(LIBSDIR)/win64/libSDL264main.a \
|
|
|
|
$(LIBSDIR)/win64/libSDL264.dll.a
|
|
|
|
SDLDLL=SDL264.dll
|
2015-09-23 02:30:18 +00:00
|
|
|
CLIENT_EXTRA_FILES += $(LIBSDIR)/win64/SDL264.dll
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
else
|
|
|
|
CLIENT_CFLAGS += $(SDL_CFLAGS)
|
|
|
|
CLIENT_LIBS += $(SDL_LIBS)
|
2012-01-13 16:30:06 +00:00
|
|
|
RENDERER_LIBS += $(SDL_LIBS)
|
2014-05-08 22:59:04 +00:00
|
|
|
SDLDLL=SDL2.dll
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
|
2015-09-23 02:30:18 +00:00
|
|
|
else # ifdef MINGW
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# SETUP AND BUILD -- FREEBSD
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),freebsd)
|
|
|
|
|
|
|
|
# flags
|
2019-01-05 02:16:41 +00:00
|
|
|
BASE_CFLAGS = \
|
2011-06-30 20:39:19 +00:00
|
|
|
-Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
|
2012-12-12 20:56:23 +00:00
|
|
|
-DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON -DREACTION
|
2012-01-13 16:30:06 +00:00
|
|
|
CLIENT_CFLAGS += $(SDL_CFLAGS)
|
2011-06-30 20:39:19 +00:00
|
|
|
HAVE_VM_COMPILED = true
|
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
OPTIMIZEVM =
|
2011-06-30 20:39:19 +00:00
|
|
|
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
|
|
|
|
|
|
|
|
SHLIBEXT=so
|
|
|
|
SHLIBCFLAGS=-fPIC
|
|
|
|
SHLIBLDFLAGS=-shared $(LDFLAGS)
|
|
|
|
|
|
|
|
THREAD_LIBS=-lpthread
|
|
|
|
# don't need -ldl (FreeBSD)
|
|
|
|
LIBS=-lm
|
|
|
|
|
|
|
|
CLIENT_LIBS =
|
|
|
|
|
2012-01-13 16:30:06 +00:00
|
|
|
CLIENT_LIBS += $(SDL_LIBS)
|
2019-01-05 02:16:41 +00:00
|
|
|
RENDERER_LIBS = $(SDL_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
# optional features/libraries
|
|
|
|
ifeq ($(USE_OPENAL),1)
|
|
|
|
ifeq ($(USE_OPENAL_DLOPEN),1)
|
2015-09-23 02:30:18 +00:00
|
|
|
CLIENT_LIBS += $(THREAD_LIBS) $(OPENAL_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_CURL),1)
|
2015-09-23 02:30:18 +00:00
|
|
|
CLIENT_CFLAGS += $(CURL_CFLAGS)
|
2011-06-30 20:39:19 +00:00
|
|
|
ifeq ($(USE_CURL_DLOPEN),1)
|
2015-09-23 02:30:18 +00:00
|
|
|
CLIENT_LIBS += $(CURL_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# cross-compiling tweaks
|
2013-07-21 23:15:13 +00:00
|
|
|
ifeq ($(ARCH),x86)
|
2011-06-30 20:39:19 +00:00
|
|
|
ifeq ($(CROSS_COMPILING),1)
|
|
|
|
BASE_CFLAGS += -m32
|
|
|
|
endif
|
|
|
|
endif
|
2013-07-21 23:15:13 +00:00
|
|
|
ifeq ($(ARCH),x86_64)
|
2011-06-30 20:39:19 +00:00
|
|
|
ifeq ($(CROSS_COMPILING),1)
|
|
|
|
BASE_CFLAGS += -m64
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
else # ifeq freebsd
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# SETUP AND BUILD -- OPENBSD
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),openbsd)
|
|
|
|
|
|
|
|
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
|
2013-07-21 23:15:13 +00:00
|
|
|
-pipe -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON -DREACTION
|
2012-01-13 16:30:06 +00:00
|
|
|
CLIENT_CFLAGS += $(SDL_CFLAGS)
|
2011-06-30 20:39:19 +00:00
|
|
|
|
2015-09-23 02:30:18 +00:00
|
|
|
OPTIMIZEVM = -O3
|
2013-07-21 23:15:13 +00:00
|
|
|
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
|
|
|
|
|
|
|
|
ifeq ($(ARCH),x86_64)
|
2015-09-23 02:30:18 +00:00
|
|
|
OPTIMIZEVM = -O3
|
2013-07-21 23:15:13 +00:00
|
|
|
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
|
|
|
|
HAVE_VM_COMPILED = true
|
|
|
|
else
|
|
|
|
ifeq ($(ARCH),x86)
|
2015-09-23 02:30:18 +00:00
|
|
|
OPTIMIZEVM = -O3 -march=i586
|
2013-07-21 23:15:13 +00:00
|
|
|
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
|
|
|
|
HAVE_VM_COMPILED=true
|
|
|
|
else
|
|
|
|
ifeq ($(ARCH),ppc)
|
2019-01-05 02:16:41 +00:00
|
|
|
ALTIVEC_CFLAGS = -maltivec
|
2013-07-21 23:15:13 +00:00
|
|
|
HAVE_VM_COMPILED=true
|
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),ppc64)
|
2019-01-05 02:16:41 +00:00
|
|
|
ALTIVEC_CFLAGS = -maltivec
|
2013-07-21 23:15:13 +00:00
|
|
|
HAVE_VM_COMPILED=true
|
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),sparc64)
|
|
|
|
OPTIMIZE += -mtune=ultrasparc3 -mv8plus
|
|
|
|
OPTIMIZEVM += -mtune=ultrasparc3 -mv8plus
|
|
|
|
HAVE_VM_COMPILED=true
|
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),alpha)
|
|
|
|
# According to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=410555
|
|
|
|
# -ffast-math will cause the client to die with SIGFPE on Alpha
|
|
|
|
OPTIMIZE = $(OPTIMIZEVM)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
ifeq ($(USE_CURL),1)
|
2012-01-13 16:30:06 +00:00
|
|
|
CLIENT_CFLAGS += $(CURL_CFLAGS)
|
2011-06-30 20:39:19 +00:00
|
|
|
USE_CURL_DLOPEN=0
|
|
|
|
endif
|
|
|
|
|
2012-12-22 00:47:38 +00:00
|
|
|
# no shm_open on OpenBSD
|
|
|
|
USE_MUMBLE=0
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
SHLIBEXT=so
|
|
|
|
SHLIBCFLAGS=-fPIC
|
|
|
|
SHLIBLDFLAGS=-shared $(LDFLAGS)
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
THREAD_LIBS=-lpthread
|
2011-06-30 20:39:19 +00:00
|
|
|
LIBS=-lm
|
|
|
|
|
|
|
|
CLIENT_LIBS =
|
|
|
|
|
2012-01-13 16:30:06 +00:00
|
|
|
CLIENT_LIBS += $(SDL_LIBS)
|
2019-01-05 02:16:41 +00:00
|
|
|
RENDERER_LIBS = $(SDL_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
ifeq ($(USE_OPENAL),1)
|
|
|
|
ifneq ($(USE_OPENAL_DLOPEN),1)
|
2015-09-23 02:30:18 +00:00
|
|
|
CLIENT_LIBS += $(THREAD_LIBS) $(OPENAL_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
ifeq ($(USE_CURL),1)
|
2011-06-30 20:39:19 +00:00
|
|
|
ifneq ($(USE_CURL_DLOPEN),1)
|
2015-09-23 02:30:18 +00:00
|
|
|
CLIENT_LIBS += $(CURL_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
else # ifeq openbsd
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# SETUP AND BUILD -- NETBSD
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),netbsd)
|
|
|
|
|
|
|
|
LIBS=-lm
|
|
|
|
SHLIBEXT=so
|
|
|
|
SHLIBCFLAGS=-fPIC
|
|
|
|
SHLIBLDFLAGS=-shared $(LDFLAGS)
|
|
|
|
THREAD_LIBS=-lpthread
|
|
|
|
|
2012-12-12 20:56:23 +00:00
|
|
|
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -DREACTION
|
2011-06-30 20:39:19 +00:00
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
ifeq ($(ARCH),x86)
|
2012-01-13 16:30:06 +00:00
|
|
|
HAVE_VM_COMPILED=true
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
BUILD_CLIENT = 0
|
|
|
|
else # ifeq netbsd
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# SETUP AND BUILD -- IRIX
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),irix64)
|
2015-09-23 02:30:18 +00:00
|
|
|
LIB=lib
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
ARCH=mips
|
|
|
|
|
|
|
|
CC = c99
|
|
|
|
|
|
|
|
BASE_CFLAGS=-Dstricmp=strcasecmp -Xcpluscomm -woff 1185 \
|
2012-12-12 20:56:23 +00:00
|
|
|
-I. -I$(ROOT)/usr/include -DREACTION
|
2012-01-13 16:30:06 +00:00
|
|
|
CLIENT_CFLAGS += $(SDL_CFLAGS)
|
2011-06-30 20:39:19 +00:00
|
|
|
OPTIMIZE = -O3
|
2013-07-21 23:15:13 +00:00
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
SHLIBEXT=so
|
|
|
|
SHLIBCFLAGS=
|
|
|
|
SHLIBLDFLAGS=-shared
|
|
|
|
|
|
|
|
LIBS=-ldl -lm -lgen
|
2019-01-05 02:16:41 +00:00
|
|
|
AUTOUPDATER_LIBS += -ldl
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
# FIXME: The X libraries probably aren't necessary?
|
2012-01-13 16:30:06 +00:00
|
|
|
CLIENT_LIBS=-L/usr/X11/$(LIB) $(SDL_LIBS) \
|
2011-06-30 20:39:19 +00:00
|
|
|
-lX11 -lXext -lm
|
2019-01-05 02:16:41 +00:00
|
|
|
RENDERER_LIBS = $(SDL_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
else # ifeq IRIX
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# SETUP AND BUILD -- SunOS
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),sunos)
|
|
|
|
|
|
|
|
CC=gcc
|
|
|
|
INSTALL=ginstall
|
2019-01-05 02:16:41 +00:00
|
|
|
MKDIR=gmkdir -p
|
2011-06-30 20:39:19 +00:00
|
|
|
COPYDIR="/usr/local/share/games/quake3"
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
ifneq ($(ARCH),x86)
|
2011-06-30 20:39:19 +00:00
|
|
|
ifneq ($(ARCH),sparc)
|
|
|
|
$(error arch $(ARCH) is currently not supported)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
|
2012-12-12 20:56:23 +00:00
|
|
|
-pipe -DUSE_ICON -DREACTION
|
2012-01-13 16:30:06 +00:00
|
|
|
CLIENT_CFLAGS += $(SDL_CFLAGS)
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
OPTIMIZEVM = -O3 -funroll-loops
|
|
|
|
|
|
|
|
ifeq ($(ARCH),sparc)
|
|
|
|
OPTIMIZEVM += -O3 \
|
|
|
|
-fstrength-reduce -falign-functions=2 \
|
|
|
|
-mtune=ultrasparc3 -mv8plus -mno-faster-structs
|
|
|
|
HAVE_VM_COMPILED=true
|
|
|
|
else
|
2013-07-21 23:15:13 +00:00
|
|
|
ifeq ($(ARCH),x86)
|
2011-06-30 20:39:19 +00:00
|
|
|
OPTIMIZEVM += -march=i586 -fomit-frame-pointer \
|
|
|
|
-falign-functions=2 -fstrength-reduce
|
|
|
|
HAVE_VM_COMPILED=true
|
|
|
|
BASE_CFLAGS += -m32
|
|
|
|
CLIENT_CFLAGS += -I/usr/X11/include/NVIDIA
|
|
|
|
CLIENT_LDFLAGS += -L/usr/X11/lib/NVIDIA -R/usr/X11/lib/NVIDIA
|
|
|
|
endif
|
|
|
|
endif
|
2013-07-21 23:15:13 +00:00
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
|
|
|
|
|
|
|
|
SHLIBEXT=so
|
|
|
|
SHLIBCFLAGS=-fPIC
|
|
|
|
SHLIBLDFLAGS=-shared $(LDFLAGS)
|
|
|
|
|
|
|
|
THREAD_LIBS=-lpthread
|
|
|
|
LIBS=-lsocket -lnsl -ldl -lm
|
2019-01-05 02:16:41 +00:00
|
|
|
AUTOUPDATER_LIBS += -ldl
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
BOTCFLAGS=-O0
|
|
|
|
|
2012-01-13 16:30:06 +00:00
|
|
|
CLIENT_LIBS +=$(SDL_LIBS) -lX11 -lXext -liconv -lm
|
2019-01-05 02:16:41 +00:00
|
|
|
RENDERER_LIBS = $(SDL_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
else # ifeq sunos
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# SETUP AND BUILD -- GENERIC
|
|
|
|
#############################################################################
|
2012-01-13 16:30:06 +00:00
|
|
|
BASE_CFLAGS=
|
2011-06-30 20:39:19 +00:00
|
|
|
OPTIMIZE = -O3
|
|
|
|
|
|
|
|
SHLIBEXT=so
|
|
|
|
SHLIBCFLAGS=-fPIC
|
|
|
|
SHLIBLDFLAGS=-shared
|
|
|
|
|
|
|
|
endif #Linux
|
|
|
|
endif #darwin
|
2015-09-23 02:30:18 +00:00
|
|
|
endif #MINGW
|
2011-06-30 20:39:19 +00:00
|
|
|
endif #FreeBSD
|
|
|
|
endif #OpenBSD
|
|
|
|
endif #NetBSD
|
|
|
|
endif #IRIX
|
|
|
|
endif #SunOS
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
ifndef CC
|
|
|
|
CC=gcc
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef RANLIB
|
|
|
|
RANLIB=ranlib
|
|
|
|
endif
|
|
|
|
|
2012-01-13 16:30:06 +00:00
|
|
|
ifneq ($(HAVE_VM_COMPILED),true)
|
|
|
|
BASE_CFLAGS += -DNO_VM_COMPILED
|
|
|
|
BUILD_GAME_QVM=0
|
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
TARGETS =
|
|
|
|
|
|
|
|
ifndef FULLBINEXT
|
|
|
|
FULLBINEXT=.$(ARCH)$(BINEXT)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef SHLIBNAME
|
|
|
|
SHLIBNAME=$(ARCH).$(SHLIBEXT)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(BUILD_SERVER),0)
|
2012-03-30 13:12:20 +00:00
|
|
|
TARGETS += $(B)/$(SERVERBIN)$(FULLBINEXT)
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(BUILD_CLIENT),0)
|
2012-01-13 16:30:06 +00:00
|
|
|
ifneq ($(USE_RENDERER_DLOPEN),0)
|
2012-03-30 13:12:20 +00:00
|
|
|
TARGETS += $(B)/$(CLIENTBIN)$(FULLBINEXT) $(B)/renderer_opengl1_$(SHLIBNAME)
|
2015-09-23 02:30:18 +00:00
|
|
|
ifneq ($(BUILD_RENDERER_OPENGL2),0)
|
2013-07-21 23:15:13 +00:00
|
|
|
TARGETS += $(B)/renderer_opengl2_$(SHLIBNAME)
|
2012-01-13 16:30:06 +00:00
|
|
|
endif
|
|
|
|
else
|
2012-03-30 13:12:20 +00:00
|
|
|
TARGETS += $(B)/$(CLIENTBIN)$(FULLBINEXT)
|
2015-09-23 02:30:18 +00:00
|
|
|
ifneq ($(BUILD_RENDERER_OPENGL2),0)
|
2013-07-21 23:15:13 +00:00
|
|
|
TARGETS += $(B)/$(CLIENTBIN)_opengl2$(FULLBINEXT)
|
2012-01-13 16:30:06 +00:00
|
|
|
endif
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(BUILD_GAME_SO),0)
|
2012-03-30 13:12:20 +00:00
|
|
|
ifneq ($(BUILD_BASEGAME),0)
|
|
|
|
TARGETS += \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/$(BASEGAME)/cgame$(SHLIBNAME) \
|
|
|
|
$(B)/$(BASEGAME)/qagame$(SHLIBNAME) \
|
|
|
|
$(B)/$(BASEGAME)/ui$(SHLIBNAME)
|
2012-03-30 13:12:20 +00:00
|
|
|
endif
|
2011-06-30 20:39:19 +00:00
|
|
|
ifneq ($(BUILD_MISSIONPACK),0)
|
|
|
|
TARGETS += \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/$(MISSIONPACK)/cgame$(SHLIBNAME) \
|
|
|
|
$(B)/$(MISSIONPACK)/qagame$(SHLIBNAME) \
|
|
|
|
$(B)/$(MISSIONPACK)/ui$(SHLIBNAME)
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(BUILD_GAME_QVM),0)
|
2013-07-21 23:15:13 +00:00
|
|
|
ifneq ($(BUILD_BASEGAME),0)
|
|
|
|
TARGETS += \
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/vm/cgame.qvm \
|
|
|
|
$(B)/$(BASEGAME)/vm/qagame.qvm \
|
|
|
|
$(B)/$(BASEGAME)/vm/ui.qvm
|
2013-07-21 23:15:13 +00:00
|
|
|
endif
|
|
|
|
ifneq ($(BUILD_MISSIONPACK),0)
|
|
|
|
TARGETS += \
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/vm/cgame.qvm \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/$(MISSIONPACK)/vm/qagame.qvm \
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/vm/ui.qvm
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
ifneq ($(BUILD_AUTOUPDATER),0)
|
|
|
|
# PLEASE NOTE that if you run an exe on Windows Vista or later
|
|
|
|
# with "setup", "install", "update" or other related terms, it
|
|
|
|
# will unconditionally trigger a UAC prompt, and in the case of
|
|
|
|
# ioq3 calling CreateProcess() on it, it'll just fail immediately.
|
|
|
|
# So don't call this thing "autoupdater" here!
|
|
|
|
AUTOUPDATER_BIN := autosyncerator$(FULLBINEXT)
|
|
|
|
TARGETS += $(B)/$(AUTOUPDATER_BIN)
|
|
|
|
endif
|
|
|
|
|
2012-01-13 16:30:06 +00:00
|
|
|
ifeq ($(USE_OPENAL),1)
|
|
|
|
CLIENT_CFLAGS += -DUSE_OPENAL
|
|
|
|
ifeq ($(USE_OPENAL_DLOPEN),1)
|
|
|
|
CLIENT_CFLAGS += -DUSE_OPENAL_DLOPEN
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_CURL),1)
|
|
|
|
CLIENT_CFLAGS += -DUSE_CURL
|
|
|
|
ifeq ($(USE_CURL_DLOPEN),1)
|
|
|
|
CLIENT_CFLAGS += -DUSE_CURL_DLOPEN
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2016-03-03 21:18:53 +00:00
|
|
|
ifeq ($(USE_VOIP),1)
|
|
|
|
CLIENT_CFLAGS += -DUSE_VOIP
|
|
|
|
SERVER_CFLAGS += -DUSE_VOIP
|
|
|
|
NEED_OPUS=1
|
|
|
|
endif
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
ifeq ($(USE_CODEC_OPUS),1)
|
|
|
|
CLIENT_CFLAGS += -DUSE_CODEC_OPUS
|
2016-03-03 21:18:53 +00:00
|
|
|
NEED_OPUS=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(NEED_OPUS),1)
|
2013-07-21 23:15:13 +00:00
|
|
|
ifeq ($(USE_INTERNAL_OPUS),1)
|
2019-01-05 01:18:00 +00:00
|
|
|
OPUS_CFLAGS = -DOPUS_BUILD -DHAVE_LRINTF -DFLOATING_POINT -DFLOAT_APPROX -DUSE_ALLOCA \
|
2013-07-21 23:15:13 +00:00
|
|
|
-I$(OPUSDIR)/include -I$(OPUSDIR)/celt -I$(OPUSDIR)/silk \
|
2015-09-23 02:30:18 +00:00
|
|
|
-I$(OPUSDIR)/silk/float -I$(OPUSFILEDIR)/include
|
2013-07-21 23:15:13 +00:00
|
|
|
else
|
2019-01-05 02:16:41 +00:00
|
|
|
OPUS_CFLAGS ?= $(shell $(PKG_CONFIG) --silence-errors --cflags opusfile opus || true)
|
|
|
|
OPUS_LIBS ?= $(shell $(PKG_CONFIG) --silence-errors --libs opusfile opus || echo -lopusfile -lopus)
|
2013-07-21 23:15:13 +00:00
|
|
|
endif
|
2015-09-23 02:30:18 +00:00
|
|
|
CLIENT_CFLAGS += $(OPUS_CFLAGS)
|
|
|
|
CLIENT_LIBS += $(OPUS_LIBS)
|
2013-07-21 23:15:13 +00:00
|
|
|
NEED_OGG=1
|
|
|
|
endif
|
|
|
|
|
2014-05-03 22:47:46 +00:00
|
|
|
ifeq ($(USE_CODEC_VORBIS),1)
|
2015-09-23 02:30:18 +00:00
|
|
|
CLIENT_CFLAGS += -DUSE_CODEC_VORBIS
|
2014-05-03 22:47:46 +00:00
|
|
|
ifeq ($(USE_INTERNAL_VORBIS),1)
|
|
|
|
CLIENT_CFLAGS += -I$(VORBISDIR)/include -I$(VORBISDIR)/lib
|
2015-09-23 02:30:18 +00:00
|
|
|
else
|
2019-01-05 02:16:41 +00:00
|
|
|
VORBIS_CFLAGS ?= $(shell $(PKG_CONFIG) --silence-errors --cflags vorbisfile vorbis || true)
|
|
|
|
VORBIS_LIBS ?= $(shell $(PKG_CONFIG) --silence-errors --libs vorbisfile vorbis || echo -lvorbisfile -lvorbis)
|
2015-09-23 02:30:18 +00:00
|
|
|
endif
|
|
|
|
CLIENT_CFLAGS += $(VORBIS_CFLAGS)
|
|
|
|
CLIENT_LIBS += $(VORBIS_LIBS)
|
|
|
|
NEED_OGG=1
|
|
|
|
endif
|
2014-05-03 22:47:46 +00:00
|
|
|
|
2015-09-23 02:30:18 +00:00
|
|
|
ifeq ($(NEED_OGG),1)
|
|
|
|
ifeq ($(USE_INTERNAL_OGG),1)
|
|
|
|
OGG_CFLAGS = -I$(OGGDIR)/include
|
2014-05-03 22:47:46 +00:00
|
|
|
else
|
2019-01-05 02:16:41 +00:00
|
|
|
OGG_CFLAGS ?= $(shell $(PKG_CONFIG) --silence-errors --cflags ogg || true)
|
|
|
|
OGG_LIBS ?= $(shell $(PKG_CONFIG) --silence-errors --libs ogg || echo -logg)
|
2014-05-03 22:47:46 +00:00
|
|
|
endif
|
2015-09-23 02:30:18 +00:00
|
|
|
CLIENT_CFLAGS += $(OGG_CFLAGS)
|
|
|
|
CLIENT_LIBS += $(OGG_LIBS)
|
2014-05-03 22:47:46 +00:00
|
|
|
endif
|
|
|
|
|
2012-01-13 16:30:06 +00:00
|
|
|
ifeq ($(USE_RENDERER_DLOPEN),1)
|
|
|
|
CLIENT_CFLAGS += -DUSE_RENDERER_DLOPEN
|
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
ifeq ($(USE_MUMBLE),1)
|
|
|
|
CLIENT_CFLAGS += -DUSE_MUMBLE
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_INTERNAL_ZLIB),1)
|
2015-09-23 02:30:18 +00:00
|
|
|
ZLIB_CFLAGS = -DNO_GZIP -I$(ZDIR)
|
2011-06-30 20:39:19 +00:00
|
|
|
else
|
2019-01-05 02:16:41 +00:00
|
|
|
ZLIB_CFLAGS ?= $(shell $(PKG_CONFIG) --silence-errors --cflags zlib || true)
|
|
|
|
ZLIB_LIBS ?= $(shell $(PKG_CONFIG) --silence-errors --libs zlib || echo -lz)
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
2015-09-23 02:30:18 +00:00
|
|
|
BASE_CFLAGS += $(ZLIB_CFLAGS)
|
|
|
|
LIBS += $(ZLIB_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
ifeq ($(USE_INTERNAL_JPEG),1)
|
|
|
|
BASE_CFLAGS += -DUSE_INTERNAL_JPEG
|
|
|
|
BASE_CFLAGS += -I$(JPDIR)
|
|
|
|
else
|
2015-09-23 02:30:18 +00:00
|
|
|
# IJG libjpeg doesn't have pkg-config, but libjpeg-turbo uses libjpeg.pc;
|
|
|
|
# we fall back to hard-coded answers if libjpeg.pc is unavailable
|
2019-01-05 02:16:41 +00:00
|
|
|
JPEG_CFLAGS ?= $(shell $(PKG_CONFIG) --silence-errors --cflags libjpeg || true)
|
|
|
|
JPEG_LIBS ?= $(shell $(PKG_CONFIG) --silence-errors --libs libjpeg || echo -ljpeg)
|
2015-09-23 02:30:18 +00:00
|
|
|
BASE_CFLAGS += $(JPEG_CFLAGS)
|
|
|
|
RENDERER_LIBS += $(JPEG_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
|
2012-10-04 13:47:15 +00:00
|
|
|
ifeq ($(USE_FREETYPE),1)
|
2019-01-05 02:16:41 +00:00
|
|
|
FREETYPE_CFLAGS ?= $(shell $(PKG_CONFIG) --silence-errors --cflags freetype2 || true)
|
|
|
|
FREETYPE_LIBS ?= $(shell $(PKG_CONFIG) --silence-errors --libs freetype2 || echo -lfreetype)
|
2015-09-23 02:30:18 +00:00
|
|
|
|
|
|
|
BASE_CFLAGS += -DBUILD_FREETYPE $(FREETYPE_CFLAGS)
|
|
|
|
RENDERER_LIBS += $(FREETYPE_LIBS)
|
2012-10-04 13:47:15 +00:00
|
|
|
endif
|
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
ifeq ($(USE_AUTOUPDATER),1)
|
|
|
|
CLIENT_CFLAGS += -DUSE_AUTOUPDATER -DAUTOUPDATER_BIN=\\\"$(AUTOUPDATER_BIN)\\\"
|
|
|
|
SERVER_CFLAGS += -DUSE_AUTOUPDATER -DAUTOUPDATER_BIN=\\\"$(AUTOUPDATER_BIN)\\\"
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BUILD_AUTOUPDATER),1)
|
|
|
|
AUTOUPDATER_LIBS += $(LIBTOMCRYPTSRCDIR)/libtomcrypt.a $(TOMSFASTMATHSRCDIR)/libtfm.a
|
|
|
|
endif
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
ifeq ("$(CC)", $(findstring "$(CC)", "clang" "clang++"))
|
|
|
|
BASE_CFLAGS += -Qunused-arguments
|
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
ifdef DEFAULT_BASEDIR
|
|
|
|
BASE_CFLAGS += -DDEFAULT_BASEDIR=\\\"$(DEFAULT_BASEDIR)\\\"
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_LOCAL_HEADERS),1)
|
|
|
|
BASE_CFLAGS += -DUSE_LOCAL_HEADERS
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BUILD_STANDALONE),1)
|
|
|
|
BASE_CFLAGS += -DSTANDALONE
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(GENERATE_DEPENDENCIES),1)
|
|
|
|
DEPEND_CFLAGS = -MMD
|
|
|
|
else
|
|
|
|
DEPEND_CFLAGS =
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(NO_STRIP),1)
|
|
|
|
STRIP_FLAG =
|
|
|
|
else
|
|
|
|
STRIP_FLAG = -s
|
|
|
|
endif
|
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
# https://reproducible-builds.org/specs/source-date-epoch/
|
|
|
|
ifdef SOURCE_DATE_EPOCH
|
|
|
|
BASE_CFLAGS += -DPRODUCT_DATE=\\\"$(shell date --date="@$$SOURCE_DATE_EPOCH" "+%b %_d %Y" | sed -e 's/ /\\\ /'g)\\\"
|
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
BASE_CFLAGS += -DPRODUCT_VERSION=\\\"$(VERSION)\\\"
|
2011-07-18 17:54:39 +00:00
|
|
|
BASE_CFLAGS += -Wformat=2 -Wno-format-zero-length -Wformat-security -Wno-format-nonliteral
|
|
|
|
BASE_CFLAGS += -Wstrict-aliasing=2 -Wmissing-format-attribute
|
|
|
|
BASE_CFLAGS += -Wdisabled-optimization
|
|
|
|
BASE_CFLAGS += -Werror-implicit-function-declaration
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
ifeq ($(V),1)
|
|
|
|
echo_cmd=@:
|
|
|
|
Q=
|
|
|
|
else
|
|
|
|
echo_cmd=@echo
|
|
|
|
Q=@
|
|
|
|
endif
|
|
|
|
|
|
|
|
define DO_CC
|
|
|
|
$(echo_cmd) "CC $<"
|
|
|
|
$(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(CLIENT_CFLAGS) $(OPTIMIZE) -o $@ -c $<
|
|
|
|
endef
|
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
define DO_CC_ALTIVEC
|
|
|
|
$(echo_cmd) "CC $<"
|
|
|
|
$(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(CLIENT_CFLAGS) $(OPTIMIZE) $(ALTIVEC_CFLAGS) -o $@ -c $<
|
|
|
|
endef
|
|
|
|
|
2012-01-13 16:30:06 +00:00
|
|
|
define DO_REF_CC
|
|
|
|
$(echo_cmd) "REF_CC $<"
|
|
|
|
$(Q)$(CC) $(SHLIBCFLAGS) $(CFLAGS) $(CLIENT_CFLAGS) $(OPTIMIZE) -o $@ -c $<
|
|
|
|
endef
|
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
define DO_REF_CC_ALTIVEC
|
|
|
|
$(echo_cmd) "REF_CC $<"
|
|
|
|
$(Q)$(CC) $(SHLIBCFLAGS) $(CFLAGS) $(CLIENT_CFLAGS) $(OPTIMIZE) $(ALTIVEC_CFLAGS) -o $@ -c $<
|
|
|
|
endef
|
|
|
|
|
2012-12-12 20:56:23 +00:00
|
|
|
define DO_REF_STR
|
|
|
|
$(echo_cmd) "REF_STR $<"
|
|
|
|
$(Q)rm -f $@
|
|
|
|
$(Q)echo "const char *fallbackShader_$(notdir $(basename $<)) =" >> $@
|
2020-09-08 11:07:15 +00:00
|
|
|
$(Q)cat $< | perl -pe 's/^(.*)$$/\"$$1\\n\"/' >> $@
|
2012-12-12 20:56:23 +00:00
|
|
|
$(Q)echo ";" >> $@
|
2020-09-08 11:07:15 +00:00
|
|
|
$(Q)cat $@
|
2012-12-12 20:56:23 +00:00
|
|
|
endef
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
define DO_BOT_CC
|
|
|
|
$(echo_cmd) "BOT_CC $<"
|
|
|
|
$(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(BOTCFLAGS) $(OPTIMIZE) -DBOTLIB -o $@ -c $<
|
|
|
|
endef
|
|
|
|
|
|
|
|
ifeq ($(GENERATE_DEPENDENCIES),1)
|
|
|
|
DO_QVM_DEP=cat $(@:%.o=%.d) | sed -e 's/\.o/\.asm/g' >> $(@:%.o=%.d)
|
|
|
|
endif
|
|
|
|
|
|
|
|
define DO_SHLIB_CC
|
|
|
|
$(echo_cmd) "SHLIB_CC $<"
|
2012-03-30 13:12:20 +00:00
|
|
|
$(Q)$(CC) $(BASEGAME_CFLAGS) $(SHLIBCFLAGS) $(CFLAGS) $(OPTIMIZEVM) -o $@ -c $<
|
2011-06-30 20:39:19 +00:00
|
|
|
$(Q)$(DO_QVM_DEP)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define DO_GAME_CC
|
|
|
|
$(echo_cmd) "GAME_CC $<"
|
2012-03-30 13:12:20 +00:00
|
|
|
$(Q)$(CC) $(BASEGAME_CFLAGS) -DQAGAME $(SHLIBCFLAGS) $(CFLAGS) $(OPTIMIZEVM) -o $@ -c $<
|
2011-06-30 20:39:19 +00:00
|
|
|
$(Q)$(DO_QVM_DEP)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define DO_CGAME_CC
|
|
|
|
$(echo_cmd) "CGAME_CC $<"
|
2012-03-30 13:12:20 +00:00
|
|
|
$(Q)$(CC) $(BASEGAME_CFLAGS) -DCGAME $(SHLIBCFLAGS) $(CFLAGS) $(OPTIMIZEVM) -o $@ -c $<
|
2011-06-30 20:39:19 +00:00
|
|
|
$(Q)$(DO_QVM_DEP)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define DO_UI_CC
|
|
|
|
$(echo_cmd) "UI_CC $<"
|
2012-03-30 13:12:20 +00:00
|
|
|
$(Q)$(CC) $(BASEGAME_CFLAGS) -DUI $(SHLIBCFLAGS) $(CFLAGS) $(OPTIMIZEVM) -o $@ -c $<
|
2011-06-30 20:39:19 +00:00
|
|
|
$(Q)$(DO_QVM_DEP)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define DO_SHLIB_CC_MISSIONPACK
|
|
|
|
$(echo_cmd) "SHLIB_CC_MISSIONPACK $<"
|
2012-03-30 13:12:20 +00:00
|
|
|
$(Q)$(CC) $(MISSIONPACK_CFLAGS) $(SHLIBCFLAGS) $(CFLAGS) $(OPTIMIZEVM) -o $@ -c $<
|
2011-06-30 20:39:19 +00:00
|
|
|
$(Q)$(DO_QVM_DEP)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define DO_GAME_CC_MISSIONPACK
|
|
|
|
$(echo_cmd) "GAME_CC_MISSIONPACK $<"
|
2012-03-30 13:12:20 +00:00
|
|
|
$(Q)$(CC) $(MISSIONPACK_CFLAGS) -DQAGAME $(SHLIBCFLAGS) $(CFLAGS) $(OPTIMIZEVM) -o $@ -c $<
|
2011-06-30 20:39:19 +00:00
|
|
|
$(Q)$(DO_QVM_DEP)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define DO_CGAME_CC_MISSIONPACK
|
|
|
|
$(echo_cmd) "CGAME_CC_MISSIONPACK $<"
|
2012-03-30 13:12:20 +00:00
|
|
|
$(Q)$(CC) $(MISSIONPACK_CFLAGS) -DCGAME $(SHLIBCFLAGS) $(CFLAGS) $(OPTIMIZEVM) -o $@ -c $<
|
2011-06-30 20:39:19 +00:00
|
|
|
$(Q)$(DO_QVM_DEP)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define DO_UI_CC_MISSIONPACK
|
|
|
|
$(echo_cmd) "UI_CC_MISSIONPACK $<"
|
2012-03-30 13:12:20 +00:00
|
|
|
$(Q)$(CC) $(MISSIONPACK_CFLAGS) -DUI $(SHLIBCFLAGS) $(CFLAGS) $(OPTIMIZEVM) -o $@ -c $<
|
2011-06-30 20:39:19 +00:00
|
|
|
$(Q)$(DO_QVM_DEP)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define DO_AS
|
|
|
|
$(echo_cmd) "AS $<"
|
|
|
|
$(Q)$(CC) $(CFLAGS) $(OPTIMIZE) -x assembler-with-cpp -o $@ -c $<
|
|
|
|
endef
|
|
|
|
|
|
|
|
define DO_DED_CC
|
|
|
|
$(echo_cmd) "DED_CC $<"
|
|
|
|
$(Q)$(CC) $(NOTSHLIBCFLAGS) -DDEDICATED $(CFLAGS) $(SERVER_CFLAGS) $(OPTIMIZE) -o $@ -c $<
|
|
|
|
endef
|
|
|
|
|
|
|
|
define DO_WINDRES
|
|
|
|
$(echo_cmd) "WINDRES $<"
|
|
|
|
$(Q)$(WINDRES) -i $< -o $@
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# MAIN TARGETS
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
default: release
|
|
|
|
all: debug release
|
|
|
|
|
|
|
|
debug:
|
|
|
|
@$(MAKE) targets B=$(BD) CFLAGS="$(CFLAGS) $(BASE_CFLAGS) $(DEPEND_CFLAGS)" \
|
|
|
|
OPTIMIZE="$(DEBUG_CFLAGS)" OPTIMIZEVM="$(DEBUG_CFLAGS)" \
|
|
|
|
CLIENT_CFLAGS="$(CLIENT_CFLAGS)" SERVER_CFLAGS="$(SERVER_CFLAGS)" V=$(V)
|
|
|
|
|
|
|
|
release:
|
|
|
|
@$(MAKE) targets B=$(BR) CFLAGS="$(CFLAGS) $(BASE_CFLAGS) $(DEPEND_CFLAGS)" \
|
|
|
|
OPTIMIZE="-DNDEBUG $(OPTIMIZE)" OPTIMIZEVM="-DNDEBUG $(OPTIMIZEVM)" \
|
|
|
|
CLIENT_CFLAGS="$(CLIENT_CFLAGS)" SERVER_CFLAGS="$(SERVER_CFLAGS)" V=$(V)
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
ifneq ($(call bin_path, tput),)
|
2015-09-23 02:30:18 +00:00
|
|
|
TERM_COLUMNS=$(shell if c=`tput cols`; then echo $$(($$c-4)); else echo 76; fi)
|
2013-07-21 23:15:13 +00:00
|
|
|
else
|
|
|
|
TERM_COLUMNS=76
|
|
|
|
endif
|
|
|
|
|
2015-09-23 02:30:18 +00:00
|
|
|
define ADD_COPY_TARGET
|
|
|
|
TARGETS += $2
|
|
|
|
$2: $1
|
|
|
|
$(echo_cmd) "CP $$<"
|
|
|
|
@cp $1 $2
|
|
|
|
endef
|
|
|
|
|
|
|
|
# These functions allow us to generate rules for copying a list of files
|
|
|
|
# into the base directory of the build; this is useful for bundling libs,
|
|
|
|
# README files or whatever else
|
|
|
|
define GENERATE_COPY_TARGETS
|
|
|
|
$(foreach FILE,$1, \
|
|
|
|
$(eval $(call ADD_COPY_TARGET, \
|
|
|
|
$(FILE), \
|
|
|
|
$(addprefix $(B)/,$(notdir $(FILE))))))
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(call GENERATE_COPY_TARGETS,$(EXTRA_FILES))
|
|
|
|
|
|
|
|
ifneq ($(BUILD_CLIENT),0)
|
|
|
|
$(call GENERATE_COPY_TARGETS,$(CLIENT_EXTRA_FILES))
|
|
|
|
endif
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
NAKED_TARGETS=$(shell echo $(TARGETS) | sed -e "s!$(B)/!!g")
|
|
|
|
|
2016-03-03 21:18:53 +00:00
|
|
|
print_list=-@for i in $(1); \
|
2013-07-21 23:15:13 +00:00
|
|
|
do \
|
|
|
|
echo " $$i"; \
|
|
|
|
done
|
|
|
|
|
|
|
|
ifneq ($(call bin_path, fmt),)
|
|
|
|
print_wrapped=@echo $(1) | fmt -w $(TERM_COLUMNS) | sed -e "s/^\(.*\)$$/ \1/"
|
|
|
|
else
|
|
|
|
print_wrapped=$(print_list)
|
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
# Create the build directories, check libraries and print out
|
|
|
|
# an informational message, then start building
|
|
|
|
targets: makedirs
|
|
|
|
@echo ""
|
2013-07-21 23:15:13 +00:00
|
|
|
@echo "Building in $(B):"
|
2011-06-30 20:39:19 +00:00
|
|
|
@echo " PLATFORM: $(PLATFORM)"
|
|
|
|
@echo " ARCH: $(ARCH)"
|
|
|
|
@echo " VERSION: $(VERSION)"
|
|
|
|
@echo " COMPILE_PLATFORM: $(COMPILE_PLATFORM)"
|
|
|
|
@echo " COMPILE_ARCH: $(COMPILE_ARCH)"
|
2019-01-05 02:16:41 +00:00
|
|
|
@echo " HAVE_VM_COMPILED: $(HAVE_VM_COMPILED)"
|
|
|
|
@echo " PKG_CONFIG: $(PKG_CONFIG)"
|
2011-06-30 20:39:19 +00:00
|
|
|
@echo " CC: $(CC)"
|
2013-07-21 23:15:13 +00:00
|
|
|
ifeq ($(PLATFORM),mingw32)
|
|
|
|
@echo " WINDRES: $(WINDRES)"
|
|
|
|
endif
|
2011-06-30 20:39:19 +00:00
|
|
|
@echo ""
|
|
|
|
@echo " CFLAGS:"
|
2013-07-21 23:15:13 +00:00
|
|
|
$(call print_wrapped, $(CFLAGS) $(OPTIMIZE))
|
2011-06-30 20:39:19 +00:00
|
|
|
@echo ""
|
|
|
|
@echo " CLIENT_CFLAGS:"
|
2013-07-21 23:15:13 +00:00
|
|
|
$(call print_wrapped, $(CLIENT_CFLAGS))
|
2011-06-30 20:39:19 +00:00
|
|
|
@echo ""
|
|
|
|
@echo " SERVER_CFLAGS:"
|
2013-07-21 23:15:13 +00:00
|
|
|
$(call print_wrapped, $(SERVER_CFLAGS))
|
2011-06-30 20:39:19 +00:00
|
|
|
@echo ""
|
|
|
|
@echo " LDFLAGS:"
|
2013-07-21 23:15:13 +00:00
|
|
|
$(call print_wrapped, $(LDFLAGS))
|
2011-06-30 20:39:19 +00:00
|
|
|
@echo ""
|
|
|
|
@echo " LIBS:"
|
2013-07-21 23:15:13 +00:00
|
|
|
$(call print_wrapped, $(LIBS))
|
2011-06-30 20:39:19 +00:00
|
|
|
@echo ""
|
|
|
|
@echo " CLIENT_LIBS:"
|
2013-07-21 23:15:13 +00:00
|
|
|
$(call print_wrapped, $(CLIENT_LIBS))
|
2011-06-30 20:39:19 +00:00
|
|
|
@echo ""
|
2019-01-05 02:16:41 +00:00
|
|
|
@echo " AUTOUPDATER_LIBS:"
|
|
|
|
$(call print_wrapped, $(AUTOUPDATER_LIBS))
|
|
|
|
@echo ""
|
2011-06-30 20:39:19 +00:00
|
|
|
@echo " Output:"
|
2013-07-21 23:15:13 +00:00
|
|
|
$(call print_list, $(NAKED_TARGETS))
|
2011-06-30 20:39:19 +00:00
|
|
|
@echo ""
|
|
|
|
ifneq ($(TARGETS),)
|
2013-07-21 23:15:13 +00:00
|
|
|
ifndef DEBUG_MAKEFILE
|
|
|
|
@$(MAKE) $(TARGETS) $(B).zip V=$(V)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(B).zip: $(TARGETS)
|
|
|
|
ifeq ($(PLATFORM),darwin)
|
|
|
|
ifdef ARCHIVE
|
|
|
|
@("./make-macosx-app.sh" release $(ARCH); if [ "$$?" -eq 0 ] && [ -d "$(B)/ioquake3.app" ]; then rm -f $@; cd $(B) && zip --symlinks -r9 ../../$@ `find "ioquake3.app" -print | sed -e "s!$(B)/!!g"`; else rm -f $@; cd $(B) && zip -r9 ../../$@ $(NAKED_TARGETS); fi)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
ifneq ($(PLATFORM),darwin)
|
|
|
|
ifdef ARCHIVE
|
|
|
|
@rm -f $@
|
|
|
|
@(cd $(B) && zip -r9 ../../$@ $(NAKED_TARGETS))
|
|
|
|
endif
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
makedirs:
|
2019-01-05 02:16:41 +00:00
|
|
|
@$(MKDIR) $(B)/autoupdater
|
|
|
|
@$(MKDIR) $(B)/client/opus
|
|
|
|
@$(MKDIR) $(B)/client/vorbis
|
|
|
|
@$(MKDIR) $(B)/renderergl1
|
|
|
|
@$(MKDIR) $(B)/renderergl2
|
|
|
|
@$(MKDIR) $(B)/renderergl2/glsl
|
|
|
|
@$(MKDIR) $(B)/ded
|
|
|
|
@$(MKDIR) $(B)/$(BASEGAME)/cgame
|
|
|
|
@$(MKDIR) $(B)/$(BASEGAME)/game
|
|
|
|
@$(MKDIR) $(B)/$(BASEGAME)/ui
|
|
|
|
@$(MKDIR) $(B)/$(BASEGAME)/qcommon
|
|
|
|
@$(MKDIR) $(B)/$(BASEGAME)/vm
|
|
|
|
@$(MKDIR) $(B)/$(MISSIONPACK)/cgame
|
|
|
|
@$(MKDIR) $(B)/$(MISSIONPACK)/game
|
|
|
|
@$(MKDIR) $(B)/$(MISSIONPACK)/ui
|
|
|
|
@$(MKDIR) $(B)/$(MISSIONPACK)/qcommon
|
|
|
|
@$(MKDIR) $(B)/$(MISSIONPACK)/vm
|
|
|
|
@$(MKDIR) $(B)/tools/asm
|
|
|
|
@$(MKDIR) $(B)/tools/etc
|
|
|
|
@$(MKDIR) $(B)/tools/rcc
|
|
|
|
@$(MKDIR) $(B)/tools/cpp
|
|
|
|
@$(MKDIR) $(B)/tools/lburg
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# QVM BUILD TOOLS
|
|
|
|
#############################################################################
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
ifndef TOOLS_CC
|
|
|
|
# A compiler which probably produces native binaries
|
|
|
|
TOOLS_CC = gcc
|
|
|
|
endif
|
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
ifndef YACC
|
|
|
|
YACC = yacc
|
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
TOOLS_OPTIMIZE = -g -Wall -fno-strict-aliasing
|
|
|
|
TOOLS_CFLAGS += $(TOOLS_OPTIMIZE) \
|
|
|
|
-DTEMPDIR=\"$(TEMPDIR)\" -DSYSTEM=\"\" \
|
|
|
|
-I$(Q3LCCSRCDIR) \
|
|
|
|
-I$(LBURGDIR)
|
|
|
|
TOOLS_LIBS =
|
|
|
|
TOOLS_LDFLAGS =
|
|
|
|
|
|
|
|
ifeq ($(GENERATE_DEPENDENCIES),1)
|
2013-07-21 23:15:13 +00:00
|
|
|
TOOLS_CFLAGS += -MMD
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
define DO_YACC
|
|
|
|
$(echo_cmd) "YACC $<"
|
|
|
|
$(Q)$(YACC) $<
|
|
|
|
$(Q)mv -f y.tab.c $@
|
|
|
|
endef
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
define DO_TOOLS_CC
|
|
|
|
$(echo_cmd) "TOOLS_CC $<"
|
2013-07-21 23:15:13 +00:00
|
|
|
$(Q)$(TOOLS_CC) $(TOOLS_CFLAGS) -o $@ -c $<
|
2011-06-30 20:39:19 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define DO_TOOLS_CC_DAGCHECK
|
|
|
|
$(echo_cmd) "TOOLS_CC_DAGCHECK $<"
|
2013-07-21 23:15:13 +00:00
|
|
|
$(Q)$(TOOLS_CC) $(TOOLS_CFLAGS) -Wno-unused -o $@ -c $<
|
2011-06-30 20:39:19 +00:00
|
|
|
endef
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
LBURG = $(B)/tools/lburg/lburg$(TOOLS_BINEXT)
|
2011-06-30 20:39:19 +00:00
|
|
|
DAGCHECK_C = $(B)/tools/rcc/dagcheck.c
|
2013-07-21 23:15:13 +00:00
|
|
|
Q3RCC = $(B)/tools/q3rcc$(TOOLS_BINEXT)
|
|
|
|
Q3CPP = $(B)/tools/q3cpp$(TOOLS_BINEXT)
|
|
|
|
Q3LCC = $(B)/tools/q3lcc$(TOOLS_BINEXT)
|
|
|
|
Q3ASM = $(B)/tools/q3asm$(TOOLS_BINEXT)
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
LBURGOBJ= \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/tools/lburg/lburg.o \
|
|
|
|
$(B)/tools/lburg/gram.o
|
2011-06-30 20:39:19 +00:00
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
# override GNU Make built-in rule for converting gram.y to gram.c
|
|
|
|
%.c: %.y
|
|
|
|
ifeq ($(USE_YACC),1)
|
|
|
|
$(DO_YACC)
|
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
$(B)/tools/lburg/%.o: $(LBURGDIR)/%.c
|
|
|
|
$(DO_TOOLS_CC)
|
|
|
|
|
|
|
|
$(LBURG): $(LBURGOBJ)
|
|
|
|
$(echo_cmd) "LD $@"
|
2013-07-21 23:15:13 +00:00
|
|
|
$(Q)$(TOOLS_CC) $(TOOLS_CFLAGS) $(TOOLS_LDFLAGS) -o $@ $^ $(TOOLS_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
Q3RCCOBJ = \
|
|
|
|
$(B)/tools/rcc/alloc.o \
|
|
|
|
$(B)/tools/rcc/bind.o \
|
|
|
|
$(B)/tools/rcc/bytecode.o \
|
|
|
|
$(B)/tools/rcc/dag.o \
|
|
|
|
$(B)/tools/rcc/dagcheck.o \
|
|
|
|
$(B)/tools/rcc/decl.o \
|
|
|
|
$(B)/tools/rcc/enode.o \
|
|
|
|
$(B)/tools/rcc/error.o \
|
|
|
|
$(B)/tools/rcc/event.o \
|
|
|
|
$(B)/tools/rcc/expr.o \
|
|
|
|
$(B)/tools/rcc/gen.o \
|
|
|
|
$(B)/tools/rcc/init.o \
|
|
|
|
$(B)/tools/rcc/inits.o \
|
|
|
|
$(B)/tools/rcc/input.o \
|
|
|
|
$(B)/tools/rcc/lex.o \
|
|
|
|
$(B)/tools/rcc/list.o \
|
|
|
|
$(B)/tools/rcc/main.o \
|
|
|
|
$(B)/tools/rcc/null.o \
|
|
|
|
$(B)/tools/rcc/output.o \
|
|
|
|
$(B)/tools/rcc/prof.o \
|
|
|
|
$(B)/tools/rcc/profio.o \
|
|
|
|
$(B)/tools/rcc/simp.o \
|
|
|
|
$(B)/tools/rcc/stmt.o \
|
|
|
|
$(B)/tools/rcc/string.o \
|
|
|
|
$(B)/tools/rcc/sym.o \
|
|
|
|
$(B)/tools/rcc/symbolic.o \
|
|
|
|
$(B)/tools/rcc/trace.o \
|
|
|
|
$(B)/tools/rcc/tree.o \
|
|
|
|
$(B)/tools/rcc/types.o
|
|
|
|
|
|
|
|
$(DAGCHECK_C): $(LBURG) $(Q3LCCSRCDIR)/dagcheck.md
|
|
|
|
$(echo_cmd) "LBURG $(Q3LCCSRCDIR)/dagcheck.md"
|
|
|
|
$(Q)$(LBURG) $(Q3LCCSRCDIR)/dagcheck.md $@
|
|
|
|
|
|
|
|
$(B)/tools/rcc/dagcheck.o: $(DAGCHECK_C)
|
|
|
|
$(DO_TOOLS_CC_DAGCHECK)
|
|
|
|
|
|
|
|
$(B)/tools/rcc/%.o: $(Q3LCCSRCDIR)/%.c
|
|
|
|
$(DO_TOOLS_CC)
|
|
|
|
|
|
|
|
$(Q3RCC): $(Q3RCCOBJ)
|
|
|
|
$(echo_cmd) "LD $@"
|
2013-07-21 23:15:13 +00:00
|
|
|
$(Q)$(TOOLS_CC) $(TOOLS_CFLAGS) $(TOOLS_LDFLAGS) -o $@ $^ $(TOOLS_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
Q3CPPOBJ = \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/tools/cpp/cpp.o \
|
|
|
|
$(B)/tools/cpp/lex.o \
|
|
|
|
$(B)/tools/cpp/nlist.o \
|
|
|
|
$(B)/tools/cpp/tokens.o \
|
|
|
|
$(B)/tools/cpp/macro.o \
|
|
|
|
$(B)/tools/cpp/eval.o \
|
|
|
|
$(B)/tools/cpp/include.o \
|
|
|
|
$(B)/tools/cpp/hideset.o \
|
|
|
|
$(B)/tools/cpp/getopt.o \
|
|
|
|
$(B)/tools/cpp/unix.o
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
$(B)/tools/cpp/%.o: $(Q3CPPDIR)/%.c
|
|
|
|
$(DO_TOOLS_CC)
|
|
|
|
|
|
|
|
$(Q3CPP): $(Q3CPPOBJ)
|
|
|
|
$(echo_cmd) "LD $@"
|
2013-07-21 23:15:13 +00:00
|
|
|
$(Q)$(TOOLS_CC) $(TOOLS_CFLAGS) $(TOOLS_LDFLAGS) -o $@ $^ $(TOOLS_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
Q3LCCOBJ = \
|
|
|
|
$(B)/tools/etc/lcc.o \
|
|
|
|
$(B)/tools/etc/bytecode.o
|
|
|
|
|
|
|
|
$(B)/tools/etc/%.o: $(Q3LCCETCDIR)/%.c
|
|
|
|
$(DO_TOOLS_CC)
|
|
|
|
|
|
|
|
$(Q3LCC): $(Q3LCCOBJ) $(Q3RCC) $(Q3CPP)
|
|
|
|
$(echo_cmd) "LD $@"
|
2013-07-21 23:15:13 +00:00
|
|
|
$(Q)$(TOOLS_CC) $(TOOLS_CFLAGS) $(TOOLS_LDFLAGS) -o $@ $(Q3LCCOBJ) $(TOOLS_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
define DO_Q3LCC
|
|
|
|
$(echo_cmd) "Q3LCC $<"
|
2012-03-30 13:12:20 +00:00
|
|
|
$(Q)$(Q3LCC) $(BASEGAME_CFLAGS) -o $@ $<
|
2011-06-30 20:39:19 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define DO_CGAME_Q3LCC
|
|
|
|
$(echo_cmd) "CGAME_Q3LCC $<"
|
2012-03-30 13:12:20 +00:00
|
|
|
$(Q)$(Q3LCC) $(BASEGAME_CFLAGS) -DCGAME -o $@ $<
|
2011-06-30 20:39:19 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define DO_GAME_Q3LCC
|
|
|
|
$(echo_cmd) "GAME_Q3LCC $<"
|
2012-03-30 13:12:20 +00:00
|
|
|
$(Q)$(Q3LCC) $(BASEGAME_CFLAGS) -DQAGAME -o $@ $<
|
2011-06-30 20:39:19 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define DO_UI_Q3LCC
|
|
|
|
$(echo_cmd) "UI_Q3LCC $<"
|
2012-03-30 13:12:20 +00:00
|
|
|
$(Q)$(Q3LCC) $(BASEGAME_CFLAGS) -DUI -o $@ $<
|
2011-06-30 20:39:19 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define DO_Q3LCC_MISSIONPACK
|
|
|
|
$(echo_cmd) "Q3LCC_MISSIONPACK $<"
|
2012-03-30 13:12:20 +00:00
|
|
|
$(Q)$(Q3LCC) $(MISSIONPACK_CFLAGS) -o $@ $<
|
2011-06-30 20:39:19 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define DO_CGAME_Q3LCC_MISSIONPACK
|
|
|
|
$(echo_cmd) "CGAME_Q3LCC_MISSIONPACK $<"
|
2012-03-30 13:12:20 +00:00
|
|
|
$(Q)$(Q3LCC) $(MISSIONPACK_CFLAGS) -DCGAME -o $@ $<
|
2011-06-30 20:39:19 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define DO_GAME_Q3LCC_MISSIONPACK
|
|
|
|
$(echo_cmd) "GAME_Q3LCC_MISSIONPACK $<"
|
2012-03-30 13:12:20 +00:00
|
|
|
$(Q)$(Q3LCC) $(MISSIONPACK_CFLAGS) -DQAGAME -o $@ $<
|
2011-06-30 20:39:19 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define DO_UI_Q3LCC_MISSIONPACK
|
|
|
|
$(echo_cmd) "UI_Q3LCC_MISSIONPACK $<"
|
2012-03-30 13:12:20 +00:00
|
|
|
$(Q)$(Q3LCC) $(MISSIONPACK_CFLAGS) -DUI -o $@ $<
|
2011-06-30 20:39:19 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
|
|
Q3ASMOBJ = \
|
|
|
|
$(B)/tools/asm/q3asm.o \
|
|
|
|
$(B)/tools/asm/cmdlib.o
|
|
|
|
|
|
|
|
$(B)/tools/asm/%.o: $(Q3ASMDIR)/%.c
|
|
|
|
$(DO_TOOLS_CC)
|
|
|
|
|
|
|
|
$(Q3ASM): $(Q3ASMOBJ)
|
|
|
|
$(echo_cmd) "LD $@"
|
2013-07-21 23:15:13 +00:00
|
|
|
$(Q)$(TOOLS_CC) $(TOOLS_CFLAGS) $(TOOLS_LDFLAGS) -o $@ $^ $(TOOLS_LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
#############################################################################
|
|
|
|
# AUTOUPDATER
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
define DO_AUTOUPDATER_CC
|
|
|
|
$(echo_cmd) "AUTOUPDATER_CC $<"
|
|
|
|
$(Q)$(CC) $(CFLAGS) -I$(LIBTOMCRYPTSRCDIR)/src/headers -I$(TOMSFASTMATHSRCDIR)/src/headers $(CURL_CFLAGS) -o $@ -c $<
|
|
|
|
endef
|
|
|
|
|
|
|
|
Q3AUTOUPDATEROBJ = \
|
|
|
|
$(B)/autoupdater/autoupdater.o
|
|
|
|
|
|
|
|
$(B)/autoupdater/%.o: $(AUTOUPDATERSRCDIR)/%.c
|
|
|
|
$(DO_AUTOUPDATER_CC)
|
|
|
|
|
|
|
|
$(B)/$(AUTOUPDATER_BIN): $(Q3AUTOUPDATEROBJ)
|
|
|
|
$(echo_cmd) "AUTOUPDATER_LD $@"
|
|
|
|
$(Q)$(CC) $(LDFLAGS) -o $@ $(Q3AUTOUPDATEROBJ) $(AUTOUPDATER_LIBS)
|
|
|
|
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
#############################################################################
|
|
|
|
# CLIENT/SERVER
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
Q3OBJ = \
|
|
|
|
$(B)/client/cl_cgame.o \
|
|
|
|
$(B)/client/cl_cin.o \
|
|
|
|
$(B)/client/cl_console.o \
|
|
|
|
$(B)/client/cl_input.o \
|
|
|
|
$(B)/client/cl_keys.o \
|
|
|
|
$(B)/client/cl_main.o \
|
|
|
|
$(B)/client/cl_net_chan.o \
|
|
|
|
$(B)/client/cl_parse.o \
|
|
|
|
$(B)/client/cl_scrn.o \
|
|
|
|
$(B)/client/cl_ui.o \
|
|
|
|
$(B)/client/cl_avi.o \
|
|
|
|
\
|
|
|
|
$(B)/client/cm_load.o \
|
|
|
|
$(B)/client/cm_patch.o \
|
|
|
|
$(B)/client/cm_polylib.o \
|
|
|
|
$(B)/client/cm_test.o \
|
|
|
|
$(B)/client/cm_trace.o \
|
|
|
|
\
|
|
|
|
$(B)/client/cmd.o \
|
|
|
|
$(B)/client/common.o \
|
|
|
|
$(B)/client/cvar.o \
|
|
|
|
$(B)/client/files.o \
|
|
|
|
$(B)/client/md4.o \
|
|
|
|
$(B)/client/md5.o \
|
|
|
|
$(B)/client/msg.o \
|
|
|
|
$(B)/client/net_chan.o \
|
|
|
|
$(B)/client/net_ip.o \
|
|
|
|
$(B)/client/huffman.o \
|
|
|
|
\
|
2019-01-05 02:16:41 +00:00
|
|
|
$(B)/client/snd_altivec.o \
|
2011-06-30 20:39:19 +00:00
|
|
|
$(B)/client/snd_adpcm.o \
|
|
|
|
$(B)/client/snd_dma.o \
|
|
|
|
$(B)/client/snd_mem.o \
|
|
|
|
$(B)/client/snd_mix.o \
|
|
|
|
$(B)/client/snd_wavelet.o \
|
|
|
|
\
|
|
|
|
$(B)/client/snd_main.o \
|
|
|
|
$(B)/client/snd_codec.o \
|
|
|
|
$(B)/client/snd_codec_wav.o \
|
|
|
|
$(B)/client/snd_codec_ogg.o \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/client/snd_codec_opus.o \
|
2011-06-30 20:39:19 +00:00
|
|
|
\
|
|
|
|
$(B)/client/qal.o \
|
|
|
|
$(B)/client/snd_openal.o \
|
|
|
|
\
|
|
|
|
$(B)/client/cl_curl.o \
|
|
|
|
\
|
|
|
|
$(B)/client/sv_bot.o \
|
|
|
|
$(B)/client/sv_ccmds.o \
|
|
|
|
$(B)/client/sv_client.o \
|
|
|
|
$(B)/client/sv_game.o \
|
|
|
|
$(B)/client/sv_init.o \
|
|
|
|
$(B)/client/sv_main.o \
|
|
|
|
$(B)/client/sv_net_chan.o \
|
|
|
|
$(B)/client/sv_snapshot.o \
|
|
|
|
$(B)/client/sv_world.o \
|
|
|
|
\
|
|
|
|
$(B)/client/q_math.o \
|
|
|
|
$(B)/client/q_shared.o \
|
|
|
|
\
|
|
|
|
$(B)/client/unzip.o \
|
|
|
|
$(B)/client/ioapi.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 \
|
|
|
|
$(B)/client/be_aas_debug.o \
|
|
|
|
$(B)/client/be_aas_entity.o \
|
|
|
|
$(B)/client/be_aas_file.o \
|
|
|
|
$(B)/client/be_aas_main.o \
|
|
|
|
$(B)/client/be_aas_move.o \
|
|
|
|
$(B)/client/be_aas_optimize.o \
|
|
|
|
$(B)/client/be_aas_reach.o \
|
|
|
|
$(B)/client/be_aas_route.o \
|
|
|
|
$(B)/client/be_aas_routealt.o \
|
|
|
|
$(B)/client/be_aas_sample.o \
|
|
|
|
$(B)/client/be_ai_char.o \
|
|
|
|
$(B)/client/be_ai_chat.o \
|
|
|
|
$(B)/client/be_ai_gen.o \
|
|
|
|
$(B)/client/be_ai_goal.o \
|
|
|
|
$(B)/client/be_ai_move.o \
|
|
|
|
$(B)/client/be_ai_weap.o \
|
|
|
|
$(B)/client/be_ai_weight.o \
|
|
|
|
$(B)/client/be_ea.o \
|
|
|
|
$(B)/client/be_interface.o \
|
|
|
|
$(B)/client/l_crc.o \
|
|
|
|
$(B)/client/l_libvar.o \
|
|
|
|
$(B)/client/l_log.o \
|
|
|
|
$(B)/client/l_memory.o \
|
|
|
|
$(B)/client/l_precomp.o \
|
|
|
|
$(B)/client/l_script.o \
|
|
|
|
$(B)/client/l_struct.o \
|
|
|
|
\
|
|
|
|
$(B)/client/sdl_input.o \
|
|
|
|
$(B)/client/sdl_snd.o \
|
|
|
|
\
|
|
|
|
$(B)/client/con_log.o \
|
2019-01-05 02:16:41 +00:00
|
|
|
$(B)/client/sys_autoupdater.o \
|
2011-06-30 20:39:19 +00:00
|
|
|
$(B)/client/sys_main.o
|
|
|
|
|
2015-09-23 02:30:18 +00:00
|
|
|
ifdef MINGW
|
2012-02-26 14:46:31 +00:00
|
|
|
Q3OBJ += \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/client/con_passive.o
|
2012-02-26 14:46:31 +00:00
|
|
|
else
|
|
|
|
Q3OBJ += \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/client/con_tty.o
|
2012-02-26 14:46:31 +00:00
|
|
|
endif
|
|
|
|
|
2012-01-13 16:30:06 +00:00
|
|
|
Q3R2OBJ = \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl2/tr_animation.o \
|
|
|
|
$(B)/renderergl2/tr_backend.o \
|
|
|
|
$(B)/renderergl2/tr_bsp.o \
|
|
|
|
$(B)/renderergl2/tr_cmds.o \
|
|
|
|
$(B)/renderergl2/tr_curve.o \
|
2016-03-03 21:18:53 +00:00
|
|
|
$(B)/renderergl2/tr_dsa.o \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl2/tr_extramath.o \
|
|
|
|
$(B)/renderergl2/tr_extensions.o \
|
|
|
|
$(B)/renderergl2/tr_fbo.o \
|
|
|
|
$(B)/renderergl2/tr_flares.o \
|
|
|
|
$(B)/renderergl2/tr_font.o \
|
|
|
|
$(B)/renderergl2/tr_glsl.o \
|
|
|
|
$(B)/renderergl2/tr_image.o \
|
|
|
|
$(B)/renderergl2/tr_image_bmp.o \
|
2015-09-23 02:30:18 +00:00
|
|
|
$(B)/renderergl2/tr_image_jpg.o \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl2/tr_image_pcx.o \
|
2015-09-23 02:30:18 +00:00
|
|
|
$(B)/renderergl2/tr_image_png.o \
|
|
|
|
$(B)/renderergl2/tr_image_tga.o \
|
2016-03-03 21:18:53 +00:00
|
|
|
$(B)/renderergl2/tr_image_dds.o \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl2/tr_init.o \
|
|
|
|
$(B)/renderergl2/tr_light.o \
|
|
|
|
$(B)/renderergl2/tr_main.o \
|
|
|
|
$(B)/renderergl2/tr_marks.o \
|
|
|
|
$(B)/renderergl2/tr_mesh.o \
|
|
|
|
$(B)/renderergl2/tr_model.o \
|
|
|
|
$(B)/renderergl2/tr_model_iqm.o \
|
|
|
|
$(B)/renderergl2/tr_noise.o \
|
|
|
|
$(B)/renderergl2/tr_postprocess.o \
|
|
|
|
$(B)/renderergl2/tr_scene.o \
|
|
|
|
$(B)/renderergl2/tr_shade.o \
|
|
|
|
$(B)/renderergl2/tr_shade_calc.o \
|
|
|
|
$(B)/renderergl2/tr_shader.o \
|
|
|
|
$(B)/renderergl2/tr_shadows.o \
|
|
|
|
$(B)/renderergl2/tr_sky.o \
|
|
|
|
$(B)/renderergl2/tr_surface.o \
|
|
|
|
$(B)/renderergl2/tr_vbo.o \
|
|
|
|
$(B)/renderergl2/tr_world.o \
|
2012-01-13 16:30:06 +00:00
|
|
|
\
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl1/sdl_gamma.o \
|
|
|
|
$(B)/renderergl1/sdl_glimp.o
|
|
|
|
|
2012-12-12 20:56:23 +00:00
|
|
|
Q3R2STRINGOBJ = \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl2/glsl/bokeh_fp.o \
|
|
|
|
$(B)/renderergl2/glsl/bokeh_vp.o \
|
|
|
|
$(B)/renderergl2/glsl/calclevels4x_fp.o \
|
|
|
|
$(B)/renderergl2/glsl/calclevels4x_vp.o \
|
|
|
|
$(B)/renderergl2/glsl/depthblur_fp.o \
|
|
|
|
$(B)/renderergl2/glsl/depthblur_vp.o \
|
|
|
|
$(B)/renderergl2/glsl/dlight_fp.o \
|
|
|
|
$(B)/renderergl2/glsl/dlight_vp.o \
|
|
|
|
$(B)/renderergl2/glsl/down4x_fp.o \
|
|
|
|
$(B)/renderergl2/glsl/down4x_vp.o \
|
|
|
|
$(B)/renderergl2/glsl/fogpass_fp.o \
|
|
|
|
$(B)/renderergl2/glsl/fogpass_vp.o \
|
|
|
|
$(B)/renderergl2/glsl/generic_fp.o \
|
|
|
|
$(B)/renderergl2/glsl/generic_vp.o \
|
|
|
|
$(B)/renderergl2/glsl/lightall_fp.o \
|
|
|
|
$(B)/renderergl2/glsl/lightall_vp.o \
|
|
|
|
$(B)/renderergl2/glsl/pshadow_fp.o \
|
|
|
|
$(B)/renderergl2/glsl/pshadow_vp.o \
|
|
|
|
$(B)/renderergl2/glsl/shadowfill_fp.o \
|
|
|
|
$(B)/renderergl2/glsl/shadowfill_vp.o \
|
|
|
|
$(B)/renderergl2/glsl/shadowmask_fp.o \
|
|
|
|
$(B)/renderergl2/glsl/shadowmask_vp.o \
|
|
|
|
$(B)/renderergl2/glsl/ssao_fp.o \
|
|
|
|
$(B)/renderergl2/glsl/ssao_vp.o \
|
|
|
|
$(B)/renderergl2/glsl/texturecolor_fp.o \
|
|
|
|
$(B)/renderergl2/glsl/texturecolor_vp.o \
|
|
|
|
$(B)/renderergl2/glsl/tonemap_fp.o \
|
|
|
|
$(B)/renderergl2/glsl/tonemap_vp.o
|
2012-01-13 16:30:06 +00:00
|
|
|
|
|
|
|
Q3ROBJ = \
|
2019-01-05 02:16:41 +00:00
|
|
|
$(B)/renderergl1/tr_altivec.o \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl1/tr_animation.o \
|
|
|
|
$(B)/renderergl1/tr_backend.o \
|
|
|
|
$(B)/renderergl1/tr_bsp.o \
|
|
|
|
$(B)/renderergl1/tr_cmds.o \
|
|
|
|
$(B)/renderergl1/tr_curve.o \
|
|
|
|
$(B)/renderergl1/tr_flares.o \
|
|
|
|
$(B)/renderergl1/tr_font.o \
|
|
|
|
$(B)/renderergl1/tr_image.o \
|
|
|
|
$(B)/renderergl1/tr_image_bmp.o \
|
2015-09-23 02:30:18 +00:00
|
|
|
$(B)/renderergl1/tr_image_jpg.o \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl1/tr_image_pcx.o \
|
2015-09-23 02:30:18 +00:00
|
|
|
$(B)/renderergl1/tr_image_png.o \
|
|
|
|
$(B)/renderergl1/tr_image_tga.o \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl1/tr_init.o \
|
|
|
|
$(B)/renderergl1/tr_light.o \
|
|
|
|
$(B)/renderergl1/tr_main.o \
|
|
|
|
$(B)/renderergl1/tr_marks.o \
|
|
|
|
$(B)/renderergl1/tr_mesh.o \
|
|
|
|
$(B)/renderergl1/tr_model.o \
|
|
|
|
$(B)/renderergl1/tr_model_iqm.o \
|
|
|
|
$(B)/renderergl1/tr_noise.o \
|
|
|
|
$(B)/renderergl1/tr_scene.o \
|
|
|
|
$(B)/renderergl1/tr_shade.o \
|
|
|
|
$(B)/renderergl1/tr_shade_calc.o \
|
|
|
|
$(B)/renderergl1/tr_shader.o \
|
|
|
|
$(B)/renderergl1/tr_shadows.o \
|
|
|
|
$(B)/renderergl1/tr_sky.o \
|
|
|
|
$(B)/renderergl1/tr_surface.o \
|
|
|
|
$(B)/renderergl1/tr_world.o \
|
2012-01-13 16:30:06 +00:00
|
|
|
\
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl1/sdl_gamma.o \
|
|
|
|
$(B)/renderergl1/sdl_glimp.o
|
2012-12-12 20:56:23 +00:00
|
|
|
|
2012-01-13 16:30:06 +00:00
|
|
|
ifneq ($(USE_RENDERER_DLOPEN), 0)
|
|
|
|
Q3ROBJ += \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl1/q_shared.o \
|
|
|
|
$(B)/renderergl1/puff.o \
|
|
|
|
$(B)/renderergl1/q_math.o \
|
|
|
|
$(B)/renderergl1/tr_subs.o
|
2012-01-13 16:30:06 +00:00
|
|
|
|
|
|
|
Q3R2OBJ += \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl1/q_shared.o \
|
|
|
|
$(B)/renderergl1/puff.o \
|
|
|
|
$(B)/renderergl1/q_math.o \
|
|
|
|
$(B)/renderergl1/tr_subs.o
|
2012-01-13 16:30:06 +00:00
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
ifneq ($(USE_INTERNAL_JPEG),0)
|
2012-01-13 16:30:06 +00:00
|
|
|
JPGOBJ = \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl1/jaricom.o \
|
|
|
|
$(B)/renderergl1/jcapimin.o \
|
|
|
|
$(B)/renderergl1/jcapistd.o \
|
|
|
|
$(B)/renderergl1/jcarith.o \
|
|
|
|
$(B)/renderergl1/jccoefct.o \
|
|
|
|
$(B)/renderergl1/jccolor.o \
|
|
|
|
$(B)/renderergl1/jcdctmgr.o \
|
|
|
|
$(B)/renderergl1/jchuff.o \
|
|
|
|
$(B)/renderergl1/jcinit.o \
|
|
|
|
$(B)/renderergl1/jcmainct.o \
|
|
|
|
$(B)/renderergl1/jcmarker.o \
|
|
|
|
$(B)/renderergl1/jcmaster.o \
|
|
|
|
$(B)/renderergl1/jcomapi.o \
|
|
|
|
$(B)/renderergl1/jcparam.o \
|
|
|
|
$(B)/renderergl1/jcprepct.o \
|
|
|
|
$(B)/renderergl1/jcsample.o \
|
|
|
|
$(B)/renderergl1/jctrans.o \
|
|
|
|
$(B)/renderergl1/jdapimin.o \
|
|
|
|
$(B)/renderergl1/jdapistd.o \
|
|
|
|
$(B)/renderergl1/jdarith.o \
|
|
|
|
$(B)/renderergl1/jdatadst.o \
|
|
|
|
$(B)/renderergl1/jdatasrc.o \
|
|
|
|
$(B)/renderergl1/jdcoefct.o \
|
|
|
|
$(B)/renderergl1/jdcolor.o \
|
|
|
|
$(B)/renderergl1/jddctmgr.o \
|
|
|
|
$(B)/renderergl1/jdhuff.o \
|
|
|
|
$(B)/renderergl1/jdinput.o \
|
|
|
|
$(B)/renderergl1/jdmainct.o \
|
|
|
|
$(B)/renderergl1/jdmarker.o \
|
|
|
|
$(B)/renderergl1/jdmaster.o \
|
|
|
|
$(B)/renderergl1/jdmerge.o \
|
|
|
|
$(B)/renderergl1/jdpostct.o \
|
|
|
|
$(B)/renderergl1/jdsample.o \
|
|
|
|
$(B)/renderergl1/jdtrans.o \
|
|
|
|
$(B)/renderergl1/jerror.o \
|
|
|
|
$(B)/renderergl1/jfdctflt.o \
|
|
|
|
$(B)/renderergl1/jfdctfst.o \
|
|
|
|
$(B)/renderergl1/jfdctint.o \
|
|
|
|
$(B)/renderergl1/jidctflt.o \
|
|
|
|
$(B)/renderergl1/jidctfst.o \
|
|
|
|
$(B)/renderergl1/jidctint.o \
|
|
|
|
$(B)/renderergl1/jmemmgr.o \
|
|
|
|
$(B)/renderergl1/jmemnobs.o \
|
|
|
|
$(B)/renderergl1/jquant1.o \
|
|
|
|
$(B)/renderergl1/jquant2.o \
|
|
|
|
$(B)/renderergl1/jutils.o
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
2013-07-21 23:15:13 +00:00
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
ifeq ($(ARCH),x86)
|
|
|
|
Q3OBJ += \
|
|
|
|
$(B)/client/snd_mixa.o \
|
|
|
|
$(B)/client/matha.o \
|
|
|
|
$(B)/client/snapvector.o \
|
|
|
|
$(B)/client/ftola.o
|
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),x86_64)
|
|
|
|
Q3OBJ += \
|
|
|
|
$(B)/client/snapvector.o \
|
|
|
|
$(B)/client/ftola.o
|
|
|
|
endif
|
|
|
|
|
2016-03-03 21:18:53 +00:00
|
|
|
ifeq ($(NEED_OPUS),1)
|
2013-07-21 23:15:13 +00:00
|
|
|
ifeq ($(USE_INTERNAL_OPUS),1)
|
|
|
|
Q3OBJ += \
|
2014-05-03 22:47:46 +00:00
|
|
|
$(B)/client/opus/analysis.o \
|
|
|
|
$(B)/client/opus/mlp.o \
|
|
|
|
$(B)/client/opus/mlp_data.o \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/client/opus/opus.o \
|
|
|
|
$(B)/client/opus/opus_decoder.o \
|
|
|
|
$(B)/client/opus/opus_encoder.o \
|
|
|
|
$(B)/client/opus/opus_multistream.o \
|
2014-05-03 22:47:46 +00:00
|
|
|
$(B)/client/opus/opus_multistream_encoder.o \
|
|
|
|
$(B)/client/opus/opus_multistream_decoder.o \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/client/opus/repacketizer.o \
|
|
|
|
\
|
|
|
|
$(B)/client/opus/bands.o \
|
|
|
|
$(B)/client/opus/celt.o \
|
|
|
|
$(B)/client/opus/cwrs.o \
|
|
|
|
$(B)/client/opus/entcode.o \
|
|
|
|
$(B)/client/opus/entdec.o \
|
|
|
|
$(B)/client/opus/entenc.o \
|
|
|
|
$(B)/client/opus/kiss_fft.o \
|
|
|
|
$(B)/client/opus/laplace.o \
|
|
|
|
$(B)/client/opus/mathops.o \
|
|
|
|
$(B)/client/opus/mdct.o \
|
|
|
|
$(B)/client/opus/modes.o \
|
|
|
|
$(B)/client/opus/pitch.o \
|
2014-05-03 22:47:46 +00:00
|
|
|
$(B)/client/opus/celt_encoder.o \
|
|
|
|
$(B)/client/opus/celt_decoder.o \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/client/opus/celt_lpc.o \
|
|
|
|
$(B)/client/opus/quant_bands.o \
|
|
|
|
$(B)/client/opus/rate.o \
|
|
|
|
$(B)/client/opus/vq.o \
|
|
|
|
\
|
|
|
|
$(B)/client/opus/CNG.o \
|
|
|
|
$(B)/client/opus/code_signs.o \
|
|
|
|
$(B)/client/opus/init_decoder.o \
|
|
|
|
$(B)/client/opus/decode_core.o \
|
|
|
|
$(B)/client/opus/decode_frame.o \
|
|
|
|
$(B)/client/opus/decode_parameters.o \
|
|
|
|
$(B)/client/opus/decode_indices.o \
|
|
|
|
$(B)/client/opus/decode_pulses.o \
|
|
|
|
$(B)/client/opus/decoder_set_fs.o \
|
|
|
|
$(B)/client/opus/dec_API.o \
|
|
|
|
$(B)/client/opus/enc_API.o \
|
|
|
|
$(B)/client/opus/encode_indices.o \
|
|
|
|
$(B)/client/opus/encode_pulses.o \
|
|
|
|
$(B)/client/opus/gain_quant.o \
|
|
|
|
$(B)/client/opus/interpolate.o \
|
|
|
|
$(B)/client/opus/LP_variable_cutoff.o \
|
|
|
|
$(B)/client/opus/NLSF_decode.o \
|
|
|
|
$(B)/client/opus/NSQ.o \
|
|
|
|
$(B)/client/opus/NSQ_del_dec.o \
|
|
|
|
$(B)/client/opus/PLC.o \
|
|
|
|
$(B)/client/opus/shell_coder.o \
|
|
|
|
$(B)/client/opus/tables_gain.o \
|
|
|
|
$(B)/client/opus/tables_LTP.o \
|
|
|
|
$(B)/client/opus/tables_NLSF_CB_NB_MB.o \
|
|
|
|
$(B)/client/opus/tables_NLSF_CB_WB.o \
|
|
|
|
$(B)/client/opus/tables_other.o \
|
|
|
|
$(B)/client/opus/tables_pitch_lag.o \
|
|
|
|
$(B)/client/opus/tables_pulses_per_block.o \
|
|
|
|
$(B)/client/opus/VAD.o \
|
|
|
|
$(B)/client/opus/control_audio_bandwidth.o \
|
|
|
|
$(B)/client/opus/quant_LTP_gains.o \
|
|
|
|
$(B)/client/opus/VQ_WMat_EC.o \
|
|
|
|
$(B)/client/opus/HP_variable_cutoff.o \
|
|
|
|
$(B)/client/opus/NLSF_encode.o \
|
|
|
|
$(B)/client/opus/NLSF_VQ.o \
|
|
|
|
$(B)/client/opus/NLSF_unpack.o \
|
|
|
|
$(B)/client/opus/NLSF_del_dec_quant.o \
|
|
|
|
$(B)/client/opus/process_NLSFs.o \
|
|
|
|
$(B)/client/opus/stereo_LR_to_MS.o \
|
|
|
|
$(B)/client/opus/stereo_MS_to_LR.o \
|
|
|
|
$(B)/client/opus/check_control_input.o \
|
|
|
|
$(B)/client/opus/control_SNR.o \
|
|
|
|
$(B)/client/opus/init_encoder.o \
|
|
|
|
$(B)/client/opus/control_codec.o \
|
|
|
|
$(B)/client/opus/A2NLSF.o \
|
|
|
|
$(B)/client/opus/ana_filt_bank_1.o \
|
|
|
|
$(B)/client/opus/biquad_alt.o \
|
|
|
|
$(B)/client/opus/bwexpander_32.o \
|
|
|
|
$(B)/client/opus/bwexpander.o \
|
|
|
|
$(B)/client/opus/debug.o \
|
|
|
|
$(B)/client/opus/decode_pitch.o \
|
|
|
|
$(B)/client/opus/inner_prod_aligned.o \
|
|
|
|
$(B)/client/opus/lin2log.o \
|
|
|
|
$(B)/client/opus/log2lin.o \
|
|
|
|
$(B)/client/opus/LPC_analysis_filter.o \
|
2019-01-05 01:18:00 +00:00
|
|
|
$(B)/client/opus/LPC_fit.o \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/client/opus/LPC_inv_pred_gain.o \
|
|
|
|
$(B)/client/opus/table_LSF_cos.o \
|
|
|
|
$(B)/client/opus/NLSF2A.o \
|
|
|
|
$(B)/client/opus/NLSF_stabilize.o \
|
|
|
|
$(B)/client/opus/NLSF_VQ_weights_laroia.o \
|
|
|
|
$(B)/client/opus/pitch_est_tables.o \
|
|
|
|
$(B)/client/opus/resampler.o \
|
|
|
|
$(B)/client/opus/resampler_down2_3.o \
|
|
|
|
$(B)/client/opus/resampler_down2.o \
|
|
|
|
$(B)/client/opus/resampler_private_AR2.o \
|
|
|
|
$(B)/client/opus/resampler_private_down_FIR.o \
|
|
|
|
$(B)/client/opus/resampler_private_IIR_FIR.o \
|
|
|
|
$(B)/client/opus/resampler_private_up2_HQ.o \
|
|
|
|
$(B)/client/opus/resampler_rom.o \
|
|
|
|
$(B)/client/opus/sigm_Q15.o \
|
|
|
|
$(B)/client/opus/sort.o \
|
|
|
|
$(B)/client/opus/sum_sqr_shift.o \
|
|
|
|
$(B)/client/opus/stereo_decode_pred.o \
|
|
|
|
$(B)/client/opus/stereo_encode_pred.o \
|
|
|
|
$(B)/client/opus/stereo_find_predictor.o \
|
|
|
|
$(B)/client/opus/stereo_quant_pred.o \
|
|
|
|
\
|
|
|
|
$(B)/client/opus/apply_sine_window_FLP.o \
|
|
|
|
$(B)/client/opus/corrMatrix_FLP.o \
|
|
|
|
$(B)/client/opus/encode_frame_FLP.o \
|
|
|
|
$(B)/client/opus/find_LPC_FLP.o \
|
|
|
|
$(B)/client/opus/find_LTP_FLP.o \
|
|
|
|
$(B)/client/opus/find_pitch_lags_FLP.o \
|
|
|
|
$(B)/client/opus/find_pred_coefs_FLP.o \
|
|
|
|
$(B)/client/opus/LPC_analysis_filter_FLP.o \
|
|
|
|
$(B)/client/opus/LTP_analysis_filter_FLP.o \
|
|
|
|
$(B)/client/opus/LTP_scale_ctrl_FLP.o \
|
|
|
|
$(B)/client/opus/noise_shape_analysis_FLP.o \
|
|
|
|
$(B)/client/opus/process_gains_FLP.o \
|
|
|
|
$(B)/client/opus/regularize_correlations_FLP.o \
|
|
|
|
$(B)/client/opus/residual_energy_FLP.o \
|
|
|
|
$(B)/client/opus/warped_autocorrelation_FLP.o \
|
|
|
|
$(B)/client/opus/wrappers_FLP.o \
|
|
|
|
$(B)/client/opus/autocorrelation_FLP.o \
|
|
|
|
$(B)/client/opus/burg_modified_FLP.o \
|
|
|
|
$(B)/client/opus/bwexpander_FLP.o \
|
|
|
|
$(B)/client/opus/energy_FLP.o \
|
|
|
|
$(B)/client/opus/inner_product_FLP.o \
|
|
|
|
$(B)/client/opus/k2a_FLP.o \
|
|
|
|
$(B)/client/opus/LPC_inv_pred_gain_FLP.o \
|
|
|
|
$(B)/client/opus/pitch_analysis_core_FLP.o \
|
|
|
|
$(B)/client/opus/scale_copy_vector_FLP.o \
|
|
|
|
$(B)/client/opus/scale_vector_FLP.o \
|
|
|
|
$(B)/client/opus/schur_FLP.o \
|
|
|
|
$(B)/client/opus/sort_FLP.o \
|
|
|
|
\
|
|
|
|
$(B)/client/http.o \
|
|
|
|
$(B)/client/info.o \
|
|
|
|
$(B)/client/internal.o \
|
|
|
|
$(B)/client/opusfile.o \
|
2014-05-03 22:47:46 +00:00
|
|
|
$(B)/client/stream.o \
|
|
|
|
$(B)/client/wincerts.o
|
2013-07-21 23:15:13 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(NEED_OGG),1)
|
|
|
|
ifeq ($(USE_INTERNAL_OGG),1)
|
|
|
|
Q3OBJ += \
|
|
|
|
$(B)/client/bitwise.o \
|
|
|
|
$(B)/client/framing.o
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2014-05-03 22:47:46 +00:00
|
|
|
ifeq ($(USE_CODEC_VORBIS),1)
|
|
|
|
ifeq ($(USE_INTERNAL_VORBIS),1)
|
|
|
|
Q3OBJ += \
|
|
|
|
$(B)/client/vorbis/analysis.o \
|
|
|
|
$(B)/client/vorbis/bitrate.o \
|
|
|
|
$(B)/client/vorbis/block.o \
|
|
|
|
$(B)/client/vorbis/codebook.o \
|
|
|
|
$(B)/client/vorbis/envelope.o \
|
|
|
|
$(B)/client/vorbis/floor0.o \
|
|
|
|
$(B)/client/vorbis/floor1.o \
|
|
|
|
$(B)/client/vorbis/info.o \
|
|
|
|
$(B)/client/vorbis/lookup.o \
|
|
|
|
$(B)/client/vorbis/lpc.o \
|
|
|
|
$(B)/client/vorbis/lsp.o \
|
|
|
|
$(B)/client/vorbis/mapping0.o \
|
|
|
|
$(B)/client/vorbis/mdct.o \
|
|
|
|
$(B)/client/vorbis/psy.o \
|
|
|
|
$(B)/client/vorbis/registry.o \
|
|
|
|
$(B)/client/vorbis/res0.o \
|
|
|
|
$(B)/client/vorbis/smallft.o \
|
|
|
|
$(B)/client/vorbis/sharedbook.o \
|
|
|
|
$(B)/client/vorbis/synthesis.o \
|
|
|
|
$(B)/client/vorbis/vorbisfile.o \
|
|
|
|
$(B)/client/vorbis/window.o
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
ifeq ($(USE_INTERNAL_ZLIB),1)
|
|
|
|
Q3OBJ += \
|
|
|
|
$(B)/client/adler32.o \
|
|
|
|
$(B)/client/crc32.o \
|
|
|
|
$(B)/client/inffast.o \
|
|
|
|
$(B)/client/inflate.o \
|
|
|
|
$(B)/client/inftrees.o \
|
|
|
|
$(B)/client/zutil.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HAVE_VM_COMPILED),true)
|
2013-07-21 23:15:13 +00:00
|
|
|
ifneq ($(findstring $(ARCH),x86 x86_64),)
|
2011-06-30 20:39:19 +00:00
|
|
|
Q3OBJ += \
|
|
|
|
$(B)/client/vm_x86.o
|
|
|
|
endif
|
2013-07-21 23:15:13 +00:00
|
|
|
ifneq ($(findstring $(ARCH),ppc ppc64),)
|
2011-06-30 20:39:19 +00:00
|
|
|
Q3OBJ += $(B)/client/vm_powerpc.o $(B)/client/vm_powerpc_asm.o
|
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),sparc)
|
|
|
|
Q3OBJ += $(B)/client/vm_sparc.o
|
|
|
|
endif
|
2019-01-05 02:16:41 +00:00
|
|
|
ifeq ($(ARCH),armv7l)
|
|
|
|
Q3OBJ += $(B)/client/vm_armv7l.o
|
|
|
|
endif
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
|
2015-09-23 02:30:18 +00:00
|
|
|
ifdef MINGW
|
2011-06-30 20:39:19 +00:00
|
|
|
Q3OBJ += \
|
|
|
|
$(B)/client/win_resource.o \
|
|
|
|
$(B)/client/sys_win32.o
|
|
|
|
else
|
|
|
|
Q3OBJ += \
|
|
|
|
$(B)/client/sys_unix.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),darwin)
|
|
|
|
Q3OBJ += \
|
|
|
|
$(B)/client/sys_osx.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_MUMBLE),1)
|
|
|
|
Q3OBJ += \
|
|
|
|
$(B)/client/libmumblelink.o
|
|
|
|
endif
|
|
|
|
|
2012-01-13 16:30:06 +00:00
|
|
|
ifneq ($(USE_RENDERER_DLOPEN),0)
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(CLIENTBIN)$(FULLBINEXT): $(Q3OBJ) $(LIBSDLMAIN)
|
2012-01-13 16:30:06 +00:00
|
|
|
$(echo_cmd) "LD $@"
|
2019-01-05 02:16:41 +00:00
|
|
|
$(Q)$(CC) $(CLIENT_CFLAGS) $(CFLAGS) $(CLIENT_LDFLAGS) $(LDFLAGS) $(NOTSHLIBLDFLAGS) \
|
2012-01-13 16:30:06 +00:00
|
|
|
-o $@ $(Q3OBJ) \
|
|
|
|
$(LIBSDLMAIN) $(CLIENT_LIBS) $(LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderer_opengl1_$(SHLIBNAME): $(Q3ROBJ) $(JPGOBJ)
|
2012-01-13 16:30:06 +00:00
|
|
|
$(echo_cmd) "LD $@"
|
2013-07-21 23:15:13 +00:00
|
|
|
$(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3ROBJ) $(JPGOBJ) \
|
2012-01-13 16:30:06 +00:00
|
|
|
$(THREAD_LIBS) $(LIBSDLMAIN) $(RENDERER_LIBS) $(LIBS)
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderer_opengl2_$(SHLIBNAME): $(Q3R2OBJ) $(Q3R2STRINGOBJ) $(JPGOBJ)
|
2012-01-13 16:30:06 +00:00
|
|
|
$(echo_cmd) "LD $@"
|
2013-07-21 23:15:13 +00:00
|
|
|
$(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3R2OBJ) $(Q3R2STRINGOBJ) $(JPGOBJ) \
|
2012-01-13 16:30:06 +00:00
|
|
|
$(THREAD_LIBS) $(LIBSDLMAIN) $(RENDERER_LIBS) $(LIBS)
|
|
|
|
else
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/$(CLIENTBIN)$(FULLBINEXT): $(Q3OBJ) $(Q3ROBJ) $(JPGOBJ) $(LIBSDLMAIN)
|
2012-12-12 20:56:23 +00:00
|
|
|
$(echo_cmd) "LD $@"
|
2019-01-05 02:16:41 +00:00
|
|
|
$(Q)$(CC) $(CLIENT_CFLAGS) $(CFLAGS) $(CLIENT_LDFLAGS) $(LDFLAGS) $(NOTSHLIBLDFLAGS) \
|
2013-07-21 23:15:13 +00:00
|
|
|
-o $@ $(Q3OBJ) $(Q3ROBJ) $(JPGOBJ) \
|
2012-12-12 20:56:23 +00:00
|
|
|
$(LIBSDLMAIN) $(CLIENT_LIBS) $(RENDERER_LIBS) $(LIBS)
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/$(CLIENTBIN)_opengl2$(FULLBINEXT): $(Q3OBJ) $(Q3R2OBJ) $(Q3R2STRINGOBJ) $(JPGOBJ) $(LIBSDLMAIN)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(echo_cmd) "LD $@"
|
2019-01-05 02:16:41 +00:00
|
|
|
$(Q)$(CC) $(CLIENT_CFLAGS) $(CFLAGS) $(CLIENT_LDFLAGS) $(LDFLAGS) $(NOTSHLIBLDFLAGS) \
|
2013-07-21 23:15:13 +00:00
|
|
|
-o $@ $(Q3OBJ) $(Q3R2OBJ) $(Q3R2STRINGOBJ) $(JPGOBJ) \
|
2012-01-13 16:30:06 +00:00
|
|
|
$(LIBSDLMAIN) $(CLIENT_LIBS) $(RENDERER_LIBS) $(LIBS)
|
|
|
|
endif
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
ifneq ($(strip $(LIBSDLMAIN)),)
|
|
|
|
ifneq ($(strip $(LIBSDLMAINSRC)),)
|
|
|
|
$(LIBSDLMAIN) : $(LIBSDLMAINSRC)
|
|
|
|
cp $< $@
|
2013-07-21 23:15:13 +00:00
|
|
|
$(RANLIB) $@
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# DEDICATED SERVER
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
Q3DOBJ = \
|
|
|
|
$(B)/ded/sv_bot.o \
|
|
|
|
$(B)/ded/sv_client.o \
|
|
|
|
$(B)/ded/sv_ccmds.o \
|
|
|
|
$(B)/ded/sv_game.o \
|
|
|
|
$(B)/ded/sv_init.o \
|
|
|
|
$(B)/ded/sv_main.o \
|
|
|
|
$(B)/ded/sv_net_chan.o \
|
|
|
|
$(B)/ded/sv_snapshot.o \
|
|
|
|
$(B)/ded/sv_world.o \
|
|
|
|
\
|
|
|
|
$(B)/ded/cm_load.o \
|
|
|
|
$(B)/ded/cm_patch.o \
|
|
|
|
$(B)/ded/cm_polylib.o \
|
|
|
|
$(B)/ded/cm_test.o \
|
|
|
|
$(B)/ded/cm_trace.o \
|
|
|
|
$(B)/ded/cmd.o \
|
|
|
|
$(B)/ded/common.o \
|
|
|
|
$(B)/ded/cvar.o \
|
|
|
|
$(B)/ded/files.o \
|
|
|
|
$(B)/ded/md4.o \
|
|
|
|
$(B)/ded/msg.o \
|
|
|
|
$(B)/ded/net_chan.o \
|
|
|
|
$(B)/ded/net_ip.o \
|
|
|
|
$(B)/ded/huffman.o \
|
|
|
|
\
|
|
|
|
$(B)/ded/q_math.o \
|
|
|
|
$(B)/ded/q_shared.o \
|
|
|
|
\
|
|
|
|
$(B)/ded/unzip.o \
|
|
|
|
$(B)/ded/ioapi.o \
|
|
|
|
$(B)/ded/vm.o \
|
|
|
|
$(B)/ded/vm_interpreted.o \
|
|
|
|
\
|
|
|
|
$(B)/ded/be_aas_bspq3.o \
|
|
|
|
$(B)/ded/be_aas_cluster.o \
|
|
|
|
$(B)/ded/be_aas_debug.o \
|
|
|
|
$(B)/ded/be_aas_entity.o \
|
|
|
|
$(B)/ded/be_aas_file.o \
|
|
|
|
$(B)/ded/be_aas_main.o \
|
|
|
|
$(B)/ded/be_aas_move.o \
|
|
|
|
$(B)/ded/be_aas_optimize.o \
|
|
|
|
$(B)/ded/be_aas_reach.o \
|
|
|
|
$(B)/ded/be_aas_route.o \
|
|
|
|
$(B)/ded/be_aas_routealt.o \
|
|
|
|
$(B)/ded/be_aas_sample.o \
|
|
|
|
$(B)/ded/be_ai_char.o \
|
|
|
|
$(B)/ded/be_ai_chat.o \
|
|
|
|
$(B)/ded/be_ai_gen.o \
|
|
|
|
$(B)/ded/be_ai_goal.o \
|
|
|
|
$(B)/ded/be_ai_move.o \
|
|
|
|
$(B)/ded/be_ai_weap.o \
|
|
|
|
$(B)/ded/be_ai_weight.o \
|
|
|
|
$(B)/ded/be_ea.o \
|
|
|
|
$(B)/ded/be_interface.o \
|
|
|
|
$(B)/ded/l_crc.o \
|
|
|
|
$(B)/ded/l_libvar.o \
|
|
|
|
$(B)/ded/l_log.o \
|
|
|
|
$(B)/ded/l_memory.o \
|
|
|
|
$(B)/ded/l_precomp.o \
|
|
|
|
$(B)/ded/l_script.o \
|
|
|
|
$(B)/ded/l_struct.o \
|
|
|
|
\
|
|
|
|
$(B)/ded/null_client.o \
|
|
|
|
$(B)/ded/null_input.o \
|
|
|
|
$(B)/ded/null_snddma.o \
|
|
|
|
\
|
|
|
|
$(B)/ded/con_log.o \
|
2019-01-05 02:16:41 +00:00
|
|
|
$(B)/ded/sys_autoupdater.o \
|
2011-06-30 20:39:19 +00:00
|
|
|
$(B)/ded/sys_main.o
|
|
|
|
|
|
|
|
ifeq ($(ARCH),x86)
|
|
|
|
Q3DOBJ += \
|
|
|
|
$(B)/ded/matha.o \
|
|
|
|
$(B)/ded/snapvector.o \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/ded/ftola.o
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),x86_64)
|
|
|
|
Q3DOBJ += \
|
|
|
|
$(B)/ded/snapvector.o \
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/ded/ftola.o
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_INTERNAL_ZLIB),1)
|
|
|
|
Q3DOBJ += \
|
|
|
|
$(B)/ded/adler32.o \
|
|
|
|
$(B)/ded/crc32.o \
|
|
|
|
$(B)/ded/inffast.o \
|
|
|
|
$(B)/ded/inflate.o \
|
|
|
|
$(B)/ded/inftrees.o \
|
|
|
|
$(B)/ded/zutil.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HAVE_VM_COMPILED),true)
|
2013-07-21 23:15:13 +00:00
|
|
|
ifneq ($(findstring $(ARCH),x86 x86_64),)
|
2011-06-30 20:39:19 +00:00
|
|
|
Q3DOBJ += \
|
|
|
|
$(B)/ded/vm_x86.o
|
|
|
|
endif
|
2013-07-21 23:15:13 +00:00
|
|
|
ifneq ($(findstring $(ARCH),ppc ppc64),)
|
2011-06-30 20:39:19 +00:00
|
|
|
Q3DOBJ += $(B)/ded/vm_powerpc.o $(B)/ded/vm_powerpc_asm.o
|
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),sparc)
|
|
|
|
Q3DOBJ += $(B)/ded/vm_sparc.o
|
|
|
|
endif
|
2019-01-05 02:16:41 +00:00
|
|
|
ifeq ($(ARCH),armv7l)
|
|
|
|
Q3DOBJ += $(B)/client/vm_armv7l.o
|
|
|
|
endif
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
|
2015-09-23 02:30:18 +00:00
|
|
|
ifdef MINGW
|
2011-06-30 20:39:19 +00:00
|
|
|
Q3DOBJ += \
|
|
|
|
$(B)/ded/win_resource.o \
|
|
|
|
$(B)/ded/sys_win32.o \
|
|
|
|
$(B)/ded/con_win32.o
|
|
|
|
else
|
|
|
|
Q3DOBJ += \
|
|
|
|
$(B)/ded/sys_unix.o \
|
|
|
|
$(B)/ded/con_tty.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),darwin)
|
|
|
|
Q3DOBJ += \
|
|
|
|
$(B)/ded/sys_osx.o
|
|
|
|
endif
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(SERVERBIN)$(FULLBINEXT): $(Q3DOBJ)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(echo_cmd) "LD $@"
|
2019-01-05 02:16:41 +00:00
|
|
|
$(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(NOTSHLIBLDFLAGS) -o $@ $(Q3DOBJ) $(LIBS)
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
## BASEQ3 CGAME
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
Q3CGOBJ_ = \
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/cgame/cg_main.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/bg_misc.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/bg_pmove.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/bg_slidemove.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/bg_lib.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/cg_consolecmds.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/cg_draw.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/cg_drawtools.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/cg_effects.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/cg_ents.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/cg_event.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/cg_info.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/cg_localents.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/cg_marks.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/cg_players.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/cg_playerstate.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/cg_predict.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/cg_scoreboard.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/cg_servercmds.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/cg_snapshot.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/cg_view.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/cg_weapons.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/cg_unlagged.o \
|
|
|
|
$(B)/$(BASEGAME)/cgame/cg_atmospheric.o \
|
2011-06-30 20:39:19 +00:00
|
|
|
\
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/qcommon/q_math.o \
|
|
|
|
$(B)/$(BASEGAME)/qcommon/q_shared.o
|
2011-06-30 20:39:19 +00:00
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
Q3CGOBJ = $(Q3CGOBJ_) $(B)/$(BASEGAME)/cgame/cg_syscalls.o
|
2011-06-30 20:39:19 +00:00
|
|
|
Q3CGVMOBJ = $(Q3CGOBJ_:%.o=%.asm)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/cgame$(SHLIBNAME): $(Q3CGOBJ)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(echo_cmd) "LD $@"
|
|
|
|
$(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/vm/cgame.qvm: $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm $(Q3ASM)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(echo_cmd) "Q3ASM $@"
|
|
|
|
$(Q)$(Q3ASM) -o $@ $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
## MISSIONPACK CGAME
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
MPCGOBJ_ = \
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_main.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/bg_misc.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/bg_pmove.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/bg_slidemove.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/bg_lib.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_consolecmds.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_newdraw.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_draw.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_drawtools.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_effects.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_ents.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_event.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_info.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_localents.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_marks.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_particles.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_players.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_playerstate.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_predict.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_scoreboard.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_servercmds.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_snapshot.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_view.o \
|
|
|
|
$(B)/$(MISSIONPACK)/cgame/cg_weapons.o \
|
|
|
|
$(B)/$(MISSIONPACK)/ui/ui_shared.o \
|
2011-06-30 20:39:19 +00:00
|
|
|
\
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/qcommon/q_math.o \
|
|
|
|
$(B)/$(MISSIONPACK)/qcommon/q_shared.o
|
2011-06-30 20:39:19 +00:00
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
MPCGOBJ = $(MPCGOBJ_) $(B)/$(MISSIONPACK)/cgame/cg_syscalls.o
|
2011-06-30 20:39:19 +00:00
|
|
|
MPCGVMOBJ = $(MPCGOBJ_:%.o=%.asm)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/cgame$(SHLIBNAME): $(MPCGOBJ)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(echo_cmd) "LD $@"
|
|
|
|
$(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPCGOBJ)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/vm/cgame.qvm: $(MPCGVMOBJ) $(CGDIR)/cg_syscalls.asm $(Q3ASM)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(echo_cmd) "Q3ASM $@"
|
|
|
|
$(Q)$(Q3ASM) -o $@ $(MPCGVMOBJ) $(CGDIR)/cg_syscalls.asm
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
## BASEQ3 GAME
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
Q3GOBJ_ = \
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/game/g_main.o \
|
|
|
|
$(B)/$(BASEGAME)/game/ai_chat.o \
|
|
|
|
$(B)/$(BASEGAME)/game/ai_cmd.o \
|
|
|
|
$(B)/$(BASEGAME)/game/ai_dmnet.o \
|
|
|
|
$(B)/$(BASEGAME)/game/ai_dmq3.o \
|
|
|
|
$(B)/$(BASEGAME)/game/ai_main.o \
|
|
|
|
$(B)/$(BASEGAME)/game/ai_team.o \
|
|
|
|
$(B)/$(BASEGAME)/game/ai_vcmd.o \
|
|
|
|
$(B)/$(BASEGAME)/game/bg_misc.o \
|
|
|
|
$(B)/$(BASEGAME)/game/bg_pmove.o \
|
|
|
|
$(B)/$(BASEGAME)/game/bg_slidemove.o \
|
|
|
|
$(B)/$(BASEGAME)/game/bg_lib.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_active.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_arenas.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_bot.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_client.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_cmds.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_combat.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_items.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_mem.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_misc.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_missile.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_mover.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_session.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_spawn.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_svcmds.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_target.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_team.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_trigger.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_utils.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_weapon.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_matchmode.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_parser.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_scripts.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_teamplay.o \
|
|
|
|
$(B)/$(BASEGAME)/game/g_unlagged.o \
|
|
|
|
$(B)/$(BASEGAME)/game/rxn_game.o \
|
|
|
|
$(B)/$(BASEGAME)/game/zcam.o \
|
|
|
|
$(B)/$(BASEGAME)/game/zcam_target.o \
|
2011-06-30 20:39:19 +00:00
|
|
|
\
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/qcommon/q_math.o \
|
|
|
|
$(B)/$(BASEGAME)/qcommon/q_shared.o
|
2011-06-30 20:39:19 +00:00
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
Q3GOBJ = $(Q3GOBJ_) $(B)/$(BASEGAME)/game/g_syscalls.o
|
2011-06-30 20:39:19 +00:00
|
|
|
Q3GVMOBJ = $(Q3GOBJ_:%.o=%.asm)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/qagame$(SHLIBNAME): $(Q3GOBJ)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(echo_cmd) "LD $@"
|
|
|
|
$(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/vm/qagame.qvm: $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm $(Q3ASM)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(echo_cmd) "Q3ASM $@"
|
|
|
|
$(Q)$(Q3ASM) -o $@ $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
## MISSIONPACK GAME
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
MPGOBJ_ = \
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/game/g_main.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/ai_chat.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/ai_cmd.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/ai_dmnet.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/ai_dmq3.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/ai_main.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/ai_team.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/ai_vcmd.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/bg_misc.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/bg_pmove.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/bg_slidemove.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/bg_lib.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/g_active.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/g_arenas.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/g_bot.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/g_client.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/g_cmds.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/g_combat.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/g_items.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/g_mem.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/g_misc.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/g_missile.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/g_mover.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/g_session.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/g_spawn.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/g_svcmds.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/g_target.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/g_team.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/g_trigger.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/g_utils.o \
|
|
|
|
$(B)/$(MISSIONPACK)/game/g_weapon.o \
|
2011-06-30 20:39:19 +00:00
|
|
|
\
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/qcommon/q_math.o \
|
|
|
|
$(B)/$(MISSIONPACK)/qcommon/q_shared.o
|
2011-06-30 20:39:19 +00:00
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
MPGOBJ = $(MPGOBJ_) $(B)/$(MISSIONPACK)/game/g_syscalls.o
|
2011-06-30 20:39:19 +00:00
|
|
|
MPGVMOBJ = $(MPGOBJ_:%.o=%.asm)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/qagame$(SHLIBNAME): $(MPGOBJ)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(echo_cmd) "LD $@"
|
|
|
|
$(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPGOBJ)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/vm/qagame.qvm: $(MPGVMOBJ) $(GDIR)/g_syscalls.asm $(Q3ASM)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(echo_cmd) "Q3ASM $@"
|
|
|
|
$(Q)$(Q3ASM) -o $@ $(MPGVMOBJ) $(GDIR)/g_syscalls.asm
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-13 16:30:06 +00:00
|
|
|
#############################################################################
|
|
|
|
## BASEQ3 UI
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
Q3UIOBJ_ = \
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/ui/ui_main.o \
|
|
|
|
$(B)/$(BASEGAME)/ui/ui_atoms.o \
|
|
|
|
$(B)/$(BASEGAME)/ui/ui_gameinfo.o \
|
|
|
|
$(B)/$(BASEGAME)/ui/ui_players.o \
|
|
|
|
$(B)/$(BASEGAME)/ui/ui_shared.o \
|
2012-01-13 16:30:06 +00:00
|
|
|
\
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/ui/bg_misc.o \
|
|
|
|
$(B)/$(BASEGAME)/ui/bg_lib.o \
|
2012-01-13 16:30:06 +00:00
|
|
|
\
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/qcommon/q_math.o \
|
|
|
|
$(B)/$(BASEGAME)/qcommon/q_shared.o
|
2012-01-13 16:30:06 +00:00
|
|
|
|
2012-12-12 20:56:23 +00:00
|
|
|
Q3UIOBJ = $(Q3UIOBJ_) $(B)/$(MISSIONPACK)/ui/ui_syscalls.o
|
2012-01-13 16:30:06 +00:00
|
|
|
Q3UIVMOBJ = $(Q3UIOBJ_:%.o=%.asm)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/ui$(SHLIBNAME): $(Q3UIOBJ)
|
2012-01-13 16:30:06 +00:00
|
|
|
$(echo_cmd) "LD $@"
|
|
|
|
$(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3UIOBJ)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/vm/ui.qvm: $(Q3UIVMOBJ) $(UIDIR)/ui_syscalls.asm $(Q3ASM)
|
2012-01-13 16:30:06 +00:00
|
|
|
$(echo_cmd) "Q3ASM $@"
|
|
|
|
$(Q)$(Q3ASM) -o $@ $(Q3UIVMOBJ) $(UIDIR)/ui_syscalls.asm
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
#############################################################################
|
|
|
|
## MISSIONPACK UI
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
MPUIOBJ_ = \
|
2012-12-12 20:56:23 +00:00
|
|
|
$(B)/$(MISSIONPACK)/ui/ui_main.o \
|
|
|
|
$(B)/$(MISSIONPACK)/ui/ui_atoms.o \
|
|
|
|
$(B)/$(MISSIONPACK)/ui/ui_gameinfo.o \
|
|
|
|
$(B)/$(MISSIONPACK)/ui/ui_players.o \
|
|
|
|
$(B)/$(MISSIONPACK)/ui/ui_shared.o \
|
2011-06-30 20:39:19 +00:00
|
|
|
\
|
2012-12-12 20:56:23 +00:00
|
|
|
$(B)/$(MISSIONPACK)/ui/bg_misc.o \
|
|
|
|
$(B)/$(MISSIONPACK)/ui/bg_lib.o \
|
2011-06-30 20:39:19 +00:00
|
|
|
\
|
2012-12-12 20:56:23 +00:00
|
|
|
$(B)/$(MISSIONPACK)/qcommon/q_math.o \
|
|
|
|
$(B)/$(MISSIONPACK)/qcommon/q_shared.o
|
2011-06-30 20:39:19 +00:00
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
MPUIOBJ = $(MPUIOBJ_) $(B)/$(MISSIONPACK)/ui/ui_syscalls.o
|
2011-06-30 20:39:19 +00:00
|
|
|
MPUIVMOBJ = $(MPUIOBJ_:%.o=%.asm)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/ui$(SHLIBNAME): $(MPUIOBJ)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(echo_cmd) "LD $@"
|
|
|
|
$(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPUIOBJ)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/vm/ui.qvm: $(MPUIVMOBJ) $(UIDIR)/ui_syscalls.asm $(Q3ASM)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(echo_cmd) "Q3ASM $@"
|
|
|
|
$(Q)$(Q3ASM) -o $@ $(MPUIVMOBJ) $(UIDIR)/ui_syscalls.asm
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
## CLIENT/SERVER RULES
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
$(B)/client/%.o: $(ASMDIR)/%.s
|
|
|
|
$(DO_AS)
|
|
|
|
|
|
|
|
# k8 so inline assembler knows about SSE
|
|
|
|
$(B)/client/%.o: $(ASMDIR)/%.c
|
|
|
|
$(DO_CC) -march=k8
|
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
$(B)/client/snd_altivec.o: $(CDIR)/snd_altivec.c
|
|
|
|
$(DO_CC_ALTIVEC)
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
$(B)/client/%.o: $(CDIR)/%.c
|
|
|
|
$(DO_CC)
|
|
|
|
|
|
|
|
$(B)/client/%.o: $(SDIR)/%.c
|
|
|
|
$(DO_CC)
|
|
|
|
|
|
|
|
$(B)/client/%.o: $(CMDIR)/%.c
|
|
|
|
$(DO_CC)
|
|
|
|
|
|
|
|
$(B)/client/%.o: $(BLIBDIR)/%.c
|
|
|
|
$(DO_BOT_CC)
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/client/%.o: $(OGGDIR)/src/%.c
|
|
|
|
$(DO_CC)
|
|
|
|
|
2014-05-03 22:47:46 +00:00
|
|
|
$(B)/client/vorbis/%.o: $(VORBISDIR)/lib/%.c
|
|
|
|
$(DO_CC)
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/client/opus/%.o: $(OPUSDIR)/src/%.c
|
|
|
|
$(DO_CC)
|
|
|
|
|
|
|
|
$(B)/client/opus/%.o: $(OPUSDIR)/celt/%.c
|
|
|
|
$(DO_CC)
|
|
|
|
|
|
|
|
$(B)/client/opus/%.o: $(OPUSDIR)/silk/%.c
|
|
|
|
$(DO_CC)
|
|
|
|
|
|
|
|
$(B)/client/opus/%.o: $(OPUSDIR)/silk/float/%.c
|
|
|
|
$(DO_CC)
|
|
|
|
|
|
|
|
$(B)/client/%.o: $(OPUSFILEDIR)/src/%.c
|
|
|
|
$(DO_CC)
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
$(B)/client/%.o: $(ZDIR)/%.c
|
|
|
|
$(DO_CC)
|
|
|
|
|
|
|
|
$(B)/client/%.o: $(SDLDIR)/%.c
|
|
|
|
$(DO_CC)
|
|
|
|
|
|
|
|
$(B)/client/%.o: $(SYSDIR)/%.c
|
|
|
|
$(DO_CC)
|
|
|
|
|
|
|
|
$(B)/client/%.o: $(SYSDIR)/%.m
|
|
|
|
$(DO_CC)
|
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
$(B)/client/win_resource.o: $(SYSDIR)/win_resource.rc $(SYSDIR)/win_manifest.xml
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_WINDRES)
|
|
|
|
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl1/%.o: $(CMDIR)/%.c
|
|
|
|
$(DO_REF_CC)
|
|
|
|
|
|
|
|
$(B)/renderergl1/%.o: $(SDLDIR)/%.c
|
2012-01-13 16:30:06 +00:00
|
|
|
$(DO_REF_CC)
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl1/%.o: $(JPDIR)/%.c
|
2012-01-13 16:30:06 +00:00
|
|
|
$(DO_REF_CC)
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl1/%.o: $(RCOMMONDIR)/%.c
|
2012-01-13 16:30:06 +00:00
|
|
|
$(DO_REF_CC)
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl1/%.o: $(RGL1DIR)/%.c
|
2012-01-13 16:30:06 +00:00
|
|
|
$(DO_REF_CC)
|
2012-12-12 20:56:23 +00:00
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
$(B)/renderergl1/tr_altivec.o: $(RGL1DIR)/tr_altivec.c
|
|
|
|
$(DO_REF_CC_ALTIVEC)
|
|
|
|
|
2020-09-08 11:07:15 +00:00
|
|
|
.PRECIOUS: $(B)/renderergl2/glsl/%.c
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl2/glsl/%.c: $(RGL2DIR)/glsl/%.glsl
|
2012-12-12 20:56:23 +00:00
|
|
|
$(DO_REF_STR)
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl2/glsl/%.o: $(B)/renderergl2/glsl/%.c
|
2012-12-12 20:56:23 +00:00
|
|
|
$(DO_REF_CC)
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
$(B)/renderergl2/%.o: $(RCOMMONDIR)/%.c
|
|
|
|
$(DO_REF_CC)
|
|
|
|
|
|
|
|
$(B)/renderergl2/%.o: $(RGL2DIR)/%.c
|
2012-01-13 16:30:06 +00:00
|
|
|
$(DO_REF_CC)
|
|
|
|
|
|
|
|
|
2011-06-30 20:39:19 +00:00
|
|
|
$(B)/ded/%.o: $(ASMDIR)/%.s
|
|
|
|
$(DO_AS)
|
|
|
|
|
2011-06-30 21:01:52 +00:00
|
|
|
# k8 so inline assembler knows about SSE
|
2011-06-30 20:39:19 +00:00
|
|
|
$(B)/ded/%.o: $(ASMDIR)/%.c
|
|
|
|
$(DO_CC) -march=k8
|
|
|
|
|
|
|
|
$(B)/ded/%.o: $(SDIR)/%.c
|
|
|
|
$(DO_DED_CC)
|
|
|
|
|
|
|
|
$(B)/ded/%.o: $(CMDIR)/%.c
|
|
|
|
$(DO_DED_CC)
|
|
|
|
|
|
|
|
$(B)/ded/%.o: $(ZDIR)/%.c
|
|
|
|
$(DO_DED_CC)
|
|
|
|
|
|
|
|
$(B)/ded/%.o: $(BLIBDIR)/%.c
|
|
|
|
$(DO_BOT_CC)
|
|
|
|
|
|
|
|
$(B)/ded/%.o: $(SYSDIR)/%.c
|
|
|
|
$(DO_DED_CC)
|
|
|
|
|
|
|
|
$(B)/ded/%.o: $(SYSDIR)/%.m
|
|
|
|
$(DO_DED_CC)
|
|
|
|
|
2019-01-05 02:16:41 +00:00
|
|
|
$(B)/ded/win_resource.o: $(SYSDIR)/win_resource.rc $(SYSDIR)/win_manifest.xml
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_WINDRES)
|
|
|
|
|
|
|
|
$(B)/ded/%.o: $(NDIR)/%.c
|
|
|
|
$(DO_DED_CC)
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
# Extra dependencies to ensure the git version is incorporated
|
|
|
|
ifeq ($(USE_GIT),1)
|
2019-01-05 02:16:41 +00:00
|
|
|
$(B)/client/cl_console.o : .git
|
|
|
|
$(B)/client/common.o : .git
|
|
|
|
$(B)/ded/common.o : .git
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
## GAME MODULE RULES
|
|
|
|
#############################################################################
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/cgame/bg_%.o: $(GDIR)/bg_%.c
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_CGAME_CC)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/cgame/%.o: $(CGDIR)/%.c
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_CGAME_CC)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/cgame/bg_%.asm: $(GDIR)/bg_%.c $(Q3LCC)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_CGAME_Q3LCC)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/cgame/%.asm: $(CGDIR)/%.c $(Q3LCC)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_CGAME_Q3LCC)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/cgame/bg_%.o: $(GDIR)/bg_%.c
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_CGAME_CC_MISSIONPACK)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/cgame/%.o: $(CGDIR)/%.c
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_CGAME_CC_MISSIONPACK)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/cgame/bg_%.asm: $(GDIR)/bg_%.c $(Q3LCC)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_CGAME_Q3LCC_MISSIONPACK)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/cgame/%.asm: $(CGDIR)/%.c $(Q3LCC)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_CGAME_Q3LCC_MISSIONPACK)
|
|
|
|
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/game/%.o: $(GDIR)/%.c
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_GAME_CC)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/game/%.asm: $(GDIR)/%.c $(Q3LCC)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_GAME_Q3LCC)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/game/%.o: $(GDIR)/%.c
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_GAME_CC_MISSIONPACK)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/game/%.asm: $(GDIR)/%.c $(Q3LCC)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_GAME_Q3LCC_MISSIONPACK)
|
|
|
|
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/ui/bg_%.o: $(GDIR)/bg_%.c
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_UI_CC)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/ui/%.o: $(Q3UIDIR)/%.c
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_UI_CC)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/ui/bg_%.asm: $(GDIR)/bg_%.c $(Q3LCC)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_UI_Q3LCC)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/ui/%.asm: $(Q3UIDIR)/%.c $(Q3LCC)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_UI_Q3LCC)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/ui/bg_%.o: $(GDIR)/bg_%.c
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_UI_CC_MISSIONPACK)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/ui/%.o: $(UIDIR)/%.c
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_UI_CC_MISSIONPACK)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/ui/bg_%.asm: $(GDIR)/bg_%.c $(Q3LCC)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_UI_Q3LCC_MISSIONPACK)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/ui/%.asm: $(UIDIR)/%.c $(Q3LCC)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_UI_Q3LCC_MISSIONPACK)
|
|
|
|
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/qcommon/%.o: $(CMDIR)/%.c
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_SHLIB_CC)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(BASEGAME)/qcommon/%.asm: $(CMDIR)/%.c $(Q3LCC)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_Q3LCC)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/qcommon/%.o: $(CMDIR)/%.c
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_SHLIB_CC_MISSIONPACK)
|
|
|
|
|
2012-03-30 13:12:20 +00:00
|
|
|
$(B)/$(MISSIONPACK)/qcommon/%.asm: $(CMDIR)/%.c $(Q3LCC)
|
2011-06-30 20:39:19 +00:00
|
|
|
$(DO_Q3LCC_MISSIONPACK)
|
|
|
|
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# MISC
|
|
|
|
#############################################################################
|
|
|
|
|
2013-07-21 23:15:13 +00:00
|
|
|
OBJ = $(Q3OBJ) $(Q3ROBJ) $(Q3R2OBJ) $(Q3DOBJ) $(JPGOBJ) \
|
2011-06-30 20:39:19 +00:00
|
|
|
$(MPGOBJ) $(Q3GOBJ) $(Q3CGOBJ) $(MPCGOBJ) $(Q3UIOBJ) $(MPUIOBJ) \
|
|
|
|
$(MPGVMOBJ) $(Q3GVMOBJ) $(Q3CGVMOBJ) $(MPCGVMOBJ) $(Q3UIVMOBJ) $(MPUIVMOBJ)
|
|
|
|
TOOLSOBJ = $(LBURGOBJ) $(Q3CPPOBJ) $(Q3RCCOBJ) $(Q3LCCOBJ) $(Q3ASMOBJ)
|
2012-12-12 20:56:23 +00:00
|
|
|
STRINGOBJ = $(Q3R2STRINGOBJ)
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
copyfiles: release
|
2012-03-30 13:12:20 +00:00
|
|
|
@if [ ! -d $(COPYDIR)/$(BASEGAME) ]; then echo "You need to set COPYDIR to where your Quake3 data is!"; fi
|
2012-01-13 16:30:06 +00:00
|
|
|
ifneq ($(BUILD_GAME_SO),0)
|
2012-12-12 20:56:23 +00:00
|
|
|
ifneq ($(BUILD_BASEGAME),0)
|
2019-01-05 02:16:41 +00:00
|
|
|
-$(MKDIR) -m 0755 $(COPYDIR)/$(BASEGAME)
|
2012-12-12 20:56:23 +00:00
|
|
|
endif
|
2012-01-13 16:30:06 +00:00
|
|
|
ifneq ($(BUILD_MISSIONPACK),0)
|
2019-01-05 02:16:41 +00:00
|
|
|
-$(MKDIR) -m 0755 $(COPYDIR)/$(MISSIONPACK)
|
2012-01-13 16:30:06 +00:00
|
|
|
endif
|
|
|
|
endif
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
ifneq ($(BUILD_CLIENT),0)
|
2012-03-30 13:12:20 +00:00
|
|
|
$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(CLIENTBIN)$(FULLBINEXT) $(COPYBINDIR)/$(CLIENTBIN)$(FULLBINEXT)
|
2012-01-13 16:30:06 +00:00
|
|
|
ifneq ($(USE_RENDERER_DLOPEN),0)
|
|
|
|
$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/renderer_opengl1_$(SHLIBNAME) $(COPYBINDIR)/renderer_opengl1_$(SHLIBNAME)
|
2013-07-21 23:15:13 +00:00
|
|
|
ifneq ($(BUILD_RENDERER_OPENGL2),0)
|
|
|
|
$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/renderer_opengl2_$(SHLIBNAME) $(COPYBINDIR)/renderer_opengl2_$(SHLIBNAME)
|
2012-01-13 16:30:06 +00:00
|
|
|
endif
|
2014-01-21 02:31:58 +00:00
|
|
|
else
|
|
|
|
ifneq ($(BUILD_RENDERER_OPENGL2),0)
|
|
|
|
$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(CLIENTBIN)_opengl2$(FULLBINEXT) $(COPYBINDIR)/$(CLIENTBIN)_opengl2$(FULLBINEXT)
|
|
|
|
endif
|
2012-01-13 16:30:06 +00:00
|
|
|
endif
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(BUILD_SERVER),0)
|
2012-03-30 13:12:20 +00:00
|
|
|
@if [ -f $(BR)/$(SERVERBIN)$(FULLBINEXT) ]; then \
|
|
|
|
$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(SERVERBIN)$(FULLBINEXT) $(COPYBINDIR)/$(SERVERBIN)$(FULLBINEXT); \
|
2011-06-30 20:39:19 +00:00
|
|
|
fi
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(BUILD_GAME_SO),0)
|
2012-12-12 20:56:23 +00:00
|
|
|
ifneq ($(BUILD_BASEGAME),0)
|
2012-03-30 13:12:20 +00:00
|
|
|
$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(BASEGAME)/cgame$(SHLIBNAME) \
|
|
|
|
$(COPYDIR)/$(BASEGAME)/.
|
|
|
|
$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(BASEGAME)/qagame$(SHLIBNAME) \
|
|
|
|
$(COPYDIR)/$(BASEGAME)/.
|
|
|
|
$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(BASEGAME)/ui$(SHLIBNAME) \
|
|
|
|
$(COPYDIR)/$(BASEGAME)/.
|
2012-12-12 20:56:23 +00:00
|
|
|
endif
|
2011-06-30 20:39:19 +00:00
|
|
|
ifneq ($(BUILD_MISSIONPACK),0)
|
2012-03-30 13:12:20 +00:00
|
|
|
$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(MISSIONPACK)/cgame$(SHLIBNAME) \
|
|
|
|
$(COPYDIR)/$(MISSIONPACK)/.
|
|
|
|
$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(MISSIONPACK)/qagame$(SHLIBNAME) \
|
|
|
|
$(COPYDIR)/$(MISSIONPACK)/.
|
|
|
|
$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(MISSIONPACK)/ui$(SHLIBNAME) \
|
|
|
|
$(COPYDIR)/$(MISSIONPACK)/.
|
2011-06-30 20:39:19 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
clean: clean-debug clean-release
|
|
|
|
ifeq ($(PLATFORM),mingw32)
|
|
|
|
@$(MAKE) -C $(NSISDIR) clean
|
|
|
|
else
|
|
|
|
@$(MAKE) -C $(LOKISETUPDIR) clean
|
|
|
|
endif
|
|
|
|
|
|
|
|
clean-debug:
|
|
|
|
@$(MAKE) clean2 B=$(BD)
|
|
|
|
|
|
|
|
clean-release:
|
|
|
|
@$(MAKE) clean2 B=$(BR)
|
|
|
|
|
|
|
|
clean2:
|
|
|
|
@echo "CLEAN $(B)"
|
|
|
|
@rm -f $(OBJ)
|
|
|
|
@rm -f $(OBJ_D_FILES)
|
2012-12-12 20:56:23 +00:00
|
|
|
@rm -f $(STRINGOBJ)
|
2011-06-30 20:39:19 +00:00
|
|
|
@rm -f $(TARGETS)
|
|
|
|
|
|
|
|
toolsclean: toolsclean-debug toolsclean-release
|
|
|
|
|
|
|
|
toolsclean-debug:
|
|
|
|
@$(MAKE) toolsclean2 B=$(BD)
|
|
|
|
|
|
|
|
toolsclean-release:
|
|
|
|
@$(MAKE) toolsclean2 B=$(BR)
|
|
|
|
|
|
|
|
toolsclean2:
|
|
|
|
@echo "TOOLS_CLEAN $(B)"
|
|
|
|
@rm -f $(TOOLSOBJ)
|
|
|
|
@rm -f $(TOOLSOBJ_D_FILES)
|
|
|
|
@rm -f $(LBURG) $(DAGCHECK_C) $(Q3RCC) $(Q3CPP) $(Q3LCC) $(Q3ASM)
|
|
|
|
|
|
|
|
distclean: clean toolsclean
|
|
|
|
@rm -rf $(BUILD_DIR)
|
|
|
|
|
|
|
|
installer: release
|
2015-09-23 02:30:18 +00:00
|
|
|
ifdef MINGW
|
2012-01-13 16:30:06 +00:00
|
|
|
@$(MAKE) VERSION=$(VERSION) -C $(NSISDIR) V=$(V) \
|
2012-02-26 14:54:46 +00:00
|
|
|
SDLDLL=$(SDLDLL) \
|
2012-01-13 16:30:06 +00:00
|
|
|
USE_RENDERER_DLOPEN=$(USE_RENDERER_DLOPEN) \
|
|
|
|
USE_OPENAL_DLOPEN=$(USE_OPENAL_DLOPEN) \
|
|
|
|
USE_CURL_DLOPEN=$(USE_CURL_DLOPEN) \
|
2013-07-21 23:15:13 +00:00
|
|
|
USE_INTERNAL_OPUS=$(USE_INTERNAL_OPUS) \
|
2012-01-13 16:30:06 +00:00
|
|
|
USE_INTERNAL_ZLIB=$(USE_INTERNAL_ZLIB) \
|
|
|
|
USE_INTERNAL_JPEG=$(USE_INTERNAL_JPEG)
|
2011-06-30 20:39:19 +00:00
|
|
|
else
|
|
|
|
@$(MAKE) VERSION=$(VERSION) -C $(LOKISETUPDIR) V=$(V)
|
|
|
|
endif
|
|
|
|
|
|
|
|
dist:
|
2013-07-21 23:15:13 +00:00
|
|
|
git archive --format zip --output $(CLIENTBIN)-$(VERSION).zip HEAD
|
2011-06-30 20:39:19 +00:00
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# DEPENDENCIES
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
ifneq ($(B),)
|
|
|
|
OBJ_D_FILES=$(filter %.d,$(OBJ:%.o=%.d))
|
|
|
|
TOOLSOBJ_D_FILES=$(filter %.d,$(TOOLSOBJ:%.o=%.d))
|
|
|
|
-include $(OBJ_D_FILES) $(TOOLSOBJ_D_FILES)
|
|
|
|
endif
|
|
|
|
|
|
|
|
.PHONY: all clean clean2 clean-debug clean-release copyfiles \
|
|
|
|
debug default dist distclean installer makedirs \
|
|
|
|
release targets \
|
|
|
|
toolsclean toolsclean2 toolsclean-debug toolsclean-release \
|
|
|
|
$(OBJ_D_FILES) $(TOOLSOBJ_D_FILES)
|
2013-07-21 23:15:13 +00:00
|
|
|
|
|
|
|
# If the target name contains "clean", don't do a parallel build
|
|
|
|
ifneq ($(findstring clean, $(MAKECMDGOALS)),)
|
|
|
|
.NOTPARALLEL:
|
|
|
|
endif
|