2009-02-28 14:41:18 +00:00
|
|
|
# ------------------------------------------------------ #
|
|
|
|
# Makefile for the "Yamagi Quake 2 Client" #
|
|
|
|
# #
|
|
|
|
# Just type "make" to compile the #
|
|
|
|
# - SDL Client (quake2) #
|
2010-10-18 15:08:13 +00:00
|
|
|
# - Server (q2ded) #
|
2012-06-03 09:18:26 +00:00
|
|
|
# - SDL OpenGL-Refresher (ref_gl.so or ref_gl.dll) #
|
2011-10-09 16:55:23 +00:00
|
|
|
# - Quake II Game (baseq2) #
|
2009-02-28 14:41:18 +00:00
|
|
|
# #
|
2012-04-25 09:32:11 +00:00
|
|
|
# Base dependencies: #
|
2009-02-28 14:41:18 +00:00
|
|
|
# - SDL 1.2 #
|
|
|
|
# - libGL #
|
|
|
|
# #
|
|
|
|
# Platforms: #
|
|
|
|
# - Linux #
|
|
|
|
# - FreeBSD #
|
2012-06-03 09:18:26 +00:00
|
|
|
# - Windows #
|
2012-04-29 13:57:33 +00:00
|
|
|
# ------------------------------------------------------ #
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-04-25 09:32:11 +00:00
|
|
|
# User configurable options
|
|
|
|
# -------------------------
|
|
|
|
|
|
|
|
# Enables CD audio playback. CD audio playback is used
|
|
|
|
# for the background music and doesn't add any further
|
|
|
|
# dependencies. It should work on all platforms where
|
|
|
|
# CD playback is supported by SDL.
|
2012-04-28 19:38:07 +00:00
|
|
|
WITH_CDA:=yes
|
2012-04-25 09:32:11 +00:00
|
|
|
|
|
|
|
# Enables OGG/Vorbis support. OGG/Vorbis files can be
|
|
|
|
# used as a substitute of CD audio playback. Adds
|
|
|
|
# dependencies to libogg, libvorbis and libvorbisfile.
|
2012-04-28 19:38:07 +00:00
|
|
|
WITH_OGG:=yes
|
2012-04-25 09:32:11 +00:00
|
|
|
|
2012-04-29 13:54:15 +00:00
|
|
|
# Enables the optional OpenAL sound system.
|
2012-04-29 14:16:44 +00:00
|
|
|
# To use it your system needs libopenal.so.1 (we
|
|
|
|
# recommend openal-soft) installed
|
2012-04-28 19:38:07 +00:00
|
|
|
WITH_OPENAL:=yes
|
2012-04-25 10:09:30 +00:00
|
|
|
|
2012-04-25 09:32:11 +00:00
|
|
|
# Enables retexturing support. Adds a dependency to
|
|
|
|
# libjpeg
|
2012-04-28 19:38:07 +00:00
|
|
|
WITH_RETEXTURING:=yes
|
2012-04-25 09:32:11 +00:00
|
|
|
|
|
|
|
# Set the gamma via X11 and not via SDL. This works
|
|
|
|
# around problems in some SDL version. Adds dependencies
|
2012-06-03 09:18:26 +00:00
|
|
|
# to pkg-config, libX11 and libXxf86vm. Unsupported in
|
|
|
|
# Windows.
|
2012-04-28 19:38:07 +00:00
|
|
|
WITH_X11GAMMA:=no
|
2012-04-25 09:32:11 +00:00
|
|
|
|
|
|
|
# Enables opening of ZIP files (also known as .pk3 packs).
|
|
|
|
# Adds a dependency to libz
|
2012-04-28 19:38:07 +00:00
|
|
|
WITH_ZIP:=yes
|
2012-04-25 09:32:11 +00:00
|
|
|
|
2012-04-29 13:54:15 +00:00
|
|
|
# Enable systemwide installation of game assets
|
|
|
|
WITH_SYSTEMWIDE:=no
|
|
|
|
# this will set the default SYSTEMDIR, a non-empty string would actually be used
|
|
|
|
WITH_SYSTEMDIR:=""
|
|
|
|
|
2012-04-25 09:32:11 +00:00
|
|
|
# ====================================================== #
|
2012-04-25 09:32:36 +00:00
|
|
|
# !!! DO NOT ALTER ANYTHING BELOW THIS LINE !!! #
|
2012-04-25 09:32:11 +00:00
|
|
|
# ====================================================== #
|
|
|
|
|
2012-06-03 09:18:26 +00:00
|
|
|
# Detect the OS
|
|
|
|
ifdef SystemRoot
|
|
|
|
OS ?= Windows
|
|
|
|
else
|
2009-02-28 14:41:18 +00:00
|
|
|
OSTYPE := $(shell uname -s)
|
2012-06-03 09:18:26 +00:00
|
|
|
endif
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-06-03 09:18:26 +00:00
|
|
|
# Detect the architecture
|
|
|
|
ifeq ($(OS), Windows)
|
|
|
|
# At this time only i386 is supported on Windows
|
|
|
|
ARCH := i386
|
|
|
|
else
|
2012-02-09 17:01:29 +00:00
|
|
|
# Some platforms call it "amd64" and some "x86_64"
|
2009-02-28 14:41:18 +00:00
|
|
|
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/amd64/x86_64/)
|
2012-06-03 09:18:26 +00:00
|
|
|
endif
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-02-09 17:01:29 +00:00
|
|
|
# Refuse all other platforms as a firewall against PEBKAC
|
2011-10-09 16:55:23 +00:00
|
|
|
# (You'll need some #ifdef for your unsupported plattform!)
|
2012-04-29 16:00:38 +00:00
|
|
|
ifeq ($(findstring $(ARCH), i386 x86_64 sparc64),)
|
2009-02-28 14:41:18 +00:00
|
|
|
$(error arch $(ARCH) is currently not supported)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2012-04-29 13:57:33 +00:00
|
|
|
# Base CFLAGS.
|
2011-10-09 16:55:23 +00:00
|
|
|
#
|
|
|
|
# -O2 are enough optimizations.
|
2012-04-29 13:57:33 +00:00
|
|
|
#
|
2011-10-09 16:55:23 +00:00
|
|
|
# -fno-strict-aliasing since the source doesn't comply
|
|
|
|
# with strict aliasing rules and it's next to impossible
|
|
|
|
# to get it there...
|
|
|
|
#
|
|
|
|
# -fomit-frame-pointer since the framepointer is mostly
|
|
|
|
# useless for debugging Quake II and slows things down.
|
|
|
|
#
|
2012-02-09 17:01:29 +00:00
|
|
|
# -g to build always with debug symbols. Please DO NOT
|
|
|
|
# CHANGE THIS, since it's our only chance to debug this
|
2011-10-09 16:55:23 +00:00
|
|
|
# crap when random crashes happen!
|
|
|
|
#
|
|
|
|
# -MMD to generate header dependencies.
|
|
|
|
CFLAGS := -O2 -fno-strict-aliasing -fomit-frame-pointer \
|
|
|
|
-Wall -pipe -g -MMD
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2012-04-29 13:54:15 +00:00
|
|
|
# Systemwide installation
|
|
|
|
ifeq ($(WITH_SYSTEMWIDE),yes)
|
|
|
|
CFLAGS += -DSYSTEMWIDE
|
|
|
|
ifneq ($(WITH_SYSTEMDIR),"")
|
|
|
|
CFLAGS += -DSYSTEMDIR=\"$(WITH_SYSTEMDIR)\"
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2011-10-09 16:55:23 +00:00
|
|
|
# Extra CFLAGS for SDL
|
2012-06-03 09:18:26 +00:00
|
|
|
ifeq ($(OS), Windows)
|
|
|
|
SDLCFLAGS := $(shell sdl-config.exe --cflags)
|
|
|
|
else
|
2011-10-09 16:55:23 +00:00
|
|
|
SDLCFLAGS := $(shell sdl-config --cflags)
|
2012-06-03 09:18:26 +00:00
|
|
|
endif
|
2011-10-09 16:55:23 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2012-04-29 13:57:33 +00:00
|
|
|
# Extra CFLAGS for X11
|
2012-06-03 09:18:26 +00:00
|
|
|
ifneq ($(OS), Windows)
|
2012-04-25 09:32:11 +00:00
|
|
|
ifeq ($(WITH_X11GAMMA),yes)
|
2012-04-29 13:57:33 +00:00
|
|
|
X11CFLAGS := $(shell pkg-config x11 --cflags)
|
2012-04-25 09:32:11 +00:00
|
|
|
X11CFLAGS += $(shell pkg-config xxf86vm --cflags)
|
|
|
|
else
|
|
|
|
X11CFLAGS :=
|
|
|
|
endif
|
2012-06-03 09:18:26 +00:00
|
|
|
else
|
|
|
|
X11CFLAGS :=
|
|
|
|
endif
|
|
|
|
|
2012-04-25 09:32:11 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# Base include path.
|
2009-02-28 14:41:18 +00:00
|
|
|
ifeq ($(OSTYPE),Linux)
|
2010-11-26 12:28:00 +00:00
|
|
|
INCLUDE := -I/usr/include
|
|
|
|
else ifeq ($(OSTYPE),FreeBSD)
|
|
|
|
INCLUDE := -I/usr/local/include
|
2012-04-29 13:57:33 +00:00
|
|
|
endif
|
2009-04-10 13:11:49 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2011-10-09 16:55:23 +00:00
|
|
|
# Base LDFLAGS.
|
2010-11-26 12:28:00 +00:00
|
|
|
ifeq ($(OSTYPE),Linux)
|
|
|
|
LDFLAGS := -L/usr/lib -lm -ldl
|
|
|
|
else ifeq ($(OSTYPE),FreeBSD)
|
|
|
|
LDFLAGS := -L/usr/local/lib -lm
|
2012-04-29 13:57:33 +00:00
|
|
|
endif
|
2009-03-04 15:12:31 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2011-10-09 16:55:23 +00:00
|
|
|
# Extra LDFLAGS for SDL
|
2012-06-03 09:18:26 +00:00
|
|
|
ifeq ($(OS), Windows)
|
|
|
|
SDLLDFLAGS := $(shell sdl-config.exe --libs)
|
|
|
|
else
|
2011-10-09 16:55:23 +00:00
|
|
|
SDLLDFLAGS := $(shell sdl-config --libs)
|
2012-06-03 09:18:26 +00:00
|
|
|
endif
|
2011-10-09 16:55:23 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2012-04-29 13:57:33 +00:00
|
|
|
# Extra LDFLAGS for X11
|
2012-06-03 09:18:26 +00:00
|
|
|
ifneq ($(OS), Windows)
|
2012-04-25 09:32:11 +00:00
|
|
|
ifeq ($(WITH_X11GAMMA),yes)
|
2012-04-29 13:57:33 +00:00
|
|
|
X11LDFLAGS := $(shell pkg-config x11 --libs)
|
2012-04-25 09:32:11 +00:00
|
|
|
X11LDFLAGS += $(shell pkg-config xxf86vm --libs)
|
|
|
|
else
|
|
|
|
X11LDFLAGS :=
|
|
|
|
endif
|
2012-06-03 09:18:26 +00:00
|
|
|
else
|
|
|
|
X11LDFLAGS :=
|
|
|
|
endif
|
2012-04-25 09:32:11 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2011-12-08 11:15:38 +00:00
|
|
|
# When make is invoked by "make VERBOSE=1" print
|
|
|
|
# the compiler and linker commands.
|
|
|
|
|
|
|
|
ifdef VERBOSE
|
|
|
|
Q :=
|
|
|
|
else
|
|
|
|
Q := @
|
2012-04-29 13:57:33 +00:00
|
|
|
endif
|
2011-12-08 11:15:38 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# Builds everything
|
2012-06-03 09:18:26 +00:00
|
|
|
ifeq ($(OS), Windows)
|
|
|
|
all: server
|
|
|
|
else
|
2011-10-09 16:55:23 +00:00
|
|
|
all: client server refresher game
|
2012-06-03 09:18:26 +00:00
|
|
|
endif
|
2011-10-09 16:55:23 +00:00
|
|
|
|
|
|
|
# ----------
|
2009-03-04 15:12:31 +00:00
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# Cleanup
|
2012-06-03 09:18:26 +00:00
|
|
|
ifeq ($(OS), Windows)
|
|
|
|
clean:
|
|
|
|
@echo "===> CLEAN"
|
|
|
|
@-rmdir /S /Q release build
|
|
|
|
else
|
2010-11-26 12:28:00 +00:00
|
|
|
clean:
|
|
|
|
@echo "===> CLEAN"
|
2011-12-08 11:15:38 +00:00
|
|
|
${Q}rm -Rf build release
|
2012-06-03 09:18:26 +00:00
|
|
|
endif
|
2012-04-29 13:57:33 +00:00
|
|
|
|
2009-03-05 11:28:58 +00:00
|
|
|
# ----------
|
|
|
|
|
2012-04-29 13:57:33 +00:00
|
|
|
# The client
|
2010-11-26 12:28:00 +00:00
|
|
|
client:
|
|
|
|
@echo '===> Building quake2'
|
2011-12-08 11:15:38 +00:00
|
|
|
${Q}mkdir -p release
|
2012-04-29 13:57:33 +00:00
|
|
|
$(MAKE) release/quake2
|
2010-11-26 12:28:00 +00:00
|
|
|
|
|
|
|
build/client/%.o: %.c
|
|
|
|
@echo '===> CC $<'
|
2011-12-08 11:15:38 +00:00
|
|
|
${Q}mkdir -p $(@D)
|
2012-04-19 13:25:51 +00:00
|
|
|
${Q}$(CC) -c $(CFLAGS) $(SDLCFLAGS) $(INCLUDE) -o $@ $<
|
2011-10-09 16:55:23 +00:00
|
|
|
|
2012-04-25 09:32:11 +00:00
|
|
|
ifeq ($(WITH_CDA),yes)
|
|
|
|
release/quake2 : CFLAGS += -DCDA
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(WITH_OGG),yes)
|
|
|
|
release/quake2 : CFLAGS += -DOGG
|
|
|
|
release/quake2 : LDFLAGS += -lvorbis -lvorbisfile -logg
|
|
|
|
endif
|
|
|
|
|
2012-04-25 10:09:30 +00:00
|
|
|
ifeq ($(WITH_OPENAL),yes)
|
|
|
|
release/quake2 : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"libopenal.so.1"'
|
|
|
|
endif
|
|
|
|
|
2012-04-25 09:32:11 +00:00
|
|
|
ifeq ($(WITH_ZIP),yes)
|
|
|
|
release/quake2 : CFLAGS += -DZIP
|
|
|
|
release/quake2 : LDFLAGS += -lz
|
|
|
|
endif
|
2010-11-26 12:28:00 +00:00
|
|
|
|
2009-03-05 09:47:10 +00:00
|
|
|
# ----------
|
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# The server
|
|
|
|
server:
|
|
|
|
@echo '===> Building q2ded'
|
2011-12-08 11:15:38 +00:00
|
|
|
${Q}mkdir -p release
|
2010-11-26 12:28:00 +00:00
|
|
|
$(MAKE) release/q2ded
|
2009-03-05 16:34:42 +00:00
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
build/server/%.o: %.c
|
|
|
|
@echo '===> CC $<'
|
2011-12-08 11:15:38 +00:00
|
|
|
${Q}mkdir -p $(@D)
|
|
|
|
${Q}$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
|
2009-03-05 16:34:42 +00:00
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
release/q2ded : CFLAGS += -DDEDICATED_ONLY
|
|
|
|
release/q2ded : LDFLAGS += -lz
|
2009-03-09 16:10:05 +00:00
|
|
|
|
2012-04-25 09:32:11 +00:00
|
|
|
ifeq ($(WITH_ZIP),yes)
|
|
|
|
release/q2ded : CFLAGS += -DZIP
|
|
|
|
release/q2ded : LDFLAGS += -lz
|
|
|
|
endif
|
|
|
|
|
2009-03-09 16:10:05 +00:00
|
|
|
# ----------
|
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# The refresher
|
|
|
|
refresher:
|
|
|
|
@echo '===> Building ref_gl.so'
|
2011-12-08 11:15:38 +00:00
|
|
|
${Q}mkdir -p release
|
2010-11-26 12:28:00 +00:00
|
|
|
$(MAKE) release/ref_gl.so
|
2010-09-01 08:25:09 +00:00
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
build/refresher/%.o: %.c
|
|
|
|
@echo '===> CC $<'
|
2011-12-08 11:15:38 +00:00
|
|
|
${Q}mkdir -p $(@D)
|
2012-04-25 09:32:11 +00:00
|
|
|
${Q}$(CC) -c $(CFLAGS) $(SDLCFLAGS) $(X11CFLAGS) $(INCLUDE) -o $@ $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
release/ref_gl.so : CFLAGS += -fPIC
|
2012-04-25 09:32:11 +00:00
|
|
|
release/ref_gl.so : LDFLAGS += -shared
|
|
|
|
|
|
|
|
ifeq ($(WITH_X11GAMMA),yes)
|
|
|
|
release/ref_gl.so : CFLAGS += -DX11GAMMA
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(WITH_RETEXTURING),yes)
|
|
|
|
release/ref_gl.so : CFLAGS += -DRETEXTURE
|
|
|
|
release/ref_gl.so : LDFLAGS += -ljpeg
|
|
|
|
endif
|
2012-03-11 16:50:57 +00:00
|
|
|
|
2009-10-03 16:06:45 +00:00
|
|
|
# ----------
|
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# The baseq2 game
|
2011-10-09 16:55:23 +00:00
|
|
|
game:
|
|
|
|
@echo '===> Building baseq2/game.so'
|
2011-12-08 11:15:38 +00:00
|
|
|
${Q}mkdir -p release/baseq2
|
2010-11-26 12:28:00 +00:00
|
|
|
$(MAKE) release/baseq2/game.so
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
build/baseq2/%.o: %.c
|
|
|
|
@echo '===> CC $<'
|
2011-12-08 11:15:38 +00:00
|
|
|
${Q}mkdir -p $(@D)
|
|
|
|
${Q}$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
release/baseq2/game.so : CFLAGS += -fPIC
|
|
|
|
release/baseq2/game.so : LDFLAGS += -shared
|
2009-03-03 14:10:08 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2011-10-09 16:55:23 +00:00
|
|
|
# Used by the game
|
|
|
|
GAME_OBJS_ = \
|
|
|
|
src/common/shared/flash.o \
|
2012-06-02 09:32:45 +00:00
|
|
|
src/common/shared/rand.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/common/shared/shared.o \
|
|
|
|
src/game/g_ai.o \
|
|
|
|
src/game/g_chase.o \
|
|
|
|
src/game/g_cmds.o \
|
|
|
|
src/game/g_combat.o \
|
|
|
|
src/game/g_func.o \
|
|
|
|
src/game/g_items.o \
|
|
|
|
src/game/g_main.o \
|
|
|
|
src/game/g_misc.o \
|
|
|
|
src/game/g_monster.o \
|
|
|
|
src/game/g_phys.o \
|
|
|
|
src/game/g_spawn.o \
|
|
|
|
src/game/g_svcmds.o \
|
|
|
|
src/game/g_target.o \
|
|
|
|
src/game/g_trigger.o \
|
|
|
|
src/game/g_turret.o \
|
|
|
|
src/game/g_utils.o \
|
|
|
|
src/game/g_weapon.o \
|
|
|
|
src/game/monster/berserker/berserker.o \
|
|
|
|
src/game/monster/boss2/boss2.o \
|
|
|
|
src/game/monster/boss3/boss3.o \
|
|
|
|
src/game/monster/boss3/boss31.o \
|
|
|
|
src/game/monster/boss3/boss32.o \
|
|
|
|
src/game/monster/brain/brain.o \
|
|
|
|
src/game/monster/chick/chick.o \
|
|
|
|
src/game/monster/flipper/flipper.o \
|
|
|
|
src/game/monster/float/float.o \
|
|
|
|
src/game/monster/flyer/flyer.o \
|
|
|
|
src/game/monster/gladiator/gladiator.o \
|
|
|
|
src/game/monster/gunner/gunner.o \
|
|
|
|
src/game/monster/hover/hover.o \
|
|
|
|
src/game/monster/infantry/infantry.o \
|
|
|
|
src/game/monster/insane/insane.o \
|
|
|
|
src/game/monster/medic/medic.o \
|
|
|
|
src/game/monster/misc/move.o \
|
|
|
|
src/game/monster/mutant/mutant.o \
|
|
|
|
src/game/monster/parasite/parasite.o \
|
|
|
|
src/game/monster/soldier/soldier.o \
|
|
|
|
src/game/monster/supertank/supertank.o \
|
|
|
|
src/game/monster/tank/tank.o \
|
|
|
|
src/game/player/client.o \
|
|
|
|
src/game/player/hud.o \
|
|
|
|
src/game/player/trail.o \
|
|
|
|
src/game/player/view.o \
|
|
|
|
src/game/player/weapon.o \
|
|
|
|
src/game/savegame/savegame.o
|
2012-04-29 13:57:33 +00:00
|
|
|
|
2009-04-10 13:11:49 +00:00
|
|
|
# ----------
|
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# Used by the client
|
|
|
|
CLIENT_OBJS_ := \
|
|
|
|
src/client/cl_cin.o \
|
|
|
|
src/client/cl_console.o \
|
|
|
|
src/client/cl_download.o \
|
|
|
|
src/client/cl_effects.o \
|
|
|
|
src/client/cl_entities.o \
|
|
|
|
src/client/cl_input.o \
|
|
|
|
src/client/cl_inventory.o \
|
|
|
|
src/client/cl_keyboard.o \
|
|
|
|
src/client/cl_lights.o \
|
|
|
|
src/client/cl_main.o \
|
|
|
|
src/client/cl_network.o \
|
|
|
|
src/client/cl_parse.o \
|
|
|
|
src/client/cl_particles.o \
|
|
|
|
src/client/cl_prediction.o \
|
|
|
|
src/client/cl_screen.o \
|
|
|
|
src/client/cl_tempentities.o \
|
|
|
|
src/client/cl_view.o \
|
|
|
|
src/client/menu/menu.o \
|
|
|
|
src/client/menu/qmenu.o \
|
|
|
|
src/client/menu/videomenu.o \
|
2012-04-22 00:24:50 +00:00
|
|
|
src/client/sound/snd_al.o \
|
2010-11-26 12:28:00 +00:00
|
|
|
src/client/sound/snd_dma.o \
|
|
|
|
src/client/sound/snd_mem.o \
|
|
|
|
src/client/sound/snd_mix.o \
|
|
|
|
src/client/sound/snd_vorbis.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/client/sound/snd_wav.o \
|
2010-11-26 12:28:00 +00:00
|
|
|
src/common/crc.o \
|
|
|
|
src/common/cvar.o \
|
|
|
|
src/common/filesystem.o \
|
|
|
|
src/common/md4.o \
|
|
|
|
src/common/misc.o \
|
|
|
|
src/common/netchan.o \
|
|
|
|
src/common/pmove.o \
|
|
|
|
src/common/szone.o \
|
|
|
|
src/common/zone.o \
|
|
|
|
src/common/command/cmd_execution.o \
|
|
|
|
src/common/command/cmd_parser.o \
|
|
|
|
src/common/command/cmd_script.o \
|
|
|
|
src/common/common/com_arg.o \
|
|
|
|
src/common/common/com_clientserver.o \
|
|
|
|
src/common/message/msg_io.o \
|
|
|
|
src/common/message/msg_read.o \
|
|
|
|
src/common/model/cm_areaportals.o \
|
|
|
|
src/common/model/cm_box.o \
|
|
|
|
src/common/model/cm_boxtracing.o \
|
|
|
|
src/common/model/cm_bsp.o \
|
|
|
|
src/common/model/cm_vis.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/common/shared/flash.o \
|
2012-06-02 09:32:45 +00:00
|
|
|
src/common/shared/rand.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/common/shared/shared.o \
|
2010-11-26 12:28:00 +00:00
|
|
|
src/common/unzip/ioapi.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/common/unzip/unzip.o \
|
|
|
|
src/sdl/cd.o \
|
|
|
|
src/sdl/sound.o \
|
|
|
|
src/server/sv_cmd.o \
|
|
|
|
src/server/sv_conless.o \
|
|
|
|
src/server/sv_entities.o \
|
|
|
|
src/server/sv_game.o \
|
|
|
|
src/server/sv_init.o \
|
|
|
|
src/server/sv_main.o \
|
|
|
|
src/server/sv_save.o \
|
|
|
|
src/server/sv_send.o \
|
|
|
|
src/server/sv_user.o \
|
|
|
|
src/server/sv_world.o \
|
|
|
|
src/unix/glob.o \
|
|
|
|
src/unix/hunk.o \
|
2012-04-19 13:14:03 +00:00
|
|
|
src/unix/main.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/unix/network.o \
|
2012-04-24 14:20:01 +00:00
|
|
|
src/unix/qal.o \
|
2011-10-10 07:51:16 +00:00
|
|
|
src/unix/signalhandler.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/unix/system.o \
|
2012-04-29 13:57:33 +00:00
|
|
|
src/unix/vid.o
|
2011-10-09 16:55:23 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
|
|
|
# Used by the server
|
|
|
|
SERVER_OBJS_ := \
|
|
|
|
src/common/crc.o \
|
|
|
|
src/common/cvar.o \
|
|
|
|
src/common/filesystem.o \
|
|
|
|
src/common/md4.o \
|
|
|
|
src/common/misc.o \
|
|
|
|
src/common/netchan.o \
|
|
|
|
src/common/pmove.o \
|
|
|
|
src/common/szone.o \
|
|
|
|
src/common/zone.o \
|
|
|
|
src/common/command/cmd_execution.o \
|
|
|
|
src/common/command/cmd_parser.o \
|
|
|
|
src/common/command/cmd_script.o \
|
|
|
|
src/common/common/com_arg.o \
|
|
|
|
src/common/common/com_clientserver.o \
|
|
|
|
src/common/message/msg_io.o \
|
|
|
|
src/common/message/msg_read.o \
|
|
|
|
src/common/model/cm_areaportals.o \
|
|
|
|
src/common/model/cm_box.o \
|
|
|
|
src/common/model/cm_boxtracing.o \
|
|
|
|
src/common/model/cm_bsp.o \
|
|
|
|
src/common/model/cm_vis.o \
|
2012-06-02 09:32:45 +00:00
|
|
|
src/common/shared/rand.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/common/shared/shared.o \
|
|
|
|
src/common/unzip/ioapi.o \
|
|
|
|
src/common/unzip/unzip.o \
|
|
|
|
src/server/sv_cmd.o \
|
|
|
|
src/server/sv_conless.o \
|
|
|
|
src/server/sv_entities.o \
|
|
|
|
src/server/sv_game.o \
|
|
|
|
src/server/sv_init.o \
|
|
|
|
src/server/sv_main.o \
|
|
|
|
src/server/sv_save.o \
|
|
|
|
src/server/sv_send.o \
|
|
|
|
src/server/sv_user.o \
|
2012-06-03 09:18:26 +00:00
|
|
|
src/server/sv_world.o
|
|
|
|
|
|
|
|
ifeq ($(OS), Windows)
|
|
|
|
SERVER_OBJS_ +=
|
|
|
|
else
|
|
|
|
SERVER_OBJS_ += \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/unix/glob.o \
|
|
|
|
src/unix/hunk.o \
|
2012-04-19 13:14:03 +00:00
|
|
|
src/unix/main.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/unix/network.o \
|
2011-10-10 07:51:16 +00:00
|
|
|
src/unix/signalhandler.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/unix/system.o
|
2012-06-03 09:18:26 +00:00
|
|
|
endif
|
2012-04-29 13:57:33 +00:00
|
|
|
|
2011-10-09 16:55:23 +00:00
|
|
|
# ----------
|
2010-11-26 12:28:00 +00:00
|
|
|
|
|
|
|
# Used by the OpenGL refresher
|
|
|
|
OPENGL_OBJS_ = \
|
|
|
|
src/refresh/r_draw.o \
|
|
|
|
src/refresh/r_image.o \
|
|
|
|
src/refresh/r_light.o \
|
|
|
|
src/refresh/r_lightmap.o \
|
|
|
|
src/refresh/r_main.o \
|
|
|
|
src/refresh/r_mesh.o \
|
|
|
|
src/refresh/r_misc.o \
|
|
|
|
src/refresh/r_model.o \
|
|
|
|
src/refresh/r_scrap.o \
|
|
|
|
src/refresh/r_surf.o \
|
|
|
|
src/refresh/r_warp.o \
|
|
|
|
src/refresh/files/md2.o \
|
|
|
|
src/refresh/files/pcx.o \
|
|
|
|
src/refresh/files/sp2.o \
|
|
|
|
src/refresh/files/tga.o \
|
2012-03-11 16:50:57 +00:00
|
|
|
src/refresh/files/jpeg.o \
|
2011-10-09 16:55:23 +00:00
|
|
|
src/refresh/files/wal.o \
|
|
|
|
src/sdl/input.o \
|
|
|
|
src/sdl/refresh.o \
|
|
|
|
src/common/shared/shared.o \
|
2010-11-26 12:28:00 +00:00
|
|
|
src/unix/glob.o \
|
|
|
|
src/unix/hunk.o \
|
|
|
|
src/unix/qgl.o
|
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
# ----------
|
2009-03-04 15:12:31 +00:00
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# Rewrite pathes to our object directory
|
|
|
|
CLIENT_OBJS = $(patsubst %,build/client/%,$(CLIENT_OBJS_))
|
|
|
|
SERVER_OBJS = $(patsubst %,build/server/%,$(SERVER_OBJS_))
|
|
|
|
OPENGL_OBJS = $(patsubst %,build/refresher/%,$(OPENGL_OBJS_))
|
2011-10-09 16:55:23 +00:00
|
|
|
GAME_OBJS = $(patsubst %,build/baseq2/%,$(GAME_OBJS_))
|
2010-09-01 08:58:58 +00:00
|
|
|
|
2009-03-04 15:12:31 +00:00
|
|
|
# ----------
|
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# Generate header dependencies
|
2012-04-29 13:57:33 +00:00
|
|
|
CLIENT_DEPS= $(CLIENT_OBJS:.o=.d)
|
|
|
|
SERVER_DEPS= $(SERVER_OBJS:.o=.d)
|
|
|
|
OPENGL_DEPS= $(OPENGL_OBJS:.o=.d)
|
|
|
|
GAME_DEPS= $(GAME_OBJS:.o=.d)
|
2009-03-05 11:28:58 +00:00
|
|
|
|
2009-03-05 09:47:10 +00:00
|
|
|
# ----------
|
2009-03-05 16:34:42 +00:00
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# Suck header dependencies in
|
2012-04-29 13:57:33 +00:00
|
|
|
-include $(CLIENT_DEPS)
|
|
|
|
-include $(SERVER_DEPS)
|
|
|
|
-include $(OPENGL_DEPS)
|
|
|
|
-include $(GAME_DEPS)
|
2009-03-05 16:34:42 +00:00
|
|
|
|
|
|
|
# ----------
|
2009-03-09 16:10:05 +00:00
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# release/quake2
|
2012-04-29 13:57:33 +00:00
|
|
|
release/quake2 : $(CLIENT_OBJS)
|
2010-11-26 12:28:00 +00:00
|
|
|
@echo '===> LD $@'
|
2012-01-07 16:19:10 +00:00
|
|
|
${Q}$(CC) $(CLIENT_OBJS) $(LDFLAGS) $(SDLLDFLAGS) -o $@
|
2010-11-26 12:28:00 +00:00
|
|
|
|
|
|
|
# release/q2ded
|
2012-06-03 09:18:26 +00:00
|
|
|
ifeq ($(OS), Windows)
|
|
|
|
release/q2ded : $(SERVER_OBJS)
|
|
|
|
@echo '===> LD $@.exe'
|
|
|
|
${Q}$(CC) $(SERVER_OBJS) $(LDFLAGS) -o $@.exe
|
|
|
|
else
|
2011-10-09 16:55:23 +00:00
|
|
|
release/q2ded : $(SERVER_OBJS)
|
2010-11-26 12:28:00 +00:00
|
|
|
@echo '===> LD $@'
|
2011-12-26 08:48:33 +00:00
|
|
|
${Q}$(CC) $(SERVER_OBJS) $(LDFLAGS) -o $@
|
2012-06-03 09:18:26 +00:00
|
|
|
endif
|
2010-11-26 12:28:00 +00:00
|
|
|
|
|
|
|
# release/ref_gl.so
|
2011-10-09 16:55:23 +00:00
|
|
|
release/ref_gl.so : $(OPENGL_OBJS)
|
2010-11-26 12:28:00 +00:00
|
|
|
@echo '===> LD $@'
|
2012-04-25 09:32:11 +00:00
|
|
|
${Q}$(CC) $(OPENGL_OBJS) $(LDFLAGS) $(X11LDFLAGS) -o $@
|
2010-11-26 12:28:00 +00:00
|
|
|
|
2011-10-09 16:55:23 +00:00
|
|
|
# release/baseq2/game.so
|
|
|
|
release/baseq2/game.so : $(GAME_OBJS)
|
2010-11-26 12:28:00 +00:00
|
|
|
@echo '===> LD $@'
|
2011-12-26 08:48:33 +00:00
|
|
|
${Q}$(CC) $(GAME_OBJS) $(LDFLAGS) -o $@
|
2009-03-05 16:34:42 +00:00
|
|
|
|
2010-11-26 12:28:00 +00:00
|
|
|
# ----------
|