2005-08-26 17:39:27 +00:00
|
|
|
#
|
|
|
|
# Quake3 Unix Makefile
|
|
|
|
#
|
|
|
|
# Nov '98 by Zoid <zoid@idsoftware.com>
|
|
|
|
#
|
2005-09-23 01:59:42 +00:00
|
|
|
# Loki Hacking by Bernd Kreimeier
|
2005-08-26 17:39:27 +00:00
|
|
|
# and a little more by Ryan C. Gordon.
|
|
|
|
# and a little more by Rafael Barrero
|
2005-11-06 16:50:58 +00:00
|
|
|
# and a little more by the ioq3 cr3w
|
2005-08-26 17:39:27 +00:00
|
|
|
#
|
|
|
|
# GNU Make required
|
|
|
|
#
|
|
|
|
|
2006-04-04 14:33:35 +00:00
|
|
|
COMPILE_PLATFORM=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]')
|
2005-11-26 07:46:21 +00:00
|
|
|
|
2005-12-29 00:04:41 +00:00
|
|
|
ifeq ($(COMPILE_PLATFORM),darwin)
|
|
|
|
# Apple does some things a little differently...
|
|
|
|
COMPILE_ARCH=$(shell uname -p | sed -e s/i.86/i386/)
|
2005-11-26 07:46:21 +00:00
|
|
|
else
|
2005-12-29 00:04:41 +00:00
|
|
|
COMPILE_ARCH=$(shell uname -m | sed -e s/i.86/i386/)
|
2005-11-26 07:46:21 +00:00
|
|
|
endif
|
2005-09-27 16:35:25 +00:00
|
|
|
|
2006-03-21 22:21:05 +00:00
|
|
|
ifeq ($(COMPILE_PLATFORM),mingw32)
|
|
|
|
ifeq ($(COMPILE_ARCH),i386)
|
|
|
|
COMPILE_ARCH=x86
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2005-12-30 17:50:47 +00:00
|
|
|
BUILD_CLIENT =
|
|
|
|
BUILD_CLIENT_SMP =
|
|
|
|
BUILD_SERVER =
|
|
|
|
BUILD_GAME_SO =
|
|
|
|
BUILD_GAME_QVM =
|
|
|
|
|
2005-09-27 16:35:25 +00:00
|
|
|
#############################################################################
|
|
|
|
#
|
|
|
|
# If you require a different configuration from the defaults below, create a
|
2005-09-27 17:45:16 +00:00
|
|
|
# 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.
|
2005-09-27 16:35:25 +00:00
|
|
|
#
|
|
|
|
#############################################################################
|
|
|
|
-include Makefile.local
|
|
|
|
|
2005-12-29 00:04:41 +00:00
|
|
|
ifndef PLATFORM
|
|
|
|
PLATFORM=$(COMPILE_PLATFORM)
|
|
|
|
endif
|
|
|
|
export PLATFORM
|
|
|
|
|
|
|
|
ifndef ARCH
|
|
|
|
ARCH=$(COMPILE_ARCH)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(ARCH),powerpc)
|
|
|
|
ARCH=ppc
|
|
|
|
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
|
|
|
|
|
2005-09-03 22:45:50 +00:00
|
|
|
ifndef COPYDIR
|
|
|
|
COPYDIR="/usr/local/games/quake3"
|
|
|
|
endif
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-09-27 16:35:25 +00:00
|
|
|
ifndef MOUNT_DIR
|
2006-01-15 21:45:57 +00:00
|
|
|
MOUNT_DIR=code
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef BUILD_DIR
|
|
|
|
BUILD_DIR=build
|
2005-09-27 16:35:25 +00:00
|
|
|
endif
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-09-29 05:25:26 +00:00
|
|
|
ifndef GENERATE_DEPENDENCIES
|
|
|
|
GENERATE_DEPENDENCIES=1
|
2005-09-27 16:35:25 +00:00
|
|
|
endif
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-11-26 07:46:21 +00:00
|
|
|
ifndef USE_CCACHE
|
2005-11-26 15:01:28 +00:00
|
|
|
USE_CCACHE=0
|
2005-11-26 07:46:21 +00:00
|
|
|
endif
|
|
|
|
export USE_CCACHE
|
|
|
|
|
2005-10-29 22:05:20 +00:00
|
|
|
ifndef USE_SDL
|
2005-11-05 01:06:09 +00:00
|
|
|
USE_SDL=1
|
|
|
|
endif
|
|
|
|
|
2005-11-13 18:58:14 +00:00
|
|
|
ifndef USE_OPENAL
|
|
|
|
USE_OPENAL=1
|
|
|
|
endif
|
|
|
|
|
2005-11-13 21:01:44 +00:00
|
|
|
ifndef USE_OPENAL_DLOPEN
|
|
|
|
USE_OPENAL_DLOPEN=0
|
|
|
|
endif
|
|
|
|
|
2006-09-11 16:41:55 +00:00
|
|
|
ifndef USE_CURL
|
|
|
|
USE_CURL=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef USE_CURL_DLOPEN
|
|
|
|
ifeq ($(PLATFORM),mingw32)
|
|
|
|
USE_CURL_DLOPEN=0
|
|
|
|
else
|
|
|
|
USE_CURL_DLOPEN=1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2006-01-06 17:36:03 +00:00
|
|
|
ifndef USE_CODEC_VORBIS
|
|
|
|
USE_CODEC_VORBIS=0
|
|
|
|
endif
|
|
|
|
|
2005-12-01 20:53:28 +00:00
|
|
|
ifndef USE_LOCAL_HEADERS
|
|
|
|
USE_LOCAL_HEADERS=1
|
|
|
|
endif
|
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
#############################################################################
|
|
|
|
|
2006-01-15 21:45:57 +00:00
|
|
|
BD=$(BUILD_DIR)/debug-$(PLATFORM)-$(ARCH)
|
|
|
|
BR=$(BUILD_DIR)/release-$(PLATFORM)-$(ARCH)
|
2005-08-26 17:39:27 +00:00
|
|
|
CDIR=$(MOUNT_DIR)/client
|
|
|
|
SDIR=$(MOUNT_DIR)/server
|
|
|
|
RDIR=$(MOUNT_DIR)/renderer
|
|
|
|
CMDIR=$(MOUNT_DIR)/qcommon
|
|
|
|
UDIR=$(MOUNT_DIR)/unix
|
2005-09-22 03:21:33 +00:00
|
|
|
W32DIR=$(MOUNT_DIR)/win32
|
2005-08-26 17:39:27 +00:00
|
|
|
GDIR=$(MOUNT_DIR)/game
|
|
|
|
CGDIR=$(MOUNT_DIR)/cgame
|
|
|
|
BLIBDIR=$(MOUNT_DIR)/botlib
|
|
|
|
NDIR=$(MOUNT_DIR)/null
|
|
|
|
UIDIR=$(MOUNT_DIR)/ui
|
|
|
|
Q3UIDIR=$(MOUNT_DIR)/q3_ui
|
|
|
|
JPDIR=$(MOUNT_DIR)/jpeg-6
|
2006-01-15 21:45:57 +00:00
|
|
|
TOOLSDIR=$(MOUNT_DIR)/tools
|
|
|
|
LOKISETUPDIR=$(UDIR)/setup
|
|
|
|
SDLHDIR=$(MOUNT_DIR)/SDL12
|
|
|
|
LIBSDIR=$(MOUNT_DIR)/libs
|
2005-08-26 17:39:27 +00:00
|
|
|
|
|
|
|
# extract version info
|
2006-08-26 06:12:15 +00:00
|
|
|
VERSION=$(shell grep "\#define Q3_VERSION" $(CMDIR)/q_shared.h | \
|
2006-04-19 23:01:48 +00:00
|
|
|
sed -e 's/.*".* \([^ ]*\)"/\1/')
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2006-08-22 16:13:51 +00:00
|
|
|
USE_SVN=
|
2006-01-15 21:45:57 +00:00
|
|
|
ifeq ($(wildcard .svn),.svn)
|
2006-08-22 16:13:51 +00:00
|
|
|
SVN_REV=$(shell LANG=C svnversion .)
|
|
|
|
ifneq ($(SVN_REV),)
|
|
|
|
SVN_VERSION=$(VERSION)_SVN$(SVN_REV)
|
|
|
|
USE_SVN=1
|
|
|
|
endif
|
2006-01-15 21:45:57 +00:00
|
|
|
endif
|
2006-08-22 16:30:04 +00:00
|
|
|
ifneq ($(USE_SVN),1)
|
|
|
|
SVN_VERSION=$(VERSION)
|
|
|
|
endif
|
2006-01-15 21:45:57 +00:00
|
|
|
|
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
#############################################################################
|
|
|
|
# SETUP AND BUILD -- LINUX
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
## Defaults
|
2005-08-27 02:24:00 +00:00
|
|
|
LIB=lib
|
2005-10-31 16:46:05 +00:00
|
|
|
|
|
|
|
INSTALL=install
|
|
|
|
MKDIR=mkdir
|
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
ifeq ($(PLATFORM),linux)
|
|
|
|
|
2005-08-28 17:21:46 +00:00
|
|
|
ifeq ($(ARCH),alpha)
|
2005-08-26 17:39:27 +00:00
|
|
|
ARCH=axp
|
|
|
|
else
|
2005-08-28 17:21:46 +00:00
|
|
|
ifeq ($(ARCH),x86_64)
|
|
|
|
LIB=lib64
|
2005-08-30 11:37:41 +00:00
|
|
|
else
|
2005-08-31 09:03:28 +00:00
|
|
|
ifeq ($(ARCH),ppc64)
|
|
|
|
LIB=lib64
|
|
|
|
else
|
|
|
|
ifeq ($(ARCH),s390x)
|
|
|
|
LIB=lib64
|
2005-08-28 17:21:46 +00:00
|
|
|
endif
|
2005-08-26 17:39:27 +00:00
|
|
|
endif
|
2005-08-31 09:03:28 +00:00
|
|
|
endif
|
|
|
|
endif
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-11-26 07:46:21 +00:00
|
|
|
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -pipe
|
|
|
|
|
2005-11-13 18:58:14 +00:00
|
|
|
ifeq ($(USE_OPENAL),1)
|
|
|
|
BASE_CFLAGS += -DUSE_OPENAL=1
|
2005-11-13 21:01:44 +00:00
|
|
|
ifeq ($(USE_OPENAL_DLOPEN),1)
|
|
|
|
BASE_CFLAGS += -DUSE_OPENAL_DLOPEN=1
|
|
|
|
endif
|
2005-11-13 18:58:14 +00:00
|
|
|
endif
|
2007-07-14 23:57:04 +00:00
|
|
|
|
2006-09-11 16:41:55 +00:00
|
|
|
ifeq ($(USE_CURL),1)
|
|
|
|
BASE_CFLAGS += -DUSE_CURL=1
|
|
|
|
ifeq ($(USE_CURL_DLOPEN),1)
|
|
|
|
BASE_CFLAGS += -DUSE_CURL_DLOPEN=1
|
|
|
|
endif
|
|
|
|
endif
|
2005-11-13 18:58:14 +00:00
|
|
|
|
2006-01-06 17:36:03 +00:00
|
|
|
ifeq ($(USE_CODEC_VORBIS),1)
|
|
|
|
BASE_CFLAGS += -DUSE_CODEC_VORBIS=1
|
|
|
|
endif
|
|
|
|
|
2005-11-05 01:06:09 +00:00
|
|
|
ifeq ($(USE_SDL),1)
|
2005-10-29 22:05:20 +00:00
|
|
|
BASE_CFLAGS += -DUSE_SDL_VIDEO=1 -DUSE_SDL_SOUND=1 $(shell sdl-config --cflags)
|
2005-09-27 17:45:16 +00:00
|
|
|
else
|
2007-07-14 23:57:04 +00:00
|
|
|
BASE_CFLAGS += -I/usr/X11R6/include
|
2005-08-30 23:25:02 +00:00
|
|
|
endif
|
|
|
|
|
2005-11-03 18:34:03 +00:00
|
|
|
OPTIMIZE = -O3 -ffast-math -funroll-loops -fomit-frame-pointer
|
2005-09-23 01:59:42 +00:00
|
|
|
|
2005-08-28 17:21:46 +00:00
|
|
|
ifeq ($(ARCH),x86_64)
|
2005-11-03 18:34:03 +00:00
|
|
|
OPTIMIZE = -O3 -fomit-frame-pointer -ffast-math -funroll-loops \
|
|
|
|
-falign-loops=2 -falign-jumps=2 -falign-functions=2 \
|
|
|
|
-fstrength-reduce
|
2005-12-18 15:36:07 +00:00
|
|
|
# experimental x86_64 jit compiler! you need GNU as
|
|
|
|
HAVE_VM_COMPILED = true
|
2005-08-26 17:39:27 +00:00
|
|
|
else
|
2005-08-28 17:21:46 +00:00
|
|
|
ifeq ($(ARCH),i386)
|
2006-01-19 18:16:44 +00:00
|
|
|
OPTIMIZE = -O3 -march=i586 -fomit-frame-pointer -ffast-math \
|
2005-11-03 18:34:03 +00:00
|
|
|
-funroll-loops -falign-loops=2 -falign-jumps=2 \
|
|
|
|
-falign-functions=2 -fstrength-reduce
|
2005-10-29 17:41:17 +00:00
|
|
|
HAVE_VM_COMPILED=true
|
2005-08-30 11:37:41 +00:00
|
|
|
else
|
|
|
|
ifeq ($(ARCH),ppc)
|
2005-11-26 07:46:21 +00:00
|
|
|
BASE_CFLAGS += -maltivec
|
2007-07-14 23:57:04 +00:00
|
|
|
HAVE_VM_COMPILED=false
|
2005-08-30 11:37:41 +00:00
|
|
|
endif
|
2005-08-28 17:21:46 +00:00
|
|
|
endif
|
2005-08-26 17:39:27 +00:00
|
|
|
endif
|
|
|
|
|
2005-10-29 17:41:17 +00:00
|
|
|
ifneq ($(HAVE_VM_COMPILED),true)
|
|
|
|
BASE_CFLAGS += -DNO_VM_COMPILED
|
|
|
|
endif
|
|
|
|
|
2005-10-29 00:23:10 +00:00
|
|
|
DEBUG_CFLAGS = $(BASE_CFLAGS) -g -O0
|
2005-09-23 01:59:42 +00:00
|
|
|
|
2005-08-28 17:21:46 +00:00
|
|
|
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG $(OPTIMIZE)
|
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
SHLIBEXT=so
|
|
|
|
SHLIBCFLAGS=-fPIC
|
|
|
|
SHLIBLDFLAGS=-shared $(LDFLAGS)
|
|
|
|
|
|
|
|
THREAD_LDFLAGS=-lpthread
|
|
|
|
LDFLAGS=-ldl -lm
|
|
|
|
|
2005-11-05 01:06:09 +00:00
|
|
|
ifeq ($(USE_SDL),1)
|
2005-11-15 22:09:45 +00:00
|
|
|
CLIENT_LDFLAGS=$(shell sdl-config --libs)
|
2005-09-25 22:27:26 +00:00
|
|
|
else
|
2005-11-15 22:09:45 +00:00
|
|
|
CLIENT_LDFLAGS=-L/usr/X11R6/$(LIB) -lX11 -lXext -lXxf86dga -lXxf86vm
|
2005-08-30 23:25:02 +00:00
|
|
|
endif
|
|
|
|
|
2005-11-26 07:46:21 +00:00
|
|
|
ifeq ($(USE_OPENAL),1)
|
|
|
|
ifneq ($(USE_OPENAL_DLOPEN),1)
|
|
|
|
CLIENT_LDFLAGS += -lopenal
|
|
|
|
endif
|
2005-11-15 22:22:45 +00:00
|
|
|
endif
|
2007-07-14 23:57:04 +00:00
|
|
|
|
2006-09-11 16:41:55 +00:00
|
|
|
ifeq ($(USE_CURL),1)
|
|
|
|
ifneq ($(USE_CURL_DLOPEN),1)
|
|
|
|
CLIENT_LDFLAGS += -lcurl
|
|
|
|
endif
|
|
|
|
endif
|
2005-11-15 22:22:45 +00:00
|
|
|
|
2006-01-06 17:36:03 +00:00
|
|
|
ifeq ($(USE_CODEC_VORBIS),1)
|
|
|
|
CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg
|
|
|
|
endif
|
|
|
|
|
2005-08-27 18:10:36 +00:00
|
|
|
ifeq ($(ARCH),i386)
|
|
|
|
# linux32 make ...
|
|
|
|
BASE_CFLAGS += -m32
|
|
|
|
LDFLAGS+=-m32
|
|
|
|
endif
|
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
else # ifeq Linux
|
|
|
|
|
2005-11-26 07:46:21 +00:00
|
|
|
#############################################################################
|
|
|
|
# SETUP AND BUILD -- MAC OS X
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),darwin)
|
2006-08-02 04:01:36 +00:00
|
|
|
HAVE_VM_COMPILED=true
|
|
|
|
BASE_CFLAGS=
|
|
|
|
CLIENT_LDFLAGS=
|
|
|
|
LDFLAGS=
|
|
|
|
OPTIMIZE=
|
|
|
|
ifeq ($(BUILD_MACOSX_UB),ppc)
|
|
|
|
CC=gcc-3.3
|
|
|
|
BASE_CFLAGS += -arch ppc -DSMP \
|
|
|
|
-DMAC_OS_X_VERSION_MIN_REQUIRED=1020 -nostdinc \
|
|
|
|
-F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \
|
|
|
|
-I/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3 \
|
|
|
|
-isystem /Developer/SDKs/MacOSX10.2.8.sdk/usr/include
|
|
|
|
# when using the 10.2 SDK we are not allowed the two-level namespace so
|
|
|
|
# in order to get the OpenAL dlopen() stuff to work without major
|
|
|
|
# modifications, the controversial -m linker flag must be used. this
|
|
|
|
# throws a ton of multiply defined errors which cannot be suppressed.
|
|
|
|
LDFLAGS += -arch ppc \
|
|
|
|
-L/Developer/SDKs/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3 \
|
|
|
|
-F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \
|
2007-07-14 23:57:04 +00:00
|
|
|
-Wl,-syslibroot,/Developer/SDKs/MacOSX10.2.8.sdk,-m
|
2006-08-02 04:01:36 +00:00
|
|
|
ARCH=ppc
|
|
|
|
|
|
|
|
# OS X 10.2 sdk lacks dlopen() so ded would need libSDL anyway
|
|
|
|
BUILD_SERVER=0
|
|
|
|
|
|
|
|
# because of a problem with linking on 10.2 this will generate multiply
|
|
|
|
# defined symbol errors. The errors can be turned into warnings with
|
2007-07-14 23:57:04 +00:00
|
|
|
# the -m linker flag, but you can't shut up the warnings
|
2006-08-02 04:01:36 +00:00
|
|
|
USE_OPENAL_DLOPEN=1
|
|
|
|
else
|
2006-08-02 05:12:20 +00:00
|
|
|
ifeq ($(BUILD_MACOSX_UB),i386)
|
2006-08-02 04:01:36 +00:00
|
|
|
CC=gcc-4.0
|
|
|
|
BASE_CFLAGS += -arch i386 -DSMP \
|
|
|
|
-mmacosx-version-min=10.4 \
|
|
|
|
-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 -nostdinc \
|
|
|
|
-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
|
|
|
|
-I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1/include \
|
|
|
|
-isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include
|
2006-08-31 14:33:37 +00:00
|
|
|
LDFLAGS = -arch i386 -mmacosx-version-min=10.4 \
|
|
|
|
-L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1 \
|
|
|
|
-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
|
|
|
|
-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
|
2006-08-02 05:12:20 +00:00
|
|
|
ARCH=i386
|
2006-08-02 04:01:36 +00:00
|
|
|
BUILD_SERVER=0
|
|
|
|
else
|
2007-07-14 23:57:04 +00:00
|
|
|
# for whatever reason using the headers in the MacOSX SDKs tend to throw
|
2006-08-02 04:01:36 +00:00
|
|
|
# errors even though they are identical to the system ones which don't
|
|
|
|
# therefore we shut up warning flags when running the universal build
|
|
|
|
# script as much as possible.
|
|
|
|
BASE_CFLAGS += -Wall -Wimplicit -Wstrict-prototypes
|
|
|
|
endif
|
|
|
|
endif
|
2005-11-26 07:46:21 +00:00
|
|
|
|
2006-08-02 04:01:36 +00:00
|
|
|
ifeq ($(ARCH),ppc)
|
2006-09-24 00:11:08 +00:00
|
|
|
OPTIMIZE += -faltivec -O3
|
2006-08-02 04:01:36 +00:00
|
|
|
# Carbon is required on PPC only to make a call to MakeDataExecutable
|
|
|
|
# in the PPC vm (should be a better non-Carbon way).
|
|
|
|
LDFLAGS += -framework Carbon
|
|
|
|
endif
|
2006-08-02 05:12:20 +00:00
|
|
|
ifeq ($(ARCH),i386)
|
2006-09-23 15:25:34 +00:00
|
|
|
OPTIMIZE += -march=prescott -mfpmath=sse
|
2006-08-02 04:01:36 +00:00
|
|
|
# x86 vm will crash without -mstackrealign since MMX instructions will be
|
|
|
|
# used no matter what and they corrupt the frame pointer in VM calls
|
|
|
|
BASE_CFLAGS += -mstackrealign
|
|
|
|
endif
|
|
|
|
|
|
|
|
BASE_CFLAGS += -fno-strict-aliasing -DMACOS_X -fno-common -pipe
|
2005-11-26 07:46:21 +00:00
|
|
|
|
|
|
|
# Always include debug symbols...you can strip the binary later...
|
|
|
|
BASE_CFLAGS += -gfull
|
|
|
|
|
|
|
|
ifeq ($(USE_OPENAL),1)
|
|
|
|
BASE_CFLAGS += -DUSE_OPENAL=1
|
2006-08-02 04:01:36 +00:00
|
|
|
ifneq ($(USE_OPENAL_DLOPEN),1)
|
|
|
|
CLIENT_LDFLAGS += -framework OpenAL
|
|
|
|
else
|
2005-11-26 07:46:21 +00:00
|
|
|
BASE_CFLAGS += -DUSE_OPENAL_DLOPEN=1
|
|
|
|
endif
|
|
|
|
endif
|
2007-07-14 23:57:04 +00:00
|
|
|
|
2006-09-11 16:41:55 +00:00
|
|
|
ifeq ($(USE_CURL),1)
|
|
|
|
BASE_CFLAGS += -DUSE_CURL=1
|
|
|
|
ifneq ($(USE_CURL_DLOPEN),1)
|
|
|
|
CLIENT_LDFLAGS += -lcurl
|
|
|
|
else
|
|
|
|
BASE_CFLAGS += -DUSE_CURL_DLOPEN=1
|
|
|
|
endif
|
|
|
|
endif
|
2005-11-26 07:46:21 +00:00
|
|
|
|
2006-01-06 17:36:03 +00:00
|
|
|
ifeq ($(USE_CODEC_VORBIS),1)
|
|
|
|
BASE_CFLAGS += -DUSE_CODEC_VORBIS=1
|
2006-08-02 04:01:36 +00:00
|
|
|
CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg
|
2006-01-06 17:36:03 +00:00
|
|
|
endif
|
|
|
|
|
2005-11-26 07:46:21 +00:00
|
|
|
ifeq ($(USE_SDL),1)
|
2006-08-02 04:01:36 +00:00
|
|
|
BASE_CFLAGS += -DUSE_SDL_VIDEO=1 -DUSE_SDL_SOUND=1 -D_THREAD_SAFE=1 \
|
|
|
|
-I$(SDLHDIR)/include
|
|
|
|
# We copy sdlmain before ranlib'ing it so that subversion doesn't think
|
|
|
|
# the file has been modified by each build.
|
|
|
|
LIBSDLMAIN=$(B)/libSDLmain.a
|
|
|
|
LIBSDLMAINSRC=$(LIBSDIR)/macosx/libSDLmain.a
|
2007-07-09 01:06:18 +00:00
|
|
|
CLIENT_LDFLAGS += -framework Cocoa -framework IOKit -framework OpenGL \
|
2006-08-02 04:01:36 +00:00
|
|
|
$(LIBSDIR)/macosx/libSDL-1.2.0.dylib
|
|
|
|
else
|
|
|
|
# !!! FIXME: frameworks: OpenGL, Carbon, etc...
|
|
|
|
#CLIENT_LDFLAGS += -L/usr/X11R6/$(LIB) -lX11 -lXext -lXxf86dga -lXxf86vm
|
2005-11-26 07:46:21 +00:00
|
|
|
endif
|
|
|
|
|
2006-09-23 15:25:34 +00:00
|
|
|
OPTIMIZE += -ffast-math -falign-loops=16
|
2005-11-26 07:46:21 +00:00
|
|
|
|
|
|
|
ifneq ($(HAVE_VM_COMPILED),true)
|
|
|
|
BASE_CFLAGS += -DNO_VM_COMPILED
|
|
|
|
endif
|
|
|
|
|
|
|
|
DEBUG_CFLAGS = $(BASE_CFLAGS) -g -O0
|
|
|
|
|
|
|
|
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG $(OPTIMIZE)
|
|
|
|
|
|
|
|
SHLIBEXT=dylib
|
|
|
|
SHLIBCFLAGS=-fPIC -fno-common
|
|
|
|
SHLIBLDFLAGS=-dynamiclib $(LDFLAGS)
|
|
|
|
|
|
|
|
NOTSHLIBCFLAGS=-mdynamic-no-pic
|
|
|
|
|
|
|
|
else # ifeq darwin
|
|
|
|
|
|
|
|
|
2005-09-22 03:21:33 +00:00
|
|
|
#############################################################################
|
|
|
|
# SETUP AND BUILD -- MINGW32
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),mingw32)
|
|
|
|
|
2007-05-29 19:22:24 +00:00
|
|
|
ifndef WINDRES
|
|
|
|
WINDRES=windres
|
|
|
|
endif
|
2005-09-22 03:21:33 +00:00
|
|
|
|
2005-12-29 00:04:41 +00:00
|
|
|
ARCH=x86
|
2005-09-22 03:21:33 +00:00
|
|
|
|
2005-11-11 15:07:15 +00:00
|
|
|
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes
|
2005-09-23 01:59:42 +00:00
|
|
|
|
2005-11-13 18:58:14 +00:00
|
|
|
ifeq ($(USE_OPENAL),1)
|
2005-11-13 22:16:24 +00:00
|
|
|
BASE_CFLAGS += -DUSE_OPENAL=1 -DUSE_OPENAL_DLOPEN=1
|
2005-11-13 18:58:14 +00:00
|
|
|
endif
|
2007-07-14 23:57:04 +00:00
|
|
|
|
2006-09-11 16:41:55 +00:00
|
|
|
ifeq ($(USE_CURL),1)
|
|
|
|
BASE_CFLAGS += -DUSE_CURL=1
|
|
|
|
ifneq ($(USE_CURL_DLOPEN),1)
|
|
|
|
BASE_CFLAGS += -DCURL_STATICLIB
|
|
|
|
endif
|
|
|
|
endif
|
2005-11-13 18:58:14 +00:00
|
|
|
|
2006-01-06 17:36:03 +00:00
|
|
|
ifeq ($(USE_CODEC_VORBIS),1)
|
|
|
|
BASE_CFLAGS += -DUSE_CODEC_VORBIS=1
|
|
|
|
endif
|
|
|
|
|
2006-01-19 18:16:44 +00:00
|
|
|
OPTIMIZE = -O3 -march=i586 -fomit-frame-pointer -ffast-math -falign-loops=2 \
|
2005-11-03 18:34:03 +00:00
|
|
|
-funroll-loops -falign-jumps=2 -falign-functions=2 -fstrength-reduce
|
2005-09-22 03:21:33 +00:00
|
|
|
|
2006-06-06 18:09:09 +00:00
|
|
|
HAVE_VM_COMPILED = true
|
|
|
|
|
2005-09-22 03:21:33 +00:00
|
|
|
DEBUG_CFLAGS=$(BASE_CFLAGS) -g -O0
|
|
|
|
|
|
|
|
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG $(OPTIMIZE)
|
|
|
|
|
|
|
|
SHLIBEXT=dll
|
|
|
|
SHLIBCFLAGS=
|
|
|
|
SHLIBLDFLAGS=-shared $(LDFLAGS)
|
|
|
|
|
2005-10-04 23:54:51 +00:00
|
|
|
BINEXT=.exe
|
|
|
|
|
2006-09-20 16:13:20 +00:00
|
|
|
LDFLAGS= -mwindows -lwsock32 -lgdi32 -lwinmm -lole32
|
2005-11-15 22:09:45 +00:00
|
|
|
CLIENT_LDFLAGS=
|
2005-09-22 03:21:33 +00:00
|
|
|
|
2006-09-11 16:41:55 +00:00
|
|
|
ifeq ($(USE_CURL),1)
|
|
|
|
ifneq ($(USE_CURL_DLOPEN),1)
|
|
|
|
CLIENT_LDFLAGS += $(LIBSDIR)/win32/libcurl.a
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2006-01-06 17:36:03 +00:00
|
|
|
ifeq ($(USE_CODEC_VORBIS),1)
|
|
|
|
CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg
|
|
|
|
endif
|
|
|
|
|
2005-09-22 03:21:33 +00:00
|
|
|
ifeq ($(ARCH),x86)
|
|
|
|
# build 32bit
|
|
|
|
BASE_CFLAGS += -m32
|
|
|
|
LDFLAGS+=-m32
|
|
|
|
endif
|
|
|
|
|
2006-01-04 03:40:49 +00:00
|
|
|
BUILD_SERVER = 0
|
|
|
|
BUILD_CLIENT_SMP = 0
|
|
|
|
|
2005-09-22 03:21:33 +00:00
|
|
|
else # ifeq mingw32
|
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
#############################################################################
|
|
|
|
# SETUP AND BUILD -- FREEBSD
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),freebsd)
|
|
|
|
|
2005-09-23 01:59:42 +00:00
|
|
|
ifneq (,$(findstring alpha,$(shell uname -m)))
|
|
|
|
ARCH=axp
|
|
|
|
else #default to i386
|
|
|
|
ARCH=i386
|
|
|
|
endif #alpha test
|
2005-08-26 17:39:27 +00:00
|
|
|
|
|
|
|
|
2007-07-14 23:57:04 +00:00
|
|
|
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
|
|
|
|
-I/usr/X11R6/include
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-09-26 20:09:18 +00:00
|
|
|
DEBUG_CFLAGS=$(BASE_CFLAGS) -g
|
2005-09-23 01:59:42 +00:00
|
|
|
|
2006-01-26 21:20:47 +00:00
|
|
|
ifeq ($(USE_OPENAL),1)
|
|
|
|
BASE_CFLAGS += -DUSE_OPENAL=1
|
|
|
|
ifeq ($(USE_OPENAL_DLOPEN),1)
|
|
|
|
BASE_CFLAGS += -DUSE_OPENAL_DLOPEN=1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_CODEC_VORBIS),1)
|
|
|
|
BASE_CFLAGS += -DUSE_CODEC_VORBIS=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_SDL),1)
|
2006-05-25 16:22:19 +00:00
|
|
|
BASE_CFLAGS += $(shell sdl-config --cflags) -DUSE_SDL_VIDEO=1 -DUSE_SDL_SOUND=1
|
2006-01-26 21:20:47 +00:00
|
|
|
endif
|
|
|
|
|
2005-09-23 01:59:42 +00:00
|
|
|
ifeq ($(ARCH),axp)
|
2005-10-29 00:23:10 +00:00
|
|
|
BASE_CFLAGS += -DNO_VM_COMPILED
|
2005-09-23 01:59:42 +00:00
|
|
|
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -ffast-math -funroll-loops \
|
|
|
|
-fomit-frame-pointer -fexpensive-optimizations
|
|
|
|
else
|
2005-10-29 01:02:12 +00:00
|
|
|
ifeq ($(ARCH),i386)
|
2005-09-23 01:59:42 +00:00
|
|
|
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -mtune=pentiumpro \
|
|
|
|
-march=pentium -fomit-frame-pointer -pipe -ffast-math \
|
2005-09-25 22:04:51 +00:00
|
|
|
-falign-loops=2 -falign-jumps=2 -falign-functions=2 \
|
2005-11-03 18:34:03 +00:00
|
|
|
-funroll-loops -fstrength-reduce
|
2006-06-06 22:49:42 +00:00
|
|
|
HAVE_VM_COMPILED=true
|
2005-10-29 01:02:12 +00:00
|
|
|
else
|
|
|
|
BASE_CFLAGS += -DNO_VM_COMPILED
|
|
|
|
endif
|
2005-09-23 01:59:42 +00:00
|
|
|
endif
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-09-23 01:59:42 +00:00
|
|
|
SHLIBEXT=so
|
|
|
|
SHLIBCFLAGS=-fPIC
|
|
|
|
SHLIBLDFLAGS=-shared $(LDFLAGS)
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-09-23 01:59:42 +00:00
|
|
|
THREAD_LDFLAGS=-lpthread
|
|
|
|
# don't need -ldl (FreeBSD)
|
|
|
|
LDFLAGS=-lm
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2006-01-26 21:20:47 +00:00
|
|
|
CLIENT_LDFLAGS =
|
|
|
|
|
|
|
|
ifeq ($(USE_SDL),1)
|
2006-05-25 16:22:19 +00:00
|
|
|
CLIENT_LDFLAGS += $(shell sdl-config --libs)
|
2006-01-26 21:20:47 +00:00
|
|
|
else
|
|
|
|
CLIENT_LDFLAGS += -L/usr/X11R6/$(LIB) -lGL -lX11 -lXext -lXxf86dga -lXxf86vm
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_OPENAL),1)
|
|
|
|
ifneq ($(USE_OPENAL_DLOPEN),1)
|
|
|
|
CLIENT_LDFLAGS += $(THREAD_LDFLAGS) -lopenal
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_CODEC_VORBIS),1)
|
|
|
|
CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg
|
|
|
|
endif
|
2005-09-23 01:59:42 +00:00
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
|
|
|
|
else # ifeq freebsd
|
|
|
|
|
2005-12-27 19:46:01 +00:00
|
|
|
#############################################################################
|
|
|
|
# SETUP AND BUILD -- NETBSD
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),netbsd)
|
|
|
|
|
|
|
|
ifeq ($(shell uname -m),i386)
|
|
|
|
ARCH=i386
|
|
|
|
endif
|
|
|
|
|
|
|
|
LDFLAGS=-lm
|
|
|
|
SHLIBEXT=so
|
|
|
|
SHLIBCFLAGS=-fPIC
|
|
|
|
SHLIBLDFLAGS=-shared $(LDFLAGS)
|
|
|
|
THREAD_LDFLAGS=-lpthread
|
|
|
|
|
|
|
|
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes
|
|
|
|
DEBUG_CFLAGS=$(BASE_CFLAGS) -g
|
|
|
|
|
|
|
|
ifneq ($(ARCH),i386)
|
|
|
|
BASE_CFLAGS += -DNO_VM_COMPILED
|
|
|
|
endif
|
|
|
|
|
2005-12-30 17:50:47 +00:00
|
|
|
BUILD_CLIENT = 0
|
|
|
|
BUILD_GAME_QVM = 0
|
2005-12-27 19:46:01 +00:00
|
|
|
|
|
|
|
else # ifeq netbsd
|
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
#############################################################################
|
|
|
|
# SETUP AND BUILD -- IRIX
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),irix)
|
|
|
|
|
2005-09-23 01:59:42 +00:00
|
|
|
ARCH=mips #default to MIPS
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-09-23 01:59:42 +00:00
|
|
|
BASE_CFLAGS=-Dstricmp=strcasecmp -Xcpluscomm -woff 1185 -mips3 \
|
2005-10-29 00:23:10 +00:00
|
|
|
-nostdinc -I. -I$(ROOT)/usr/include -DNO_VM_COMPILED
|
2005-09-23 01:59:42 +00:00
|
|
|
RELEASE_CFLAGS=$(BASE_CFLAGS) -O3
|
|
|
|
DEBUG_CFLAGS=$(BASE_CFLAGS) -g
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-09-23 01:59:42 +00:00
|
|
|
SHLIBEXT=so
|
|
|
|
SHLIBCFLAGS=
|
|
|
|
SHLIBLDFLAGS=-shared
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-09-23 01:59:42 +00:00
|
|
|
LDFLAGS=-ldl -lm
|
2005-11-15 22:09:45 +00:00
|
|
|
CLIENT_LDFLAGS=-L/usr/X11/$(LIB) -lGL -lX11 -lXext -lm
|
2005-08-26 17:39:27 +00:00
|
|
|
|
|
|
|
else # ifeq IRIX
|
|
|
|
|
2005-10-29 22:05:20 +00:00
|
|
|
#############################################################################
|
|
|
|
# SETUP AND BUILD -- SunOS
|
|
|
|
#############################################################################
|
|
|
|
|
2006-04-04 07:12:24 +00:00
|
|
|
ifeq ($(PLATFORM),sunos)
|
2005-10-29 22:05:20 +00:00
|
|
|
|
2005-10-31 16:46:05 +00:00
|
|
|
INSTALL=ginstall
|
|
|
|
MKDIR=gmkdir
|
2005-10-29 22:05:20 +00:00
|
|
|
COPYDIR="/usr/local/share/games/quake3"
|
|
|
|
|
|
|
|
ifneq (,$(findstring i86pc,$(shell uname -m)))
|
|
|
|
ARCH=i386
|
|
|
|
else #default to sparc
|
|
|
|
ARCH=sparc
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(ARCH),i386)
|
|
|
|
ifneq ($(ARCH),sparc)
|
|
|
|
$(error arch $(ARCH) is currently not supported)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2005-12-06 19:03:39 +00:00
|
|
|
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -pipe
|
2005-10-29 22:05:20 +00:00
|
|
|
|
2005-11-05 01:06:09 +00:00
|
|
|
ifeq ($(USE_SDL),1)
|
2005-10-29 22:05:20 +00:00
|
|
|
BASE_CFLAGS += -DUSE_SDL_SOUND=1 $(shell sdl-config --cflags)
|
|
|
|
else
|
2007-07-14 23:57:04 +00:00
|
|
|
BASE_CFLAGS += -I/usr/openwin/include
|
2005-10-29 22:05:20 +00:00
|
|
|
endif
|
|
|
|
|
2005-12-06 19:03:39 +00:00
|
|
|
OPTIMIZE = -O3 -ffast-math -funroll-loops
|
2005-10-29 22:05:20 +00:00
|
|
|
|
|
|
|
ifeq ($(ARCH),sparc)
|
2006-01-04 03:14:01 +00:00
|
|
|
OPTIMIZE = -O3 -ffast-math -falign-loops=2 \
|
2005-10-29 22:05:20 +00:00
|
|
|
-falign-jumps=2 -falign-functions=2 -fstrength-reduce \
|
2006-01-04 03:14:01 +00:00
|
|
|
-mtune=ultrasparc -mv8plus -mno-faster-structs \
|
2005-11-03 18:34:03 +00:00
|
|
|
-funroll-loops
|
2005-10-29 22:05:20 +00:00
|
|
|
else
|
|
|
|
ifeq ($(ARCH),i386)
|
2006-11-30 08:01:43 +00:00
|
|
|
OPTIMIZE = -O3 -march=i586 -fomit-frame-pointer -ffast-math \
|
|
|
|
-funroll-loops -falign-loops=2 -falign-jumps=2 \
|
|
|
|
-falign-functions=2 -fstrength-reduce
|
|
|
|
HAVE_VM_COMPILED=true
|
|
|
|
BASE_CFLAGS += -m32
|
2007-07-14 23:57:04 +00:00
|
|
|
LDFLAGS += -m32
|
|
|
|
BASE_CFLAGS += -I/usr/X11/include/NVIDIA
|
2005-10-29 22:05:20 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2006-11-30 08:01:43 +00:00
|
|
|
ifneq ($(HAVE_VM_COMPILED),true)
|
|
|
|
BASE_CFLAGS += -DNO_VM_COMPILED
|
|
|
|
endif
|
|
|
|
|
2005-12-06 19:03:39 +00:00
|
|
|
DEBUG_CFLAGS = $(BASE_CFLAGS) -ggdb -O0
|
2005-10-29 22:05:20 +00:00
|
|
|
|
|
|
|
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG $(OPTIMIZE)
|
|
|
|
|
|
|
|
SHLIBEXT=so
|
|
|
|
SHLIBCFLAGS=-fPIC
|
|
|
|
SHLIBLDFLAGS=-shared $(LDFLAGS)
|
|
|
|
|
|
|
|
THREAD_LDFLAGS=-lpthread
|
|
|
|
LDFLAGS=-lsocket -lnsl -ldl -lm
|
|
|
|
|
2006-01-04 03:14:01 +00:00
|
|
|
BOTCFLAGS=-O0
|
|
|
|
|
2005-11-05 01:06:09 +00:00
|
|
|
ifeq ($(USE_SDL),1)
|
2005-11-15 22:09:45 +00:00
|
|
|
CLIENT_LDFLAGS=$(shell sdl-config --libs) -L/usr/X11/lib -lGLU -lX11 -lXext
|
2005-10-29 22:05:20 +00:00
|
|
|
else
|
2005-11-15 22:09:45 +00:00
|
|
|
CLIENT_LDFLAGS=-L/usr/openwin/$(LIB) -L/usr/X11/lib -lGLU -lX11 -lXext
|
2005-10-29 22:05:20 +00:00
|
|
|
endif
|
|
|
|
|
2006-04-04 07:12:24 +00:00
|
|
|
else # ifeq sunos
|
2005-10-29 22:05:20 +00:00
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
#############################################################################
|
|
|
|
# SETUP AND BUILD -- GENERIC
|
|
|
|
#############################################################################
|
2005-10-29 00:23:10 +00:00
|
|
|
BASE_CFLAGS=-DNO_VM_COMPILED
|
2005-09-27 17:45:16 +00:00
|
|
|
DEBUG_CFLAGS=$(BASE_CFLAGS) -g
|
|
|
|
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-09-23 01:59:42 +00:00
|
|
|
SHLIBEXT=so
|
|
|
|
SHLIBCFLAGS=-fPIC
|
|
|
|
SHLIBLDFLAGS=-shared
|
2005-08-26 17:39:27 +00:00
|
|
|
|
|
|
|
endif #Linux
|
2005-11-26 07:46:21 +00:00
|
|
|
endif #darwin
|
2005-09-22 03:21:33 +00:00
|
|
|
endif #mingw32
|
2005-08-26 17:39:27 +00:00
|
|
|
endif #FreeBSD
|
2005-12-27 19:46:01 +00:00
|
|
|
endif #NetBSD
|
2005-08-26 17:39:27 +00:00
|
|
|
endif #IRIX
|
2005-10-29 22:05:20 +00:00
|
|
|
endif #SunOS
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-12-30 17:50:47 +00:00
|
|
|
TARGETS =
|
|
|
|
|
|
|
|
ifneq ($(BUILD_SERVER),0)
|
|
|
|
TARGETS += $(B)/ioq3ded.$(ARCH)$(BINEXT)
|
2005-11-26 07:46:21 +00:00
|
|
|
endif
|
|
|
|
|
2005-12-30 17:50:47 +00:00
|
|
|
ifneq ($(BUILD_CLIENT),0)
|
|
|
|
TARGETS += $(B)/ioquake3.$(ARCH)$(BINEXT)
|
|
|
|
ifneq ($(BUILD_CLIENT_SMP),0)
|
|
|
|
TARGETS += $(B)/ioquake3-smp.$(ARCH)$(BINEXT)
|
|
|
|
endif
|
2005-11-05 01:06:09 +00:00
|
|
|
endif
|
|
|
|
|
2005-12-30 17:50:47 +00:00
|
|
|
ifneq ($(BUILD_GAME_SO),0)
|
|
|
|
TARGETS += \
|
|
|
|
$(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) \
|
|
|
|
$(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) \
|
|
|
|
$(B)/baseq3/ui$(ARCH).$(SHLIBEXT) \
|
|
|
|
$(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) \
|
|
|
|
$(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) \
|
|
|
|
$(B)/missionpack/ui$(ARCH).$(SHLIBEXT)
|
2005-12-29 00:04:41 +00:00
|
|
|
endif
|
|
|
|
|
2005-12-30 17:50:47 +00:00
|
|
|
ifneq ($(BUILD_GAME_QVM),0)
|
|
|
|
ifneq ($(CROSS_COMPILING),1)
|
|
|
|
TARGETS += \
|
|
|
|
$(B)/baseq3/vm/cgame.qvm \
|
|
|
|
$(B)/baseq3/vm/qagame.qvm \
|
|
|
|
$(B)/baseq3/vm/ui.qvm \
|
|
|
|
$(B)/missionpack/vm/qagame.qvm \
|
|
|
|
$(B)/missionpack/vm/cgame.qvm \
|
2006-01-05 03:34:01 +00:00
|
|
|
$(B)/missionpack/vm/ui.qvm \
|
|
|
|
qvmdeps
|
2005-12-30 17:50:47 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_CCACHE),1)
|
|
|
|
CC := ccache $(CC)
|
2005-11-05 01:06:09 +00:00
|
|
|
endif
|
|
|
|
|
2005-08-31 17:43:56 +00:00
|
|
|
ifdef DEFAULT_BASEDIR
|
2005-09-23 01:59:42 +00:00
|
|
|
BASE_CFLAGS += -DDEFAULT_BASEDIR=\\\"$(DEFAULT_BASEDIR)\\\"
|
2005-08-31 17:43:56 +00:00
|
|
|
endif
|
|
|
|
|
2005-12-01 20:53:28 +00:00
|
|
|
ifeq ($(USE_LOCAL_HEADERS),1)
|
|
|
|
BASE_CFLAGS += -DUSE_LOCAL_HEADERS=1
|
|
|
|
endif
|
|
|
|
|
2005-09-29 05:25:26 +00:00
|
|
|
ifeq ($(GENERATE_DEPENDENCIES),1)
|
2007-06-02 15:26:30 +00:00
|
|
|
DEPEND_CFLAGS=-MMD
|
2005-09-27 16:35:25 +00:00
|
|
|
endif
|
|
|
|
|
2006-08-22 16:30:04 +00:00
|
|
|
ifeq ($(USE_SVN),1)
|
2006-08-22 16:13:51 +00:00
|
|
|
BASE_CFLAGS += -DSVN_VERSION=\\\"$(SVN_VERSION)\\\"
|
|
|
|
endif
|
|
|
|
|
2005-11-26 07:46:21 +00:00
|
|
|
DO_CC=$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) -o $@ -c $<
|
|
|
|
DO_SMP_CC=$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) -DSMP -o $@ -c $<
|
2007-07-14 23:57:04 +00:00
|
|
|
DO_BOT_CC=$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(BOTCFLAGS) -DBOTLIB -o $@ -c $<
|
2005-08-26 17:39:27 +00:00
|
|
|
DO_SHLIB_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
|
|
|
|
DO_AS=$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
|
2005-11-26 07:46:21 +00:00
|
|
|
DO_DED_CC=$(CC) $(NOTSHLIBCFLAGS) -DDEDICATED $(CFLAGS) -o $@ -c $<
|
2005-09-23 01:59:42 +00:00
|
|
|
DO_WINDRES=$(WINDRES) -i $< -o $@
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-10-04 23:54:51 +00:00
|
|
|
#############################################################################
|
|
|
|
# MAIN TARGETS
|
|
|
|
#############################################################################
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-08-27 05:11:08 +00:00
|
|
|
default:build_release
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-11-07 17:44:05 +00:00
|
|
|
debug: build_debug
|
|
|
|
release: build_release
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-09-07 11:44:13 +00:00
|
|
|
build_debug: B=$(BD)
|
2005-11-07 17:44:05 +00:00
|
|
|
build_debug: makedirs tools
|
2005-09-27 16:35:25 +00:00
|
|
|
$(MAKE) targets B=$(BD) CFLAGS="$(CFLAGS) $(DEBUG_CFLAGS) $(DEPEND_CFLAGS)"
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-09-07 11:44:13 +00:00
|
|
|
build_release: B=$(BR)
|
2005-11-07 17:44:05 +00:00
|
|
|
build_release: makedirs tools
|
2005-09-27 16:35:25 +00:00
|
|
|
$(MAKE) targets B=$(BR) CFLAGS="$(CFLAGS) $(RELEASE_CFLAGS) $(DEPEND_CFLAGS)"
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2007-07-14 23:57:04 +00:00
|
|
|
# Build both debug and release builds
|
2005-08-26 17:39:27 +00:00
|
|
|
all:build_debug build_release
|
|
|
|
|
2005-09-07 11:44:13 +00:00
|
|
|
targets: $(TARGETS)
|
2005-08-26 17:39:27 +00:00
|
|
|
|
|
|
|
makedirs:
|
2006-01-15 21:45:57 +00:00
|
|
|
@if [ ! -d $(BUILD_DIR) ];then $(MKDIR) $(BUILD_DIR);fi
|
2005-10-31 16:46:05 +00:00
|
|
|
@if [ ! -d $(B) ];then $(MKDIR) $(B);fi
|
|
|
|
@if [ ! -d $(B)/client ];then $(MKDIR) $(B)/client;fi
|
2007-07-14 23:57:04 +00:00
|
|
|
@if [ ! -d $(B)/clientsmp ];then $(MKDIR) $(B)/clientsmp;fi
|
2005-10-31 16:46:05 +00:00
|
|
|
@if [ ! -d $(B)/ded ];then $(MKDIR) $(B)/ded;fi
|
|
|
|
@if [ ! -d $(B)/baseq3 ];then $(MKDIR) $(B)/baseq3;fi
|
|
|
|
@if [ ! -d $(B)/baseq3/cgame ];then $(MKDIR) $(B)/baseq3/cgame;fi
|
|
|
|
@if [ ! -d $(B)/baseq3/game ];then $(MKDIR) $(B)/baseq3/game;fi
|
|
|
|
@if [ ! -d $(B)/baseq3/ui ];then $(MKDIR) $(B)/baseq3/ui;fi
|
|
|
|
@if [ ! -d $(B)/baseq3/qcommon ];then $(MKDIR) $(B)/baseq3/qcommon;fi
|
|
|
|
@if [ ! -d $(B)/baseq3/vm ];then $(MKDIR) $(B)/baseq3/vm;fi
|
|
|
|
@if [ ! -d $(B)/missionpack ];then $(MKDIR) $(B)/missionpack;fi
|
|
|
|
@if [ ! -d $(B)/missionpack/cgame ];then $(MKDIR) $(B)/missionpack/cgame;fi
|
|
|
|
@if [ ! -d $(B)/missionpack/game ];then $(MKDIR) $(B)/missionpack/game;fi
|
|
|
|
@if [ ! -d $(B)/missionpack/ui ];then $(MKDIR) $(B)/missionpack/ui;fi
|
|
|
|
@if [ ! -d $(B)/missionpack/qcommon ];then $(MKDIR) $(B)/missionpack/qcommon;fi
|
|
|
|
@if [ ! -d $(B)/missionpack/vm ];then $(MKDIR) $(B)/missionpack/vm;fi
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-10-08 14:36:15 +00:00
|
|
|
#############################################################################
|
|
|
|
# QVM BUILD TOOLS
|
|
|
|
#############################################################################
|
|
|
|
|
2006-01-15 21:45:57 +00:00
|
|
|
Q3LCC=$(TOOLSDIR)/q3lcc$(BINEXT)
|
|
|
|
Q3ASM=$(TOOLSDIR)/q3asm$(BINEXT)
|
2005-10-08 14:36:15 +00:00
|
|
|
|
2005-12-29 00:04:41 +00:00
|
|
|
ifeq ($(CROSS_COMPILING),1)
|
|
|
|
tools:
|
2007-07-14 23:57:04 +00:00
|
|
|
@echo QVM tools not built when cross-compiling
|
2005-12-29 00:04:41 +00:00
|
|
|
else
|
2005-11-06 16:50:58 +00:00
|
|
|
tools:
|
2006-01-15 21:45:57 +00:00
|
|
|
$(MAKE) -C $(TOOLSDIR)/lcc install
|
|
|
|
$(MAKE) -C $(TOOLSDIR)/asm install
|
2005-12-29 00:04:41 +00:00
|
|
|
endif
|
2005-10-08 14:36:15 +00:00
|
|
|
|
2005-11-01 22:09:15 +00:00
|
|
|
DO_Q3LCC=$(Q3LCC) -o $@ $<
|
2005-10-08 14:36:15 +00:00
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
#############################################################################
|
|
|
|
# CLIENT/SERVER
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
Q3OBJ = \
|
2005-09-23 01:59:42 +00:00
|
|
|
$(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 \
|
2006-01-04 03:12:12 +00:00
|
|
|
$(B)/client/cl_avi.o \
|
2005-09-23 01:59:42 +00:00
|
|
|
\
|
|
|
|
$(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 \
|
2006-04-22 22:21:56 +00:00
|
|
|
$(B)/client/md5.o \
|
2005-09-23 01:59:42 +00:00
|
|
|
$(B)/client/msg.o \
|
|
|
|
$(B)/client/net_chan.o \
|
|
|
|
$(B)/client/huffman.o \
|
|
|
|
\
|
|
|
|
$(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 \
|
|
|
|
\
|
2005-11-13 18:58:14 +00:00
|
|
|
$(B)/client/snd_main.o \
|
|
|
|
$(B)/client/snd_codec.o \
|
|
|
|
$(B)/client/snd_codec_wav.o \
|
2006-01-06 17:36:03 +00:00
|
|
|
$(B)/client/snd_codec_ogg.o \
|
2005-11-13 18:58:14 +00:00
|
|
|
\
|
|
|
|
$(B)/client/qal.o \
|
|
|
|
$(B)/client/snd_openal.o \
|
|
|
|
\
|
2006-09-11 16:41:55 +00:00
|
|
|
$(B)/client/cl_curl.o \
|
|
|
|
\
|
2005-09-23 01:59:42 +00:00
|
|
|
$(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/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/jcapimin.o \
|
|
|
|
$(B)/client/jchuff.o \
|
|
|
|
$(B)/client/jcinit.o \
|
|
|
|
$(B)/client/jccoefct.o \
|
|
|
|
$(B)/client/jccolor.o \
|
|
|
|
$(B)/client/jfdctflt.o \
|
|
|
|
$(B)/client/jcdctmgr.o \
|
|
|
|
$(B)/client/jcphuff.o \
|
|
|
|
$(B)/client/jcmainct.o \
|
|
|
|
$(B)/client/jcmarker.o \
|
|
|
|
$(B)/client/jcmaster.o \
|
|
|
|
$(B)/client/jcomapi.o \
|
|
|
|
$(B)/client/jcparam.o \
|
|
|
|
$(B)/client/jcprepct.o \
|
|
|
|
$(B)/client/jcsample.o \
|
|
|
|
$(B)/client/jdapimin.o \
|
|
|
|
$(B)/client/jdapistd.o \
|
|
|
|
$(B)/client/jdatasrc.o \
|
|
|
|
$(B)/client/jdcoefct.o \
|
|
|
|
$(B)/client/jdcolor.o \
|
|
|
|
$(B)/client/jddctmgr.o \
|
|
|
|
$(B)/client/jdhuff.o \
|
|
|
|
$(B)/client/jdinput.o \
|
|
|
|
$(B)/client/jdmainct.o \
|
|
|
|
$(B)/client/jdmarker.o \
|
|
|
|
$(B)/client/jdmaster.o \
|
|
|
|
$(B)/client/jdpostct.o \
|
|
|
|
$(B)/client/jdsample.o \
|
|
|
|
$(B)/client/jdtrans.o \
|
|
|
|
$(B)/client/jerror.o \
|
|
|
|
$(B)/client/jidctflt.o \
|
|
|
|
$(B)/client/jmemmgr.o \
|
|
|
|
$(B)/client/jmemnobs.o \
|
|
|
|
$(B)/client/jutils.o \
|
|
|
|
\
|
|
|
|
$(B)/client/tr_animation.o \
|
|
|
|
$(B)/client/tr_backend.o \
|
|
|
|
$(B)/client/tr_bsp.o \
|
|
|
|
$(B)/client/tr_cmds.o \
|
|
|
|
$(B)/client/tr_curve.o \
|
|
|
|
$(B)/client/tr_flares.o \
|
|
|
|
$(B)/client/tr_font.o \
|
|
|
|
$(B)/client/tr_image.o \
|
|
|
|
$(B)/client/tr_init.o \
|
|
|
|
$(B)/client/tr_light.o \
|
|
|
|
$(B)/client/tr_main.o \
|
|
|
|
$(B)/client/tr_marks.o \
|
|
|
|
$(B)/client/tr_mesh.o \
|
|
|
|
$(B)/client/tr_model.o \
|
|
|
|
$(B)/client/tr_noise.o \
|
|
|
|
$(B)/client/tr_scene.o \
|
|
|
|
$(B)/client/tr_shade.o \
|
|
|
|
$(B)/client/tr_shade_calc.o \
|
|
|
|
$(B)/client/tr_shader.o \
|
|
|
|
$(B)/client/tr_shadows.o \
|
|
|
|
$(B)/client/tr_sky.o \
|
|
|
|
$(B)/client/tr_surface.o \
|
|
|
|
$(B)/client/tr_world.o \
|
|
|
|
|
|
|
|
ifeq ($(ARCH),i386)
|
2006-01-06 00:33:24 +00:00
|
|
|
Q3OBJ += \
|
|
|
|
$(B)/client/snd_mixa.o \
|
|
|
|
$(B)/client/matha.o \
|
|
|
|
$(B)/client/ftola.o \
|
|
|
|
$(B)/client/snapvectora.o
|
2005-09-23 01:59:42 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),x86)
|
2006-01-06 00:33:24 +00:00
|
|
|
Q3OBJ += \
|
|
|
|
$(B)/client/snd_mixa.o \
|
|
|
|
$(B)/client/matha.o \
|
|
|
|
$(B)/client/ftola.o \
|
|
|
|
$(B)/client/snapvectora.o
|
2005-09-23 01:59:42 +00:00
|
|
|
endif
|
|
|
|
|
2006-06-06 18:09:09 +00:00
|
|
|
ifeq ($(HAVE_VM_COMPILED),true)
|
|
|
|
ifeq ($(ARCH),i386)
|
|
|
|
Q3OBJ += $(B)/client/vm_x86.o
|
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),x86)
|
|
|
|
Q3OBJ += $(B)/client/vm_x86.o
|
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),x86_64)
|
|
|
|
Q3OBJ += $(B)/client/vm_x86_64.o
|
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),ppc)
|
2007-07-14 23:57:04 +00:00
|
|
|
Q3OBJ += $(B)/client/vm_ppc.o
|
2005-09-23 01:59:42 +00:00
|
|
|
endif
|
|
|
|
endif
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-09-22 03:21:33 +00:00
|
|
|
ifeq ($(PLATFORM),mingw32)
|
2005-12-30 17:50:47 +00:00
|
|
|
Q3OBJ += \
|
2005-09-23 01:59:42 +00:00
|
|
|
$(B)/client/win_gamma.o \
|
|
|
|
$(B)/client/win_glimp.o \
|
|
|
|
$(B)/client/win_input.o \
|
|
|
|
$(B)/client/win_main.o \
|
|
|
|
$(B)/client/win_net.o \
|
|
|
|
$(B)/client/win_qgl.o \
|
|
|
|
$(B)/client/win_shared.o \
|
|
|
|
$(B)/client/win_snd.o \
|
|
|
|
$(B)/client/win_syscon.o \
|
|
|
|
$(B)/client/win_wndproc.o \
|
|
|
|
$(B)/client/win_resource.o
|
2005-09-22 03:21:33 +00:00
|
|
|
else
|
2006-01-04 03:40:49 +00:00
|
|
|
Q3OBJ += \
|
|
|
|
$(B)/client/unix_main.o \
|
|
|
|
$(B)/client/unix_net.o \
|
|
|
|
$(B)/client/unix_shared.o \
|
|
|
|
$(B)/client/linux_signals.o \
|
|
|
|
$(B)/client/linux_qgl.o \
|
|
|
|
$(B)/client/linux_snd.o \
|
|
|
|
$(B)/client/sdl_snd.o
|
|
|
|
|
2005-12-30 17:50:47 +00:00
|
|
|
ifeq ($(PLATFORM),linux)
|
|
|
|
Q3OBJ += $(B)/client/linux_joystick.o
|
2005-09-23 01:59:42 +00:00
|
|
|
endif
|
2005-11-26 07:46:21 +00:00
|
|
|
|
2005-12-30 17:50:47 +00:00
|
|
|
ifeq ($(USE_SDL),1)
|
|
|
|
ifneq ($(PLATFORM),darwin)
|
|
|
|
BUILD_CLIENT_SMP = 0
|
|
|
|
endif
|
2005-11-26 07:46:21 +00:00
|
|
|
endif
|
|
|
|
|
2005-12-30 17:50:47 +00:00
|
|
|
Q3POBJ = \
|
2005-10-29 22:05:20 +00:00
|
|
|
$(B)/client/linux_glimp.o \
|
2005-12-30 17:50:47 +00:00
|
|
|
$(B)/client/sdl_glimp.o
|
2005-10-29 22:05:20 +00:00
|
|
|
|
2005-12-30 17:50:47 +00:00
|
|
|
Q3POBJ_SMP = \
|
2007-07-14 23:57:04 +00:00
|
|
|
$(B)/clientsmp/linux_glimp.o \
|
|
|
|
$(B)/clientsmp/sdl_glimp.o
|
2005-12-30 17:50:47 +00:00
|
|
|
endif
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-12-30 17:50:47 +00:00
|
|
|
$(B)/ioquake3.$(ARCH)$(BINEXT): $(Q3OBJ) $(Q3POBJ) $(LIBSDLMAIN)
|
2007-07-14 23:57:04 +00:00
|
|
|
$(CC) -o $@ $(Q3OBJ) $(Q3POBJ) $(CLIENT_LDFLAGS) $(LDFLAGS) $(LIBSDLMAIN)
|
2005-09-23 01:59:42 +00:00
|
|
|
|
2005-12-30 17:50:47 +00:00
|
|
|
$(B)/ioquake3-smp.$(ARCH)$(BINEXT): $(Q3OBJ) $(Q3POBJ_SMP) $(LIBSDLMAIN)
|
2007-07-14 23:57:04 +00:00
|
|
|
$(CC) -o $@ $(Q3OBJ) $(Q3POBJ_SMP) $(CLIENT_LDFLAGS) \
|
2005-11-26 07:46:21 +00:00
|
|
|
$(THREAD_LDFLAGS) $(LDFLAGS) $(LIBSDLMAIN)
|
|
|
|
|
|
|
|
ifneq ($(strip $(LIBSDLMAIN)),)
|
|
|
|
ifneq ($(strip $(LIBSDLMAINSRC)),)
|
|
|
|
$(LIBSDLMAIN) : $(LIBSDLMAINSRC)
|
|
|
|
cp $< $@
|
|
|
|
ranlib $@
|
|
|
|
endif
|
|
|
|
endif
|
2005-09-23 01:59:42 +00:00
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
#############################################################################
|
2005-09-23 01:59:42 +00:00
|
|
|
# DEDICATED SERVER
|
2005-08-26 17:39:27 +00:00
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
Q3DOBJ = \
|
2005-09-23 01:59:42 +00:00
|
|
|
$(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/huffman.o \
|
|
|
|
\
|
|
|
|
$(B)/ded/q_math.o \
|
|
|
|
$(B)/ded/q_shared.o \
|
|
|
|
\
|
|
|
|
$(B)/ded/unzip.o \
|
|
|
|
$(B)/ded/vm.o \
|
|
|
|
$(B)/ded/vm_interpreted.o \
|
|
|
|
\
|
|
|
|
$(B)/ded/be_aas_bspq3.o \
|
|
|
|
$(B)/ded/be_aas_cluster.o \
|
|
|
|
$(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/linux_signals.o \
|
|
|
|
$(B)/ded/unix_main.o \
|
|
|
|
$(B)/ded/unix_net.o \
|
|
|
|
$(B)/ded/unix_shared.o \
|
|
|
|
\
|
|
|
|
$(B)/ded/null_client.o \
|
|
|
|
$(B)/ded/null_input.o \
|
|
|
|
$(B)/ded/null_snddma.o
|
2005-08-26 17:39:27 +00:00
|
|
|
|
|
|
|
ifeq ($(ARCH),i386)
|
2006-06-06 18:09:09 +00:00
|
|
|
Q3DOBJ += \
|
|
|
|
$(B)/ded/ftola.o \
|
|
|
|
$(B)/ded/snapvectora.o \
|
|
|
|
$(B)/ded/matha.o
|
2005-08-26 17:39:27 +00:00
|
|
|
endif
|
2006-08-02 04:01:36 +00:00
|
|
|
ifeq ($(ARCH),x86)
|
|
|
|
Q3DOBJ += \
|
|
|
|
$(B)/ded/ftola.o \
|
|
|
|
$(B)/ded/snapvectora.o \
|
|
|
|
$(B)/ded/matha.o
|
|
|
|
endif
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2006-06-06 18:09:09 +00:00
|
|
|
ifeq ($(HAVE_VM_COMPILED),true)
|
|
|
|
ifeq ($(ARCH),i386)
|
|
|
|
Q3DOBJ += $(B)/ded/vm_x86.o
|
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),x86)
|
|
|
|
Q3DOBJ += $(B)/ded/vm_x86.o
|
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),x86_64)
|
|
|
|
Q3DOBJ += $(B)/ded/vm_x86_64.o
|
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),ppc)
|
2007-07-14 23:57:04 +00:00
|
|
|
Q3DOBJ += $(B)/ded/vm_ppc.o
|
2005-08-26 17:39:27 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2005-12-30 17:50:47 +00:00
|
|
|
$(B)/ioq3ded.$(ARCH)$(BINEXT): $(Q3DOBJ)
|
2005-11-26 15:01:28 +00:00
|
|
|
$(CC) -o $@ $(Q3DOBJ) $(LDFLAGS)
|
2005-08-26 17:39:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
## BASEQ3 CGAME
|
|
|
|
#############################################################################
|
|
|
|
|
2005-10-04 23:54:51 +00:00
|
|
|
Q3CGOBJ_ = \
|
|
|
|
$(B)/baseq3/cgame/cg_main.o \
|
2005-10-04 17:45:22 +00:00
|
|
|
$(B)/baseq3/game/bg_misc.o \
|
|
|
|
$(B)/baseq3/game/bg_pmove.o \
|
|
|
|
$(B)/baseq3/game/bg_slidemove.o \
|
2005-09-23 01:59:42 +00:00
|
|
|
$(B)/baseq3/cgame/cg_consolecmds.o \
|
|
|
|
$(B)/baseq3/cgame/cg_draw.o \
|
|
|
|
$(B)/baseq3/cgame/cg_drawtools.o \
|
|
|
|
$(B)/baseq3/cgame/cg_effects.o \
|
|
|
|
$(B)/baseq3/cgame/cg_ents.o \
|
|
|
|
$(B)/baseq3/cgame/cg_event.o \
|
|
|
|
$(B)/baseq3/cgame/cg_info.o \
|
|
|
|
$(B)/baseq3/cgame/cg_localents.o \
|
|
|
|
$(B)/baseq3/cgame/cg_marks.o \
|
|
|
|
$(B)/baseq3/cgame/cg_players.o \
|
|
|
|
$(B)/baseq3/cgame/cg_playerstate.o \
|
|
|
|
$(B)/baseq3/cgame/cg_predict.o \
|
|
|
|
$(B)/baseq3/cgame/cg_scoreboard.o \
|
|
|
|
$(B)/baseq3/cgame/cg_servercmds.o \
|
|
|
|
$(B)/baseq3/cgame/cg_snapshot.o \
|
|
|
|
$(B)/baseq3/cgame/cg_view.o \
|
|
|
|
$(B)/baseq3/cgame/cg_weapons.o \
|
2005-10-26 19:45:21 +00:00
|
|
|
\
|
|
|
|
$(B)/baseq3/qcommon/q_math.o \
|
|
|
|
$(B)/baseq3/qcommon/q_shared.o
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-10-04 23:54:51 +00:00
|
|
|
Q3CGOBJ = $(Q3CGOBJ_) $(B)/baseq3/cgame/cg_syscalls.o
|
|
|
|
Q3CGVMOBJ = $(Q3CGOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
|
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
$(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) : $(Q3CGOBJ)
|
2005-11-26 15:01:28 +00:00
|
|
|
$(CC) $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ)
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-11-06 16:50:58 +00:00
|
|
|
$(B)/baseq3/vm/cgame.qvm: $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm
|
2005-10-04 23:54:51 +00:00
|
|
|
$(Q3ASM) -o $@ $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm
|
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
#############################################################################
|
|
|
|
## MISSIONPACK CGAME
|
|
|
|
#############################################################################
|
|
|
|
|
2005-10-04 23:54:51 +00:00
|
|
|
MPCGOBJ_ = \
|
|
|
|
$(B)/missionpack/cgame/cg_main.o \
|
2005-10-04 17:45:22 +00:00
|
|
|
$(B)/missionpack/game/bg_misc.o \
|
|
|
|
$(B)/missionpack/game/bg_pmove.o \
|
|
|
|
$(B)/missionpack/game/bg_slidemove.o \
|
2005-09-23 01:59:42 +00:00
|
|
|
$(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_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 \
|
2005-10-26 19:45:21 +00:00
|
|
|
$(B)/missionpack/ui/ui_shared.o \
|
|
|
|
\
|
|
|
|
$(B)/missionpack/qcommon/q_math.o \
|
|
|
|
$(B)/missionpack/qcommon/q_shared.o
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-10-04 23:54:51 +00:00
|
|
|
MPCGOBJ = $(MPCGOBJ_) $(B)/missionpack/cgame/cg_syscalls.o
|
|
|
|
MPCGVMOBJ = $(MPCGOBJ_:%.o=%.asm) $(B)/missionpack/game/bg_lib.asm
|
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
$(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) : $(MPCGOBJ)
|
|
|
|
$(CC) $(SHLIBLDFLAGS) -o $@ $(MPCGOBJ)
|
|
|
|
|
2005-11-06 16:50:58 +00:00
|
|
|
$(B)/missionpack/vm/cgame.qvm: $(MPCGVMOBJ) $(CGDIR)/cg_syscalls.asm
|
2005-10-04 23:54:51 +00:00
|
|
|
$(Q3ASM) -o $@ $(MPCGVMOBJ) $(CGDIR)/cg_syscalls.asm
|
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
## BASEQ3 GAME
|
|
|
|
#############################################################################
|
|
|
|
|
2005-10-04 23:54:51 +00:00
|
|
|
Q3GOBJ_ = \
|
|
|
|
$(B)/baseq3/game/g_main.o \
|
2005-09-23 01:59:42 +00:00
|
|
|
$(B)/baseq3/game/ai_chat.o \
|
|
|
|
$(B)/baseq3/game/ai_cmd.o \
|
|
|
|
$(B)/baseq3/game/ai_dmnet.o \
|
|
|
|
$(B)/baseq3/game/ai_dmq3.o \
|
|
|
|
$(B)/baseq3/game/ai_main.o \
|
|
|
|
$(B)/baseq3/game/ai_team.o \
|
|
|
|
$(B)/baseq3/game/ai_vcmd.o \
|
|
|
|
$(B)/baseq3/game/bg_misc.o \
|
|
|
|
$(B)/baseq3/game/bg_pmove.o \
|
|
|
|
$(B)/baseq3/game/bg_slidemove.o \
|
|
|
|
$(B)/baseq3/game/g_active.o \
|
|
|
|
$(B)/baseq3/game/g_arenas.o \
|
|
|
|
$(B)/baseq3/game/g_bot.o \
|
|
|
|
$(B)/baseq3/game/g_client.o \
|
|
|
|
$(B)/baseq3/game/g_cmds.o \
|
|
|
|
$(B)/baseq3/game/g_combat.o \
|
|
|
|
$(B)/baseq3/game/g_items.o \
|
|
|
|
$(B)/baseq3/game/g_mem.o \
|
|
|
|
$(B)/baseq3/game/g_misc.o \
|
|
|
|
$(B)/baseq3/game/g_missile.o \
|
|
|
|
$(B)/baseq3/game/g_mover.o \
|
|
|
|
$(B)/baseq3/game/g_session.o \
|
|
|
|
$(B)/baseq3/game/g_spawn.o \
|
|
|
|
$(B)/baseq3/game/g_svcmds.o \
|
|
|
|
$(B)/baseq3/game/g_target.o \
|
|
|
|
$(B)/baseq3/game/g_team.o \
|
|
|
|
$(B)/baseq3/game/g_trigger.o \
|
|
|
|
$(B)/baseq3/game/g_utils.o \
|
|
|
|
$(B)/baseq3/game/g_weapon.o \
|
|
|
|
\
|
2005-10-26 19:45:21 +00:00
|
|
|
$(B)/baseq3/qcommon/q_math.o \
|
|
|
|
$(B)/baseq3/qcommon/q_shared.o
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-10-04 23:54:51 +00:00
|
|
|
Q3GOBJ = $(Q3GOBJ_) $(B)/baseq3/game/g_syscalls.o
|
|
|
|
Q3GVMOBJ = $(Q3GOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
|
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
$(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) : $(Q3GOBJ)
|
2005-11-26 15:01:28 +00:00
|
|
|
$(CC) $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ)
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-11-06 16:50:58 +00:00
|
|
|
$(B)/baseq3/vm/qagame.qvm: $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm
|
2005-10-04 23:54:51 +00:00
|
|
|
$(Q3ASM) -o $@ $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm
|
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
#############################################################################
|
|
|
|
## MISSIONPACK GAME
|
|
|
|
#############################################################################
|
|
|
|
|
2005-10-04 23:54:51 +00:00
|
|
|
MPGOBJ_ = \
|
|
|
|
$(B)/missionpack/game/g_main.o \
|
2005-09-23 01:59:42 +00:00
|
|
|
$(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/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 \
|
|
|
|
\
|
2005-10-26 19:45:21 +00:00
|
|
|
$(B)/missionpack/qcommon/q_math.o \
|
|
|
|
$(B)/missionpack/qcommon/q_shared.o
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-10-04 23:54:51 +00:00
|
|
|
MPGOBJ = $(MPGOBJ_) $(B)/missionpack/game/g_syscalls.o
|
|
|
|
MPGVMOBJ = $(MPGOBJ_:%.o=%.asm) $(B)/missionpack/game/bg_lib.asm
|
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
$(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) : $(MPGOBJ)
|
|
|
|
$(CC) $(SHLIBLDFLAGS) -o $@ $(MPGOBJ)
|
|
|
|
|
2005-11-06 16:50:58 +00:00
|
|
|
$(B)/missionpack/vm/qagame.qvm: $(MPGVMOBJ) $(GDIR)/g_syscalls.asm
|
2005-10-04 23:54:51 +00:00
|
|
|
$(Q3ASM) -o $@ $(MPGVMOBJ) $(GDIR)/g_syscalls.asm
|
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
## BASEQ3 UI
|
|
|
|
#############################################################################
|
|
|
|
|
2005-10-04 23:54:51 +00:00
|
|
|
Q3UIOBJ_ = \
|
|
|
|
$(B)/baseq3/ui/ui_main.o \
|
|
|
|
$(B)/baseq3/game/bg_misc.o \
|
|
|
|
$(B)/baseq3/ui/ui_addbots.o \
|
|
|
|
$(B)/baseq3/ui/ui_atoms.o \
|
|
|
|
$(B)/baseq3/ui/ui_cdkey.o \
|
|
|
|
$(B)/baseq3/ui/ui_cinematics.o \
|
|
|
|
$(B)/baseq3/ui/ui_confirm.o \
|
|
|
|
$(B)/baseq3/ui/ui_connect.o \
|
|
|
|
$(B)/baseq3/ui/ui_controls2.o \
|
|
|
|
$(B)/baseq3/ui/ui_credits.o \
|
|
|
|
$(B)/baseq3/ui/ui_demo2.o \
|
|
|
|
$(B)/baseq3/ui/ui_display.o \
|
|
|
|
$(B)/baseq3/ui/ui_gameinfo.o \
|
|
|
|
$(B)/baseq3/ui/ui_ingame.o \
|
|
|
|
$(B)/baseq3/ui/ui_loadconfig.o \
|
|
|
|
$(B)/baseq3/ui/ui_menu.o \
|
|
|
|
$(B)/baseq3/ui/ui_mfield.o \
|
|
|
|
$(B)/baseq3/ui/ui_mods.o \
|
|
|
|
$(B)/baseq3/ui/ui_network.o \
|
|
|
|
$(B)/baseq3/ui/ui_options.o \
|
|
|
|
$(B)/baseq3/ui/ui_playermodel.o \
|
|
|
|
$(B)/baseq3/ui/ui_players.o \
|
|
|
|
$(B)/baseq3/ui/ui_playersettings.o \
|
|
|
|
$(B)/baseq3/ui/ui_preferences.o \
|
|
|
|
$(B)/baseq3/ui/ui_qmenu.o \
|
|
|
|
$(B)/baseq3/ui/ui_removebots.o \
|
|
|
|
$(B)/baseq3/ui/ui_saveconfig.o \
|
|
|
|
$(B)/baseq3/ui/ui_serverinfo.o \
|
|
|
|
$(B)/baseq3/ui/ui_servers2.o \
|
|
|
|
$(B)/baseq3/ui/ui_setup.o \
|
|
|
|
$(B)/baseq3/ui/ui_sound.o \
|
|
|
|
$(B)/baseq3/ui/ui_sparena.o \
|
|
|
|
$(B)/baseq3/ui/ui_specifyserver.o \
|
|
|
|
$(B)/baseq3/ui/ui_splevel.o \
|
|
|
|
$(B)/baseq3/ui/ui_sppostgame.o \
|
|
|
|
$(B)/baseq3/ui/ui_spskill.o \
|
|
|
|
$(B)/baseq3/ui/ui_startserver.o \
|
|
|
|
$(B)/baseq3/ui/ui_team.o \
|
|
|
|
$(B)/baseq3/ui/ui_teamorders.o \
|
|
|
|
$(B)/baseq3/ui/ui_video.o \
|
|
|
|
\
|
2005-10-26 19:45:21 +00:00
|
|
|
$(B)/baseq3/qcommon/q_math.o \
|
|
|
|
$(B)/baseq3/qcommon/q_shared.o
|
2005-10-04 23:54:51 +00:00
|
|
|
|
|
|
|
Q3UIOBJ = $(Q3UIOBJ_) $(B)/missionpack/ui/ui_syscalls.o
|
|
|
|
Q3UIVMOBJ = $(Q3UIOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
|
2005-08-26 17:39:27 +00:00
|
|
|
|
|
|
|
$(B)/baseq3/ui$(ARCH).$(SHLIBEXT) : $(Q3UIOBJ)
|
|
|
|
$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3UIOBJ)
|
|
|
|
|
2005-11-06 16:50:58 +00:00
|
|
|
$(B)/baseq3/vm/ui.qvm: $(Q3UIVMOBJ) $(UIDIR)/ui_syscalls.asm
|
2005-10-04 23:54:51 +00:00
|
|
|
$(Q3ASM) -o $@ $(Q3UIVMOBJ) $(UIDIR)/ui_syscalls.asm
|
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
#############################################################################
|
|
|
|
## MISSIONPACK UI
|
|
|
|
#############################################################################
|
|
|
|
|
2005-10-04 23:54:51 +00:00
|
|
|
MPUIOBJ_ = \
|
|
|
|
$(B)/missionpack/ui/ui_main.o \
|
2005-09-23 01:59:42 +00:00
|
|
|
$(B)/missionpack/ui/ui_atoms.o \
|
|
|
|
$(B)/missionpack/ui/ui_gameinfo.o \
|
|
|
|
$(B)/missionpack/ui/ui_players.o \
|
|
|
|
$(B)/missionpack/ui/ui_shared.o \
|
|
|
|
\
|
2005-10-04 17:45:22 +00:00
|
|
|
$(B)/missionpack/game/bg_misc.o \
|
2005-09-23 01:59:42 +00:00
|
|
|
\
|
2005-10-26 19:45:21 +00:00
|
|
|
$(B)/missionpack/qcommon/q_math.o \
|
|
|
|
$(B)/missionpack/qcommon/q_shared.o
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-10-04 23:54:51 +00:00
|
|
|
MPUIOBJ = $(MPUIOBJ_) $(B)/missionpack/ui/ui_syscalls.o
|
|
|
|
MPUIVMOBJ = $(MPUIOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
|
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
$(B)/missionpack/ui$(ARCH).$(SHLIBEXT) : $(MPUIOBJ)
|
|
|
|
$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPUIOBJ)
|
|
|
|
|
2005-11-06 16:50:58 +00:00
|
|
|
$(B)/missionpack/vm/ui.qvm: $(MPUIVMOBJ) $(UIDIR)/ui_syscalls.asm
|
2005-10-04 23:54:51 +00:00
|
|
|
$(Q3ASM) -o $@ $(MPUIVMOBJ) $(UIDIR)/ui_syscalls.asm
|
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
|
|
|
|
|
2007-07-14 23:57:04 +00:00
|
|
|
#############################################################################
|
|
|
|
## CLIENT/SERVER RULES
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
$(B)/client/%.o: $(UDIR)/%.s
|
|
|
|
$(DO_AS)
|
|
|
|
|
|
|
|
$(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)
|
|
|
|
|
|
|
|
$(B)/client/%.o: $(JPDIR)/%.c
|
|
|
|
$(DO_CC)
|
|
|
|
|
|
|
|
$(B)/client/%.o: $(RDIR)/%.c
|
|
|
|
$(DO_CC)
|
|
|
|
|
|
|
|
$(B)/client/%.o: $(UDIR)/%.c
|
|
|
|
$(DO_CC)
|
|
|
|
|
|
|
|
$(B)/clientsmp/%.o: $(UDIR)/%.c
|
|
|
|
$(DO_SMP_CC)
|
|
|
|
|
|
|
|
$(B)/client/%.o: $(W32DIR)/%.c
|
|
|
|
$(DO_CC)
|
|
|
|
|
|
|
|
$(B)/client/%.o: $(W32DIR)/%.rc
|
|
|
|
$(DO_WINDRES)
|
|
|
|
|
|
|
|
|
|
|
|
$(B)/ded/%.o: $(UDIR)/%.s
|
|
|
|
$(DO_AS)
|
|
|
|
|
|
|
|
$(B)/ded/%.o: $(SDIR)/%.c
|
|
|
|
$(DO_DED_CC)
|
|
|
|
|
|
|
|
$(B)/ded/%.o: $(CMDIR)/%.c
|
|
|
|
$(DO_DED_CC)
|
|
|
|
|
|
|
|
$(B)/ded/%.o: $(BLIBDIR)/%.c
|
|
|
|
$(DO_BOT_CC)
|
|
|
|
|
|
|
|
$(B)/ded/%.o: $(UDIR)/%.c
|
|
|
|
$(DO_DED_CC)
|
|
|
|
|
|
|
|
$(B)/ded/%.o: $(NDIR)/%.c
|
|
|
|
$(DO_DED_CC)
|
|
|
|
|
|
|
|
# Extra dependencies to ensure the SVN version is incorporated
|
|
|
|
ifeq ($(USE_SVN),1)
|
|
|
|
$(B)/client/cl_console.o : .svn/entries
|
|
|
|
$(B)/client/common.o : .svn/entries
|
|
|
|
$(B)/ded/common.o : .svn/entries
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2005-10-04 17:45:22 +00:00
|
|
|
#############################################################################
|
|
|
|
## GAME MODULE RULES
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
$(B)/baseq3/cgame/%.o: $(CGDIR)/%.c
|
|
|
|
$(DO_SHLIB_CC)
|
|
|
|
|
2005-11-06 16:50:58 +00:00
|
|
|
$(B)/baseq3/cgame/%.asm: $(CGDIR)/%.c
|
2005-10-04 23:54:51 +00:00
|
|
|
$(DO_Q3LCC)
|
|
|
|
|
2005-10-04 17:45:22 +00:00
|
|
|
$(B)/missionpack/cgame/%.o: $(CGDIR)/%.c
|
|
|
|
$(DO_SHLIB_CC) -DMISSIONPACK
|
|
|
|
|
2005-11-06 16:50:58 +00:00
|
|
|
$(B)/missionpack/cgame/%.asm: $(CGDIR)/%.c
|
2005-10-04 23:54:51 +00:00
|
|
|
$(DO_Q3LCC) -DMISSIONPACK
|
|
|
|
|
|
|
|
|
2005-10-04 17:45:22 +00:00
|
|
|
$(B)/baseq3/game/%.o: $(GDIR)/%.c
|
|
|
|
$(DO_SHLIB_CC)
|
|
|
|
|
2005-11-06 16:50:58 +00:00
|
|
|
$(B)/baseq3/game/%.asm: $(GDIR)/%.c
|
2005-10-04 23:54:51 +00:00
|
|
|
$(DO_Q3LCC)
|
|
|
|
|
2005-10-04 17:45:22 +00:00
|
|
|
$(B)/missionpack/game/%.o: $(GDIR)/%.c
|
|
|
|
$(DO_SHLIB_CC) -DMISSIONPACK
|
|
|
|
|
2005-11-06 16:50:58 +00:00
|
|
|
$(B)/missionpack/game/%.asm: $(GDIR)/%.c
|
2005-10-04 23:54:51 +00:00
|
|
|
$(DO_Q3LCC) -DMISSIONPACK
|
|
|
|
|
|
|
|
|
2005-10-04 17:45:22 +00:00
|
|
|
$(B)/baseq3/ui/%.o: $(Q3UIDIR)/%.c
|
|
|
|
$(DO_SHLIB_CC)
|
|
|
|
|
2005-11-06 16:50:58 +00:00
|
|
|
$(B)/baseq3/ui/%.asm: $(Q3UIDIR)/%.c
|
2005-10-04 23:54:51 +00:00
|
|
|
$(DO_Q3LCC)
|
|
|
|
|
2005-10-04 17:45:22 +00:00
|
|
|
$(B)/missionpack/ui/%.o: $(UIDIR)/%.c
|
|
|
|
$(DO_SHLIB_CC) -DMISSIONPACK
|
|
|
|
|
2005-11-06 16:50:58 +00:00
|
|
|
$(B)/missionpack/ui/%.asm: $(UIDIR)/%.c
|
2005-10-04 23:54:51 +00:00
|
|
|
$(DO_Q3LCC) -DMISSIONPACK
|
|
|
|
|
2005-10-04 17:45:22 +00:00
|
|
|
|
2005-10-26 19:45:21 +00:00
|
|
|
$(B)/baseq3/qcommon/%.o: $(CMDIR)/%.c
|
|
|
|
$(DO_SHLIB_CC)
|
|
|
|
|
2005-11-06 16:50:58 +00:00
|
|
|
$(B)/baseq3/qcommon/%.asm: $(CMDIR)/%.c
|
2005-10-26 19:45:21 +00:00
|
|
|
$(DO_Q3LCC)
|
|
|
|
|
|
|
|
$(B)/missionpack/qcommon/%.o: $(CMDIR)/%.c
|
|
|
|
$(DO_SHLIB_CC) -DMISSIONPACK
|
|
|
|
|
2005-11-06 16:50:58 +00:00
|
|
|
$(B)/missionpack/qcommon/%.asm: $(CMDIR)/%.c
|
2005-10-26 19:45:21 +00:00
|
|
|
$(DO_Q3LCC) -DMISSIONPACK
|
|
|
|
|
2005-08-26 17:39:27 +00:00
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# MISC
|
|
|
|
#############################################################################
|
|
|
|
|
2005-10-30 14:36:49 +00:00
|
|
|
copyfiles: build_release
|
2006-03-01 22:32:02 +00:00
|
|
|
@if [ ! -d $(COPYDIR)/baseq3 ]; then echo "You need to set COPYDIR to where your Quake3 data is!"; fi
|
|
|
|
-$(MKDIR) -p -m 0755 $(COPYDIR)/baseq3
|
2006-04-29 19:11:37 +00:00
|
|
|
-$(MKDIR) -p -m 0755 $(COPYDIR)/missionpack
|
|
|
|
|
|
|
|
ifneq ($(BUILD_CLIENT),0)
|
2005-12-30 17:50:47 +00:00
|
|
|
$(INSTALL) -s -m 0755 $(BR)/ioquake3.$(ARCH)$(BINEXT) $(COPYDIR)/ioquake3.$(ARCH)$(BINEXT)
|
2006-04-29 19:11:37 +00:00
|
|
|
endif
|
2005-12-13 02:35:00 +00:00
|
|
|
|
2006-04-29 19:54:54 +00:00
|
|
|
# Don't copy the SMP until it's working together with SDL.
|
|
|
|
#ifneq ($(BUILD_CLIENT_SMP),0)
|
|
|
|
# $(INSTALL) -s -m 0755 $(BR)/ioquake3-smp.$(ARCH)$(BINEXT) $(COPYDIR)/ioquake3-smp.$(ARCH)$(BINEXT)
|
|
|
|
#endif
|
2006-04-29 19:11:37 +00:00
|
|
|
|
|
|
|
ifneq ($(BUILD_SERVER),0)
|
2005-12-30 17:50:47 +00:00
|
|
|
@if [ -f $(BR)/ioq3ded.$(ARCH)$(BINEXT) ]; then \
|
|
|
|
$(INSTALL) -s -m 0755 $(BR)/ioq3ded.$(ARCH)$(BINEXT) $(COPYDIR)/ioq3ded.$(ARCH)$(BINEXT); \
|
2006-04-29 19:11:37 +00:00
|
|
|
fi
|
|
|
|
endif
|
|
|
|
|
2007-07-14 23:57:04 +00:00
|
|
|
ifneq ($(BUILD_GAME_SO),0)
|
2005-10-31 16:46:05 +00:00
|
|
|
$(INSTALL) -s -m 0755 $(BR)/baseq3/cgame$(ARCH).$(SHLIBEXT) \
|
2005-09-26 16:08:38 +00:00
|
|
|
$(COPYDIR)/baseq3/.
|
2005-10-31 16:46:05 +00:00
|
|
|
$(INSTALL) -s -m 0755 $(BR)/baseq3/qagame$(ARCH).$(SHLIBEXT) \
|
2005-09-26 16:08:38 +00:00
|
|
|
$(COPYDIR)/baseq3/.
|
2005-10-31 16:46:05 +00:00
|
|
|
$(INSTALL) -s -m 0755 $(BR)/baseq3/ui$(ARCH).$(SHLIBEXT) \
|
2005-09-26 16:08:38 +00:00
|
|
|
$(COPYDIR)/baseq3/.
|
2005-10-31 16:46:05 +00:00
|
|
|
-$(MKDIR) -p -m 0755 $(COPYDIR)/missionpack
|
|
|
|
$(INSTALL) -s -m 0755 $(BR)/missionpack/cgame$(ARCH).$(SHLIBEXT) \
|
2005-09-26 16:08:38 +00:00
|
|
|
$(COPYDIR)/missionpack/.
|
2005-10-31 16:46:05 +00:00
|
|
|
$(INSTALL) -s -m 0755 $(BR)/missionpack/qagame$(ARCH).$(SHLIBEXT) \
|
2005-09-26 16:08:38 +00:00
|
|
|
$(COPYDIR)/missionpack/.
|
2005-10-31 16:46:05 +00:00
|
|
|
$(INSTALL) -s -m 0755 $(BR)/missionpack/ui$(ARCH).$(SHLIBEXT) \
|
2005-09-26 16:08:38 +00:00
|
|
|
$(COPYDIR)/missionpack/.
|
2006-04-29 19:11:37 +00:00
|
|
|
endif
|
|
|
|
|
2006-03-24 21:48:44 +00:00
|
|
|
clean: clean-debug clean-release
|
2006-01-15 21:45:57 +00:00
|
|
|
$(MAKE) -C $(LOKISETUPDIR) clean
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2005-10-04 23:54:51 +00:00
|
|
|
clean2:
|
2005-09-27 16:35:25 +00:00
|
|
|
if [ -d $(B) ];then (find $(B) -name '*.d' -exec rm {} \;)fi
|
2005-10-04 23:54:51 +00:00
|
|
|
rm -f $(Q3OBJ) $(Q3POBJ) $(Q3POBJ_SMP) $(Q3DOBJ) \
|
|
|
|
$(MPGOBJ) $(Q3GOBJ) $(Q3CGOBJ) $(MPCGOBJ) $(Q3UIOBJ) $(MPUIOBJ) \
|
|
|
|
$(MPGVMOBJ) $(Q3GVMOBJ) $(Q3CGVMOBJ) $(MPCGVMOBJ) $(Q3UIVMOBJ) $(MPUIVMOBJ)
|
|
|
|
rm -f $(TARGETS)
|
2005-08-26 17:39:27 +00:00
|
|
|
|
|
|
|
clean-debug:
|
|
|
|
$(MAKE) clean2 B=$(BD) CFLAGS="$(DEBUG_CFLAGS)"
|
|
|
|
|
|
|
|
clean-release:
|
2005-10-05 18:13:34 +00:00
|
|
|
$(MAKE) clean2 B=$(BR) CFLAGS="$(RELEASE_CFLAGS)"
|
2005-08-26 17:39:27 +00:00
|
|
|
|
2006-01-18 16:51:47 +00:00
|
|
|
toolsclean:
|
2006-01-15 21:45:57 +00:00
|
|
|
$(MAKE) -C $(TOOLSDIR)/asm clean uninstall
|
|
|
|
$(MAKE) -C $(TOOLSDIR)/lcc clean uninstall
|
2005-10-04 23:54:51 +00:00
|
|
|
|
2006-01-18 16:51:47 +00:00
|
|
|
distclean: clean toolsclean
|
|
|
|
rm -rf $(BUILD_DIR)
|
|
|
|
|
2005-11-27 15:34:16 +00:00
|
|
|
installer: build_release
|
2006-01-15 21:45:57 +00:00
|
|
|
$(MAKE) VERSION=$(VERSION) -C $(LOKISETUPDIR)
|
|
|
|
|
|
|
|
dist:
|
2007-01-23 10:02:32 +00:00
|
|
|
rm -rf ioquake3-$(SVN_VERSION)
|
|
|
|
svn export . ioquake3-$(SVN_VERSION)
|
|
|
|
tar --owner=root --group=root --force-local -cjf ioquake3-$(SVN_VERSION).tar.bz2 ioquake3-$(SVN_VERSION)
|
|
|
|
rm -rf ioquake3-$(SVN_VERSION)
|
2005-11-27 15:34:16 +00:00
|
|
|
|
2005-09-27 16:35:25 +00:00
|
|
|
#############################################################################
|
2005-09-29 05:25:26 +00:00
|
|
|
# DEPENDENCIES
|
2005-09-27 16:35:25 +00:00
|
|
|
#############################################################################
|
|
|
|
|
2005-10-06 15:16:12 +00:00
|
|
|
D_FILES=$(shell find . -name '*.d')
|
2005-10-05 18:13:34 +00:00
|
|
|
|
2006-01-05 03:34:01 +00:00
|
|
|
$(B)/baseq3/vm/vm.d: $(Q3GOBJ) $(Q3CGOBJ) $(Q3UIOBJ)
|
2006-01-06 21:56:50 +00:00
|
|
|
cat $(^:%.o=%.d) | sed -e 's/\.o/\.asm/g' > $@
|
2006-01-05 03:34:01 +00:00
|
|
|
|
|
|
|
$(B)/missionpack/vm/vm.d: $(MPGOBJ) $(MPCGOBJ) $(MPUIOBJ)
|
2006-01-06 21:56:50 +00:00
|
|
|
cat $(^:%.o=%.d) | sed -e 's/\.o/\.asm/g' > $@
|
2006-01-05 03:34:01 +00:00
|
|
|
|
|
|
|
qvmdeps: $(B)/baseq3/vm/vm.d $(B)/missionpack/vm/vm.d
|
|
|
|
|
2005-10-05 18:13:34 +00:00
|
|
|
ifneq ($(strip $(D_FILES)),)
|
|
|
|
include $(D_FILES)
|
|
|
|
endif
|
2006-01-15 21:45:57 +00:00
|
|
|
|
|
|
|
.PHONY: release debug clean distclean copyfiles installer dist
|