2009-02-28 14:41:18 +00:00
|
|
|
# ------------------------------------------------------ #
|
|
|
|
# Makefile for the "Yamagi Quake 2 Client" #
|
|
|
|
# #
|
|
|
|
# Just type "make" to compile the #
|
|
|
|
# - SDL Client (quake2) #
|
|
|
|
# - Server (quake2ded) #
|
|
|
|
# - SDL Software-Renderer (ref_soft.so) #
|
|
|
|
# - SDL OpenGL-Renderer (ref_gl.so) #
|
|
|
|
# - games: #
|
|
|
|
# - Quake II (quake2) #
|
|
|
|
# - Quake II - The Reckoning (xatrix) #
|
|
|
|
# - Quake II - Ground Zero (rogue) #
|
|
|
|
# - Quake II - Threewave Capture The Flag (ctf) #
|
|
|
|
# #
|
|
|
|
# Dependencies: #
|
|
|
|
# - SDL 1.2 #
|
|
|
|
# - libX11 #
|
|
|
|
# - libGL #
|
|
|
|
# #
|
|
|
|
# Platforms: #
|
|
|
|
# - Linux #
|
|
|
|
# - FreeBSD #
|
|
|
|
# - Maybe any other POSIX compliant system #
|
|
|
|
# supported by SDL 1.2 #
|
|
|
|
# ------------------------------------------------------ #
|
|
|
|
|
|
|
|
# Check the OS type
|
|
|
|
OSTYPE := $(shell uname -s)
|
|
|
|
|
|
|
|
ifneq ($(OSTYPE),Linux)
|
|
|
|
ifneq ($(OSTYPE),FreeBSD)
|
|
|
|
$(error $(OSTYPE) is currently not supported by this Makefile.)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
|
|
|
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/amd64/x86_64/)
|
|
|
|
|
|
|
|
ifneq ($(ARCH),i386)
|
|
|
|
ifneq ($(ARCH),x86_64)
|
|
|
|
$(error arch $(ARCH) is currently not supported)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
|
|
|
# The compiler and compiler flags
|
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
|
|
|
|
ifeq ($(ARCH),i386)
|
2009-03-04 15:12:31 +00:00
|
|
|
CFLAGS_BASE = -O2 -ffast-math -funroll-loops -falign-loops=2 \
|
2009-02-28 14:41:18 +00:00
|
|
|
-falign-jumps=2 -falign-functions=2 -fno-strict-aliasing \
|
|
|
|
-Wall -pipe
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(ARCH),x86_64)
|
2009-03-04 15:12:31 +00:00
|
|
|
CFLAGS_BASE = -O2 -ffast-math -funroll-loops -fomit-frame-pointer \
|
2009-02-28 14:41:18 +00:00
|
|
|
-fexpensive-optimizations -fno-strict-aliasing \
|
|
|
|
-Wall -pipe
|
|
|
|
endif
|
|
|
|
|
2009-03-04 15:12:31 +00:00
|
|
|
# SDL
|
2009-02-28 14:41:18 +00:00
|
|
|
SDLCFLAGS = $(shell sdl-config --cflags)
|
|
|
|
|
2009-03-04 15:12:31 +00:00
|
|
|
# Client
|
|
|
|
CFLAGS_CLIENT = $(CFLAGS_BASE)
|
|
|
|
|
|
|
|
# Dedicated Server
|
|
|
|
CFLAGS_DEDICATED_SERVER = $(CFLAGS_BASE)
|
|
|
|
CFLAGS_DEDICATED_SERVER += -DDEDICATED_ONLY
|
|
|
|
|
2009-02-28 14:41:18 +00:00
|
|
|
# ----------
|
|
|
|
|
|
|
|
# The linker and linkerflags
|
|
|
|
|
|
|
|
# Linux
|
|
|
|
ifeq ($(OSTYPE),Linux)
|
|
|
|
LDFLAGS=-lm -ldl
|
|
|
|
endif
|
|
|
|
|
|
|
|
# FreeBSD
|
|
|
|
ifeq ($(OSTYPE),FreeBSD)
|
|
|
|
LDFLAGS=-lm
|
|
|
|
endif
|
|
|
|
|
|
|
|
# SDL
|
|
|
|
SDLLDFLAGS=$(shell sdl-config --libs)
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
|
|
|
# Targets
|
|
|
|
|
|
|
|
all: client
|
|
|
|
|
|
|
|
client:
|
|
|
|
@-mkdir -p build \
|
|
|
|
build/client \
|
2009-03-03 13:43:32 +00:00
|
|
|
build/client/console \
|
|
|
|
build/client/input \
|
|
|
|
build/client/menu \
|
|
|
|
build/client/sound \
|
|
|
|
build/common \
|
2009-03-03 14:10:08 +00:00
|
|
|
build/gameabi \
|
2009-03-03 13:43:32 +00:00
|
|
|
build/posix \
|
2009-02-28 14:41:18 +00:00
|
|
|
build/server
|
|
|
|
$(MAKE) build/client/quake2
|
|
|
|
|
2009-03-04 15:12:31 +00:00
|
|
|
dedicated_server:
|
|
|
|
@-mkdir -p build \
|
|
|
|
build/dedicated_server \
|
|
|
|
build/dedicated_server_common \
|
|
|
|
build/dedicated_server_posix
|
|
|
|
$(MAKE) build/dedicated_server/q2ded
|
|
|
|
|
2009-02-28 14:41:18 +00:00
|
|
|
clean:
|
|
|
|
@-rm -Rf build
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
# Client object
|
|
|
|
CLIENT_OBJS = \
|
2009-02-28 14:41:18 +00:00
|
|
|
build/client/cl_cin.o \
|
|
|
|
build/client/cl_ents.o \
|
|
|
|
build/client/cl_fx.o \
|
|
|
|
build/client/cl_input.o \
|
|
|
|
build/client/cl_inv.o \
|
|
|
|
build/client/cl_main.o \
|
|
|
|
build/client/cl_parse.o \
|
|
|
|
build/client/cl_pred.o \
|
|
|
|
build/client/cl_tent.o \
|
|
|
|
build/client/cl_scrn.o \
|
|
|
|
build/client/cl_view.o \
|
|
|
|
build/client/cl_newfx.o \
|
2009-03-03 13:43:32 +00:00
|
|
|
build/client/console/console.o \
|
|
|
|
build/client/input/keys.o \
|
|
|
|
build/client/menu/menu.o \
|
|
|
|
build/client/menu/qmenu.o \
|
|
|
|
build/client/sound/snd_dma.o \
|
|
|
|
build/client/sound/snd_mem.o \
|
2009-03-03 14:10:08 +00:00
|
|
|
build/client/sound/snd_mix.o
|
|
|
|
|
|
|
|
# ---------
|
|
|
|
|
|
|
|
# Common objects
|
|
|
|
COMMON_OBJS = \
|
2009-03-03 13:43:32 +00:00
|
|
|
build/common/cmd.o \
|
|
|
|
build/common/cmodel.o \
|
|
|
|
build/common/common.o \
|
|
|
|
build/common/crc.o \
|
|
|
|
build/common/cvar.o \
|
|
|
|
build/common/files.o \
|
|
|
|
build/common/md4.o \
|
|
|
|
build/common/net_chan.o \
|
2009-03-03 14:10:08 +00:00
|
|
|
build/common/pmove.o
|
2009-03-04 15:12:31 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
# ----------
|
|
|
|
|
|
|
|
# Game ABI objets
|
|
|
|
GAME_ABI_OBJS = \
|
|
|
|
build/gameabi/m_flash.o \
|
|
|
|
build/gameabi/q_shared.o
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
|
|
|
# Server objects
|
|
|
|
SERVER_OBJS = \
|
2009-03-03 13:43:32 +00:00
|
|
|
build/server/sv_ccmds.o \
|
|
|
|
build/server/sv_ents.o \
|
|
|
|
build/server/sv_game.o \
|
|
|
|
build/server/sv_init.o \
|
|
|
|
build/server/sv_main.o \
|
|
|
|
build/server/sv_send.o \
|
|
|
|
build/server/sv_user.o \
|
2009-03-03 14:10:08 +00:00
|
|
|
build/server/sv_world.o
|
|
|
|
|
|
|
|
# ---------
|
|
|
|
|
2009-03-04 15:12:31 +00:00
|
|
|
# POSIX platform objects
|
2009-03-03 14:10:08 +00:00
|
|
|
POSIX_OBJS = \
|
2009-03-03 13:43:32 +00:00
|
|
|
build/posix/cd_sdl.o \
|
|
|
|
build/posix/glob.o \
|
|
|
|
build/posix/net_udp.o \
|
|
|
|
build/posix/q_shlinux.o \
|
|
|
|
build/posix/snd_sdl.o \
|
|
|
|
build/posix/sys_linux.o \
|
|
|
|
build/posix/vid_menu.o \
|
|
|
|
build/posix/vid_so.o
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
# ----------
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-04 15:12:31 +00:00
|
|
|
# Dedicated server object
|
|
|
|
DEDICATED_SERVER_OBJS = \
|
|
|
|
build/dedicated_server/sv_ccmds.o \
|
|
|
|
build/dedicated_server/sv_ents.o \
|
|
|
|
build/dedicated_server/sv_game.o \
|
|
|
|
build/dedicated_server/sv_init.o \
|
|
|
|
build/dedicated_server/sv_main.o \
|
|
|
|
build/dedicated_server/sv_send.o \
|
|
|
|
build/dedicated_server/sv_user.o \
|
|
|
|
build/dedicated_server/sv_world.o
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
|
|
|
# Dedicated server common objects
|
|
|
|
DEDICATED_SERVER_COMMON_OBJS = \
|
|
|
|
build/dedicated_server_common/cmd.o \
|
|
|
|
build/dedicated_server_common/cmodel.o \
|
|
|
|
build/dedicated_server_common/common.o \
|
|
|
|
build/dedicated_server_common/crc.o \
|
|
|
|
build/dedicated_server_common/cvar.o \
|
|
|
|
build/dedicated_server_common/files.o \
|
|
|
|
build/dedicated_server_common/md4.o \
|
|
|
|
build/dedicated_server_common/net_chan.o \
|
|
|
|
build/dedicated_server_common/pmove.o
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
|
|
|
# Dedicated server POSIX platform objects
|
|
|
|
DEDICATED_SERVER_POSIX_OBJS = \
|
|
|
|
build/dedicated_server_posix/glob.o \
|
|
|
|
build/dedicated_server_posix/net_udp.o \
|
|
|
|
build/dedicated_server_posix/q_shlinux.o \
|
2009-03-04 15:24:29 +00:00
|
|
|
build/dedicated_server_posix/sys_linux.o
|
2009-03-04 15:12:31 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
# Client build
|
|
|
|
build/client/cl_cin.o : src/client/cl_cin.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/client/cl_ents.o : src/client/cl_ents.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/client/cl_fx.o : src/client/cl_fx.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/client/cl_input.o : src/client/cl_input.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/client/cl_inv.o : src/client/cl_inv.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/client/cl_main.o : src/client/cl_main.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/client/cl_parse.o : src/client/cl_parse.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/client/cl_pred.o : src/client/cl_pred.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/client/cl_tent.o : src/client/cl_tent.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/client/cl_scrn.o : src/client/cl_scrn.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/client/cl_view.o : src/client/cl_view.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/client/cl_newfx.o : src/client/cl_newfx.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/client/console/console.o : src/client/console/console.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/client/input/keys.o : src/client/input/keys.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/client/menu/menu.o : src/client/menu/menu.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/client/menu/qmenu.o : src/client/menu/qmenu.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/client/sound/snd_dma.o : src/client/sound/snd_dma.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/client/sound/snd_mem.o : src/client/sound/snd_mem.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/client/sound/snd_mix.o : src/client/sound/snd_mix.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
# ---------
|
|
|
|
|
|
|
|
# Common build
|
|
|
|
build/common/cmd.o : src/common/cmd.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/common/cmodel.o : src/common/cmodel.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/common/common.o : src/common/common.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/common/crc.o : src/common/crc.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/common/cvar.o : src/common/cvar.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/common/files.o : src/common/files.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/common/md4.o : src/common/md4.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/common/net_chan.o : src/common/net_chan.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/common/pmove.o : src/common/pmove.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-03-03 14:10:08 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
|
|
|
# Game ABI build
|
|
|
|
build/gameabi/m_flash.o : src/game/quake2/m_flash.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/gameabi/q_shared.o : src/game/quake2/q_shared.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
# ---------
|
|
|
|
|
|
|
|
# Server build
|
|
|
|
build/server/sv_ccmds.o : src/server/sv_ccmds.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/server/sv_ents.o : src/server/sv_ents.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/server/sv_game.o : src/server/sv_game.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/server/sv_init.o : src/server/sv_init.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/server/sv_main.o : src/server/sv_main.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/server/sv_send.o : src/server/sv_send.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/server/sv_user.o : src/server/sv_user.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/server/sv_world.o : src/server/sv_world.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-03-03 14:10:08 +00:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
|
|
|
# POSIX build
|
|
|
|
build/posix/cd_sdl.o : src/platforms/posix/cd_sdl.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $< $(SDLCFLAGS)
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/posix/glob.o : src/platforms/posix/glob.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/posix/net_udp.o : src/platforms/posix/net_udp.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/posix/q_shlinux.o : src/platforms/posix/q_shlinux.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/posix/snd_sdl.o : src/platforms/posix/snd_sdl.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $< $(SDLCFLAGS)
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/posix/sys_linux.o : src/platforms/posix/sys_linux.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/posix/vid_menu.o : src/platforms/posix/vid_menu.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
build/posix/vid_so.o : src/platforms/posix/vid_so.c
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ -c $<
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
# ----------
|
2009-03-04 15:12:31 +00:00
|
|
|
|
|
|
|
# Dedicated server build
|
|
|
|
build/dedicated_server/sv_ccmds.o : src/server/sv_ccmds.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
build/dedicated_server/sv_ents.o : src/server/sv_ents.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
build/dedicated_server/sv_game.o : src/server/sv_game.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
2009-03-03 14:10:08 +00:00
|
|
|
|
2009-03-04 15:12:31 +00:00
|
|
|
build/dedicated_server/sv_init.o : src/server/sv_init.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
build/dedicated_server/sv_main.o : src/server/sv_main.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
build/dedicated_server/sv_send.o : src/server/sv_send.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
build/dedicated_server/sv_user.o : src/server/sv_user.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
build/dedicated_server/sv_world.o : src/server/sv_world.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
# ---------
|
|
|
|
|
2009-03-04 15:24:29 +00:00
|
|
|
# Dedicated server common build
|
2009-03-04 15:12:31 +00:00
|
|
|
build/dedicated_server_common/cmd.o : src/common/cmd.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
build/dedicated_server_common/cmodel.o : src/common/cmodel.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
build/dedicated_server_common/common.o : src/common/common.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
build/dedicated_server_common/crc.o : src/common/crc.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
build/dedicated_server_common/cvar.o : src/common/cvar.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
build/dedicated_server_common/files.o : src/common/files.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
build/dedicated_server_common/md4.o : src/common/md4.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
build/dedicated_server_common/net_chan.o : src/common/net_chan.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
build/dedicated_server_common/pmove.o : src/common/pmove.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2009-03-04 15:24:29 +00:00
|
|
|
# Dedicated server POSIX build
|
2009-03-04 15:12:31 +00:00
|
|
|
build/dedicated_server_posix/glob.o : src/platforms/posix/glob.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
build/dedicated_server_posix/net_udp.o : src/platforms/posix/net_udp.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
build/dedicated_server_posix/q_shlinux.o : src/platforms/posix/q_shlinux.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
build/dedicated_server_posix/sys_linux.o : src/platforms/posix/sys_linux.c
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $<
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
|
2009-03-03 14:10:08 +00:00
|
|
|
# The client
|
|
|
|
build/client/quake2 : $(CLIENT_OBJS) $(COMMON_OBJS) $(GAME_ABI_OBJS) \
|
|
|
|
$(SERVER_OBJS) $(POSIX_OBJS)
|
2009-03-04 15:12:31 +00:00
|
|
|
$(CC) $(CFLAGS_CLIENT) -o $@ $(CLIENT_OBJS) $(COMMON_OBJS) $(GAME_ABI_OBJS) \
|
2009-03-03 14:10:08 +00:00
|
|
|
$(SERVER_OBJS) $(POSIX_OBJS) $(LDFLAGS) $(SDLLDFLAGS)
|
2009-03-04 15:12:31 +00:00
|
|
|
|
|
|
|
# Dedicated Server
|
|
|
|
build/dedicated_server/q2ded : $(DEDICATED_SERVER_OBJS) $(DEDICATED_SERVER_COMMON_OBJS) \
|
|
|
|
$(GAME_ABI_OBJS) $(DEDICATED_SERVER_POSIX_OBJS)
|
|
|
|
$(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ $(DEDICATED_SERVER_OBJS) \
|
|
|
|
$(DEDICATED_SERVER_COMMON_OBJS) $(GAME_ABI_OBJS) \
|
|
|
|
$(DEDICATED_SERVER_POSIX_OBJS) $(LDFLAGS)
|