diff --git a/Makefile b/Makefile index 1ee08673..dd0b18b1 100644 --- a/Makefile +++ b/Makefile @@ -15,22 +15,23 @@ # - libGL # # - libvorbis # # - libogg # +# - X11 (libX11, Xxf86vm) # # - zlib # # # # Platforms: # # - Linux # # - FreeBSD # -# - Maybe any other POSIX compliant system # +# - Maybe any other UNIX compliant system # # supported by SDL 1.2 # -# ------------------------------------------------------ # +# ------------------------------------------------------ # # Check the OS type OSTYPE := $(shell uname -s) -# ---------- - +# Some plattforms call it "amd64" and some "x86_64" ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/amd64/x86_64/) +# Refuse all other plattforms as a firewall against PEBKAC ifneq ($(ARCH),i386) ifneq ($(ARCH),x86_64) $(error arch $(ARCH) is currently not supported) @@ -39,1084 +40,443 @@ endif # ---------- -# The compiler and compiler flags - -CC = gcc - -ifeq ($(ARCH),i386) -CFLAGS_BASE = -O2 -fno-strict-aliasing -fomit-frame-pointer \ - -fstack-protector-all -Wall -pipe -g -endif - -ifeq ($(ARCH),x86_64) -CFLAGS_BASE = -O2 -fomit-frame-pointer -fno-strict-aliasing \ - -fstack-protector-all -Wall -pipe -g -endif - -# OGG/Vorbis -OGGCFLAGS = -I/usr/include -I/usr/local/include - -# SDL -SDLCFLAGS := $(shell sdl-config --cflags) - -# Client -CFLAGS_CLIENT = $(CFLAGS_BASE) - -# Dedicated Server -CFLAGS_DEDICATED_SERVER = $(CFLAGS_BASE) -CFLAGS_DEDICATED_SERVER += -DDEDICATED_ONLY - -# OpenGL refresher -CFLAGS_OPENGL = $(CFLAGS_BASE) -CFLAGS_OPENGL += -I/usr/include -I/usr/local/include -I/usr/X11R6/include -CFLAGS_OPENGL += -fPIC - -# Game -CFLAGS_GAME = $(CFLAGS_BASE) -CFLAGS_GAME += -fPIC +# The compiler +CC := gcc # ---------- -# The linker and linkerflags +# Base CFLAGS. These are extended later +# for each independet target +CFLAGS := -O2 -fno-strict-aliasing -fomit-frame-pointer\ + -fstack-protector-all -Wall -pipe -g -MMD -# Linux +# ---------- + +# Base include path. ifeq ($(OSTYPE),Linux) -LDFLAGS=-lm -ldl -X11LDFLAGS=-L/usr/lib -lXxf86vm -lX11 -endif +INCLUDE := -I/usr/include +else ifeq ($(OSTYPE),FreeBSD) +INCLUDE := -I/usr/local/include +endif + -# FreeBSD -ifeq ($(OSTYPE),FreeBSD) -LDFLAGS=-L/usr/local/lib -lm -lXxf86vm -lX11 -X11LDFLAGS=-L/usr/local/lib -lXxf86vm -lX11 +# ---------- + +# Base LDFLAGS. These are extended later +# for each independet target +ifeq ($(OSTYPE),Linux) +LDFLAGS := -L/usr/lib -lm -ldl +else ifeq ($(OSTYPE),FreeBSD) +LDFLAGS := -L/usr/local/lib -lm endif -# OGG/Vorbis -OGGLDFLAGS = -lvorbis -lvorbisfile -logg - -# SDL -SDLLDFLAGS := $(shell sdl-config --libs) - -# ZLib -ZLIBLDFLAGS = -lz - -# OpenGL -OPENGLLDFLAGS = -shared - -# Game -GAMELDFLAGS = -shared - # ---------- -# Targets +# Builds everything +all: client server refresher baseq2 ctf -all: client dedicated_server ref_gl baseq2 ctf +# Cleanup +clean: + @echo "===> CLEAN" + @rm -Rf build release + +# ---------- +# The client client: - @-mkdir -p build \ - build/client \ - build/client/menu \ - build/client/sound \ - build/common \ - build/common/command \ - build/common/common \ - build/common/message \ - build/common/model \ - build/common/unzip \ - build/gameabi \ - build/unix \ - build/unix/vid \ - build/sdl \ - build/server \ - build/unzip \ - release - $(MAKE) release/quake2 + @echo '===> Building quake2' + @mkdir -p release + $(MAKE) release/quake2 -dedicated_server: - @-mkdir -p build \ - build/dedicated_server \ - build/dedicated_server_common \ - build/dedicated_server_common/command \ - build/dedicated_server_common/common \ - build/dedicated_server_common/message \ - build/dedicated_server_common/model \ - build/dedicated_server_common/unzip \ - build/dedicated_server_unix \ - release +build/client/%.o: %.c + @echo '===> CC $<' + @mkdir -p $(@D) + @$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< + +release/quake2 : INCLUDE += -I/usr/include/SDL -I/usr/local/include/SDL +release/quake2 : LDFLAGS += -lvorbis -lvorbisfile -logg -lz \ + -lXxf86vm -lX11 \ + $(shell sdl-config --libs) +# ---------- + +# The server +server: + @echo '===> Building q2ded' + @mkdir -p release $(MAKE) release/q2ded -ref_gl: - @-mkdir -p build \ - build/ref_gl \ - build/ref_gl_game \ - build/ref_gl_unix \ - build/ref_gl/files \ - release +build/server/%.o: %.c + @echo '===> CC $<' + @mkdir -p $(@D) + @$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< + +release/q2ded : CFLAGS += -DDEDICATED_ONLY +release/q2ded : LDFLAGS += -lz + +# ---------- + +# The refresher +refresher: + @echo '===> Building ref_gl.so' + @mkdir -p release $(MAKE) release/ref_gl.so +build/refresher/%.o: %.c + @echo '===> CC $<' + @mkdir -p $(@D) + @$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< + +release/ref_gl.so : INCLUDE += -I/usr/local/include/SDL -I/usr/X11R6/include +release/ref_gl.so : CFLAGS += -fPIC +release/ref_gl.so : LDFLAGS += -shared + +# ---------- + +# The baseq2 game baseq2: - @-mkdir -p build \ - build/baseq2 \ - release \ - release/baseq2 + @echo '===> Building baseq2' + @mkdir -p release/baseq2 $(MAKE) release/baseq2/game.so +build/baseq2/%.o: %.c + @echo '===> CC $<' + @mkdir -p $(@D) + @$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< + +release/baseq2/game.so : CFLAGS += -fPIC +release/baseq2/game.so : LDFLAGS += -shared + +# ---------- + +# The ctf game ctf: - @-mkdir -p build \ - build/ctf \ - release \ - release/ctf + @echo '===> Building ctf' + @mkdir -p release/ctf $(MAKE) release/ctf/game.so -clean: - @-rm -Rf build release +build/ctf/%.o: %.c + @echo '===> CC $<' + @mkdir -p $(@D) + @$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< + +release/ctf/game.so : CFLAGS += -fPIC +release/ctf/game.so : LDFLAGS += -shared + +# ---------- + +# Used by the baseq2 game +BASEQ2_OBJS_ = \ + src/game/baseq2/g_ai.o \ + src/game/baseq2/g_chase.o \ + src/game/baseq2/g_cmds.o \ + src/game/baseq2/g_combat.o \ + src/game/baseq2/g_func.o \ + src/game/baseq2/g_items.o \ + src/game/baseq2/g_main.o \ + src/game/baseq2/g_misc.o \ + src/game/baseq2/g_monster.o \ + src/game/baseq2/g_phys.o \ + src/game/baseq2/g_save.o \ + src/game/baseq2/g_spawn.o \ + src/game/baseq2/g_svcmds.o \ + src/game/baseq2/g_target.o \ + src/game/baseq2/g_trigger.o \ + src/game/baseq2/g_turret.o \ + src/game/baseq2/g_utils.o \ + src/game/baseq2/g_weapon.o \ + src/game/baseq2/m_actor.o \ + src/game/baseq2/m_berserk.o \ + src/game/baseq2/m_boss2.o \ + src/game/baseq2/m_boss3.o \ + src/game/baseq2/m_boss31.o \ + src/game/baseq2/m_boss32.o \ + src/game/baseq2/m_brain.o \ + src/game/baseq2/m_chick.o \ + src/game/baseq2/m_flash.o \ + src/game/baseq2/m_flipper.o \ + src/game/baseq2/m_float.o \ + src/game/baseq2/m_flyer.o \ + src/game/baseq2/m_gladiator.o \ + src/game/baseq2/m_gunner.o \ + src/game/baseq2/m_hover.o \ + src/game/baseq2/m_infantry.o \ + src/game/baseq2/m_insane.o \ + src/game/baseq2/m_medic.o \ + src/game/baseq2/m_move.o \ + src/game/baseq2/m_mutant.o \ + src/game/baseq2/m_parasite.o \ + src/game/baseq2/m_soldier.o \ + src/game/baseq2/m_supertank.o \ + src/game/baseq2/m_tank.o \ + src/game/baseq2/p_client.o \ + src/game/baseq2/p_hud.o \ + src/game/baseq2/p_trail.o \ + src/game/baseq2/p_view.o \ + src/game/baseq2/p_weapon.o \ + src/game/baseq2/q_shared.o + +# 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 \ + src/client/sound/snd_dma.o \ + src/client/sound/snd_mem.o \ + src/client/sound/snd_mix.o \ + src/client/sound/snd_vorbis.o \ + src/client/sound/snd_wav.o + +# Used by the client and the server +COMMON_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 \ + src/common/unzip/ioapi.o \ + src/common/unzip/unzip.o + +# Used by the ctf game +CTF_OBJS_ = \ + src/game/ctf/g_ai.o \ + src/game/ctf/g_chase.o \ + src/game/ctf/g_cmds.o \ + src/game/ctf/g_combat.o \ + src/game/ctf/g_ctf.o \ + src/game/ctf/g_func.o \ + src/game/ctf/g_items.o \ + src/game/ctf/g_main.o \ + src/game/ctf/g_misc.o \ + src/game/ctf/g_monster.o \ + src/game/ctf/g_phys.o \ + src/game/ctf/g_save.o \ + src/game/ctf/g_spawn.o \ + src/game/ctf/g_svcmds.o \ + src/game/ctf/g_target.o \ + src/game/ctf/g_trigger.o \ + src/game/ctf/g_utils.o \ + src/game/ctf/g_weapon.o \ + src/game/ctf/m_move.o \ + src/game/ctf/p_client.o \ + src/game/ctf/p_hud.o \ + src/game/ctf/p_menu.o \ + src/game/ctf/p_trail.o \ + src/game/ctf/p_view.o \ + src/game/ctf/p_weapon.o \ + src/game/ctf/q_shared.o + +# Used by the client and the server +GAME_ABI_OBJS_ := \ + src/game/baseq2/m_flash.o \ + src/game/baseq2/q_shared.o + +# 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 \ + src/refresh/files/wal.o + +# Used by the OpenGL refresher +OPENGL_GAME_ABI_OBJS_ = \ + src/game/baseq2/q_shared.o + +# Used by the client +UNIX_CLIENT_OBJS_ := \ + src/unix/glob.o \ + src/unix/hunk.o \ + src/unix/misc.o \ + src/unix/network.o \ + src/unix/system.o \ + src/unix/vid.o + +# Used by the OpenGL refresher +UNIX_OPENGL_OBJS_ = \ + src/unix/glob.o \ + src/unix/hunk.o \ + src/unix/misc.o \ + src/unix/qgl.o + +# Used by the server +UNIX_SERVER_OBJS_ := \ + src/unix/glob.o \ + src/unix/hunk.o \ + src/unix/misc.o \ + src/unix/network.o \ + src/unix/system.o + +# Used by the client +SDL_OBJS_ := \ + src/sdl/cd.o \ + src/sdl/sound.o + +# Used by the OpenGL refresher +SDL_OPENGL_OBJS_ := \ + src/sdl/input.o \ + src/sdl/refresh.o + +# Used by the server +SERVER_OBJS_ := \ + 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 # ---------- -# Client object -CLIENT_OBJS = \ - build/client/cl_cin.o \ - build/client/cl_console.o \ - build/client/cl_download.o \ - build/client/cl_effects.o \ - build/client/cl_entities.o \ - build/client/cl_input.o \ - build/client/cl_inventory.o \ - build/client/cl_keyboard.o \ - build/client/cl_lights.o \ - build/client/cl_main.o \ - build/client/cl_network.o \ - build/client/cl_parse.o \ - build/client/cl_particles.o \ - build/client/cl_prediction.o \ - build/client/cl_tempentities.o \ - build/client/cl_screen.o \ - build/client/cl_view.o \ - build/client/menu/menu.o \ - build/client/menu/qmenu.o \ - build/client/menu/videomenu.o \ - build/client/sound/snd_dma.o \ - build/client/sound/snd_mem.o \ - build/client/sound/snd_mix.o \ - build/client/sound/snd_vorbis.o \ - build/client/sound/snd_wav.o +# Rewrite pathes to our object directory +CLIENT_COMMON_OBJS = $(patsubst %,build/client/%,$(COMMON_OBJS_)) +CLIENT_GAME_ABI_OBJS = $(patsubst %,build/client/%,$(GAME_ABI_OBJS_)) +CLIENT_OBJS = $(patsubst %,build/client/%,$(CLIENT_OBJS_)) +CLIENT_SERVER_OBJS = $(patsubst %,build/client/%,$(SERVER_OBJS_)) +UNIX_CLIENT_OBJS = $(patsubst %,build/client/%,$(UNIX_CLIENT_OBJS_)) +SDL_OBJS = $(patsubst %,build/client/%,$(SDL_OBJS_)) -# --------- +SERVER_OBJS = $(patsubst %,build/server/%,$(SERVER_OBJS_)) +SERVER_COMMON_OBJS = $(patsubst %,build/server/%,$(COMMON_OBJS_)) +SERVER_GAME_ABI_OBJS = $(patsubst %,build/server/%,$(GAME_ABI_OBJS_)) +UNIX_SERVER_OBJS= $(patsubst %,build/server/%,$(UNIX_SERVER_OBJS_)) -# Common objects -COMMON_OBJS = \ - build/common/crc.o \ - build/common/cvar.o \ - build/common/filesystem.o \ - build/common/md4.o \ - build/common/misc.o \ - build/common/netchan.o \ - build/common/pmove.o \ - build/common/szone.o \ - build/common/zone.o \ - build/common/command/cmd_execution.o \ - build/common/command/cmd_parser.o \ - build/common/command/cmd_script.o \ - build/common/common/com_arg.o \ - build/common/common/com_clientserver.o \ - build/common/message/msg_io.o \ - build/common/message/msg_read.o \ - build/common/model/cm_areaportals.o \ - build/common/model/cm_box.o \ - build/common/model/cm_boxtracing.o \ - build/common/model/cm_bsp.o \ - build/common/model/cm_vis.o \ - build/common/unzip/ioapi.o \ - build/common/unzip/unzip.o +OPENGL_OBJS = $(patsubst %,build/refresher/%,$(OPENGL_OBJS_)) +OPENGL_GAME_ABI_OBJS = $(patsubst %,build/refresher/%,$(OPENGL_GAME_ABI_OBJS_)) +UNIX_OPENGL_OBJS = $(patsubst %,build/refresher/%,$(UNIX_OPENGL_OBJS_)) +SDL_OPENGL_OBJS = $(patsubst %,build/refresher/%,$(SDL_OPENGL_OBJS_)) + +BASEQ2_OBJS = $(patsubst %,build/baseq2/%,$(BASEQ2_OBJS_)) + +CTF_OBJS = $(patsubst %,build/baseq2/%,$(CTF_OBJS_)) # ---------- -# Game ABI objets -GAME_ABI_OBJS = \ - build/gameabi/m_flash.o \ - build/gameabi/q_shared.o - -# ---------- - -# Server objects -SERVER_OBJS = \ - build/server/sv_cmd.o \ - build/server/sv_conless.o \ - build/server/sv_entities.o \ - build/server/sv_game.o \ - build/server/sv_init.o \ - build/server/sv_main.o \ - build/server/sv_save.o \ - build/server/sv_send.o \ - build/server/sv_user.o \ - build/server/sv_world.o - -# --------- - -# POSIX platform objects -POSIX_OBJS = \ - build/unix/glob.o \ - build/unix/hunk.o \ - build/unix/misc.o \ - build/unix/network.o \ - build/unix/system.o \ - build/unix/vid.o - -# ---------- - -# SDL Objects -SDL_OBJS= \ - build/sdl/cd.o \ - build/sdl/sound.o - -# ---------- - -# Dedicated server object -DEDICATED_SERVER_OBJS = \ - build/dedicated_server/sv_cmd.o \ - build/dedicated_server/sv_conless.o \ - build/dedicated_server/sv_entities.o \ - build/dedicated_server/sv_game.o \ - build/dedicated_server/sv_init.o \ - build/dedicated_server/sv_main.o \ - build/dedicated_server/sv_save.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/crc.o \ - build/dedicated_server_common/cvar.o \ - build/dedicated_server_common/filesystem.o \ - build/dedicated_server_common/md4.o \ - build/dedicated_server_common/misc.o \ - build/dedicated_server_common/netchan.o \ - build/dedicated_server_common/pmove.o \ - build/dedicated_server_common/szone.o \ - build/dedicated_server_common/zone.o \ - build/dedicated_server_common/command/cmd_execution.o \ - build/dedicated_server_common/command/cmd_parser.o \ - build/dedicated_server_common/command/cmd_script.o \ - build/dedicated_server_common/common/com_arg.o \ - build/dedicated_server_common/common/com_clientserver.o \ - build/dedicated_server_common/message/msg_io.o \ - build/dedicated_server_common/message/msg_read.o \ - build/dedicated_server_common/model/cm_areaportals.o \ - build/dedicated_server_common/model/cm_box.o \ - build/dedicated_server_common/model/cm_boxtracing.o \ - build/dedicated_server_common/model/cm_bsp.o \ - build/dedicated_server_common/model/cm_vis.o \ - build/dedicated_server_common/unzip/ioapi.o \ - build/dedicated_server_common/unzip/unzip.o - -# ---------- - -# Dedicated server POSIX platform objects -DEDICATED_SERVER_POSIX_OBJS = \ - build/dedicated_server_unix/glob.o \ - build/dedicated_server_unix/misc.o \ - build/dedicated_server_unix/network.o \ - build/dedicated_server_unix/hunk.o \ - build/dedicated_server_unix/system.o - -# ---------- - -# OpenGL refresher objects -OPENGL_OBJS = \ - build/ref_gl/r_draw.o \ - build/ref_gl/r_image.o \ - build/ref_gl/r_light.o \ - build/ref_gl/r_lightmap.o \ - build/ref_gl/r_main.o \ - build/ref_gl/r_mesh.o \ - build/ref_gl/r_misc.o \ - build/ref_gl/r_model.o \ - build/ref_gl/r_scrap.o \ - build/ref_gl/r_surf.o \ - build/ref_gl/r_warp.o \ - build/ref_gl/files/md2.o \ - build/ref_gl/files/pcx.o \ - build/ref_gl/files/sp2.o \ - build/ref_gl/files/tga.o \ - build/ref_gl/files/wal.o - -# ---------- - -# OpenGL Game ABI -OPENGL_GAME_OBJS = \ - build/ref_gl_game/q_shared.o - -# ---------- - -# OpenGL refresher POSIX platform object -OPENGL_POSIX_OBJS = \ - build/ref_gl_unix/input.o \ - build/ref_gl_unix/glob.o \ - build/ref_gl_unix/hunk.o \ - build/ref_gl_unix/misc.o \ - build/ref_gl_unix/refresh.o \ - build/ref_gl_unix/qgl.o - -# ---------- - -# Quake II object -BASEQ2_OBJS = \ - build/baseq2/g_ai.o \ - build/baseq2/g_chase.o \ - build/baseq2/g_cmds.o \ - build/baseq2/g_combat.o \ - build/baseq2/g_func.o \ - build/baseq2/g_items.o \ - build/baseq2/g_main.o \ - build/baseq2/g_misc.o \ - build/baseq2/g_monster.o \ - build/baseq2/g_phys.o \ - build/baseq2/g_save.o \ - build/baseq2/g_spawn.o \ - build/baseq2/g_svcmds.o \ - build/baseq2/g_target.o \ - build/baseq2/g_trigger.o \ - build/baseq2/g_turret.o \ - build/baseq2/g_utils.o \ - build/baseq2/g_weapon.o \ - build/baseq2/m_actor.o \ - build/baseq2/m_berserk.o \ - build/baseq2/m_boss2.o \ - build/baseq2/m_boss3.o \ - build/baseq2/m_boss31.o \ - build/baseq2/m_boss32.o \ - build/baseq2/m_brain.o \ - build/baseq2/m_chick.o \ - build/baseq2/m_flash.o \ - build/baseq2/m_flipper.o \ - build/baseq2/m_float.o \ - build/baseq2/m_flyer.o \ - build/baseq2/m_gladiator.o \ - build/baseq2/m_gunner.o \ - build/baseq2/m_hover.o \ - build/baseq2/m_infantry.o \ - build/baseq2/m_insane.o \ - build/baseq2/m_medic.o \ - build/baseq2/m_move.o \ - build/baseq2/m_mutant.o \ - build/baseq2/m_parasite.o \ - build/baseq2/m_soldier.o \ - build/baseq2/m_supertank.o \ - build/baseq2/m_tank.o \ - build/baseq2/p_client.o \ - build/baseq2/p_hud.o \ - build/baseq2/p_trail.o \ - build/baseq2/p_view.o \ - build/baseq2/p_weapon.o \ - build/baseq2/q_shared.o - -# ---------- - -# CTF object -CTF_OBJS = \ - build/ctf/g_ai.o \ - build/ctf/g_chase.o \ - build/ctf/g_cmds.o \ - build/ctf/g_combat.o \ - build/ctf/g_ctf.o \ - build/ctf/g_func.o \ - build/ctf/g_items.o \ - build/ctf/g_main.o \ - build/ctf/g_misc.o \ - build/ctf/g_monster.o \ - build/ctf/g_phys.o \ - build/ctf/g_save.o \ - build/ctf/g_spawn.o \ - build/ctf/g_svcmds.o \ - build/ctf/g_target.o \ - build/ctf/g_trigger.o \ - build/ctf/g_utils.o \ - build/ctf/g_weapon.o \ - build/ctf/m_move.o \ - build/ctf/p_client.o \ - build/ctf/p_hud.o \ - build/ctf/p_menu.o \ - build/ctf/p_trail.o \ - build/ctf/p_view.o \ - build/ctf/p_weapon.o \ - build/ctf/q_shared.o - -# ---------- - -# Client build -build/client/cl_cin.o : src/client/cl_cin.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/cl_console.o : src/client/cl_console.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/cl_download.o : src/client/cl_download.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/cl_effects.o : src/client/cl_effects.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/cl_entities.o : src/client/cl_entities.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/cl_input.o : src/client/cl_input.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/cl_inventory.o : src/client/cl_inventory.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/cl_keyboard.o : src/client/cl_keyboard.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/cl_lights.o : src/client/cl_lights.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/cl_main.o : src/client/cl_main.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/cl_network.o : src/client/cl_network.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/cl_parse.o : src/client/cl_parse.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/cl_particles.o : src/client/cl_particles.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/cl_prediction.o : src/client/cl_prediction.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/cl_tempentities.o : src/client/cl_tempentities.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/cl_screen.o : src/client/cl_screen.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/cl_view.o : src/client/cl_view.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/menu/menu.o : src/client/menu/menu.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/menu/qmenu.o : src/client/menu/qmenu.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/menu/videomenu.o : src/client/menu/videomenu.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/sound/snd_dma.o : src/client/sound/snd_dma.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/sound/snd_mem.o : src/client/sound/snd_mem.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/sound/snd_mix.o : src/client/sound/snd_mix.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/client/sound/snd_vorbis.o : src/client/sound/snd_vorbis.c - $(CC) $(CFLAGS_CLIENT) $(OGGCFLAGS) -o $@ -c $< - -build/client/sound/snd_wav.o : src/client/sound/snd_wav.c - $(CC) $(CFLAGS_CLIENT) $(OGGCFLAGS) -o $@ -c $< - -# --------- - -# Common build -build/common/crc.o : src/common/crc.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/common/cvar.o : src/common/cvar.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/common/filesystem.o : src/common/filesystem.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/common/md4.o : src/common/md4.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/common/misc.o : src/common/misc.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/common/netchan.o : src/common/netchan.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/common/pmove.o : src/common/pmove.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/common/szone.o : src/common/szone.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/common/zone.o : src/common/zone.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/common/command/cmd_execution.o : src/common/command/cmd_execution.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/common/command/cmd_parser.o : src/common/command/cmd_parser.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/common/command/cmd_script.o : src/common/command/cmd_script.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/common/common/com_arg.o : src/common/common/com_arg.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/common/common/com_clientserver.o : src/common/common/com_clientserver.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/common/message/msg_io.o : src/common/message/msg_io.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/common/message/msg_read.o : src/common/message/msg_read.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/common/model/cm_areaportals.o : src/common/model/cm_areaportals.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< +# Generate header dependencies +CLIENT_DEPS= $(CLIENT_OBJS:.o=.d) +CLIENT_COMMON_DEPS = $(CLIENT_COMMON_OBJS:.o=.d) +CLIENT_GAME_ABI_DEPS = $(CLIENT_GAME_ABI_OBJS:.o=.d) +CLIENT_SERVER_DEPS = $(CLIENT_SERVER_OBJS:.o=.d) +UNIX_CLIENT_DEPS = $(UNIX_CLIENT_OBJS:.o=.d) +SDL_DEPS = $(SDL_OBJS:.o=.d) -build/common/model/cm_box.o : src/common/model/cm_box.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/common/model/cm_boxtracing.o : src/common/model/cm_boxtracing.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< +SERVER_DEPS= $(SERVER_OBJS:.o=.d) +SERVER_COMMON_DEPS= $(SERVER_COMMON_OBJS:.o=.d) +SERVER_GAME_ABI_DEPS = $(SERVER_GAME_ABI_OBJS:.o=.d) +UNIX_SERVER_DEPS= $(UNIX_SERVER_OBJS:.o=.d) -build/common/model/cm_bsp.o : src/common/model/cm_bsp.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< +OPENGL_DEPS= $(OPENGL_OBJS:.o=.d) +OPENGL_GAME_ABI_DEPS= $(OPENGL_GAME_ABI_OBJS:.o=.d) +UNIX_OPENGL_DEPS= $(UNIX_OPENGL_OBJS:.o=.d) +SDL_OPENGL_DEPS= $(SDL_OPENGL_OBJS:.o=.d) -build/common/model/cm_vis.o : src/common/model/cm_vis.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/common/unzip/ioapi.o : src/common/unzip/ioapi.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< +BASEQ2_DEPS= $(BASEQ2_OBJS:.o=.d) -build/common/unzip/unzip.o : src/common/unzip/unzip.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< +CTF_DEPS= $(CTF_OBJS:.o=.d) # ---------- -# Game ABI build -build/gameabi/m_flash.o : src/game/baseq2/m_flash.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/gameabi/q_shared.o : src/game/baseq2/q_shared.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< +# Suck header dependencies in +-include $(CLIENT_DEPS) +-include $(CLIENT_COMMON_DEPS) +-include $(CLIENT_GAME_ABI_DEPS) +-include $(CLIENT_SERVER_DEPS) +-include $(UNIX_CLIENT_DEPS) +-include $(SDL_DEPS) -# --------- +-include $(SERVER_DEPS) +-include $(SERVER_COMMON_DEPS) +-include $(SERVER_GAME_ABI_DEPS) +-include $(UNIX_SERVER_DEPS) -# Server build -build/server/sv_cmd.o : src/server/sv_cmd.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< +-include $(OPENGL_DEPS) +-include $(OPENGL_GAME_ABI_DEPS) +-include $(UNIX_OPENGL_DEPS) +-include $(SDL_OPENGL_DEPS) -build/server/sv_conless.o : src/server/sv_conless.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/server/sv_entities.o : src/server/sv_entities.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< +-include $(BASEQ2_DEPS) -build/server/sv_game.o : src/server/sv_game.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/server/sv_init.o : src/server/sv_init.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/server/sv_main.o : src/server/sv_main.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/server/sv_save.o : src/server/sv_save.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/server/sv_send.o : src/server/sv_send.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/server/sv_user.o : src/server/sv_user.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/server/sv_world.o : src/server/sv_world.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< +-include $(CTF_DEPS) # ---------- -# Unix build -build/unix/glob.o : src/unix/glob.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/unix/hunk.o : src/unix/hunk.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/unix/misc.o : src/unix/misc.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/unix/network.o : src/unix/network.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/unix/system.o : src/unix/system.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/unix/vid.o : src/unix/vid.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -# ---------- - -build/sdl/cd.o : src/sdl/cd.c - $(CC) $(CFLAGS_CLIENT) $(SDLCFLAGS) -o $@ -c $< - -build/sdl/sound.o : src/sdl/sound.c - $(CC) $(CFLAGS_CLIENT) $(SDLCFLAGS) -o $@ -c $< - -# ---------- - -# Dedicated server build -build/dedicated_server/sv_cmd.o : src/server/sv_cmd.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server/sv_conless.o : src/server/sv_conless.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server/sv_entities.o : src/server/sv_entities.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server/sv_game.o : src/server/sv_game.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -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_save.o : src/server/sv_save.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 $< - -# --------- - -# Dedicated server common build -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/filesystem.o : src/common/filesystem.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/misc.o : src/common/misc.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_common/netchan.o : src/common/netchan.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_common/pmove.o : src/common/pmove.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_common/szone.o : src/common/szone.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_common/zone.o : src/common/zone.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_common/command/cmd_execution.o : src/common/command/cmd_execution.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_common/command/cmd_parser.o : src/common/command/cmd_parser.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_common/command/cmd_script.o : src/common/command/cmd_script.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_common/common/com_arg.o : src/common/common/com_arg.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_common/common/com_clientserver.o : src/common/common/com_clientserver.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_common/message/msg_io.o : src/common/message/msg_io.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_common/message/msg_read.o : src/common/message/msg_read.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_common/model/cm_areaportals.o : src/common/model/cm_areaportals.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_common/model/cm_box.o : src/common/model/cm_box.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_common/model/cm_boxtracing.o : src/common/model/cm_boxtracing.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_common/model/cm_bsp.o : src/common/model/cm_bsp.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_common/model/cm_vis.o : src/common/model/cm_vis.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_common/unzip/ioapi.o : src/common/unzip/ioapi.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< - -build/dedicated_server_common/unzip/unzip.o : src/common/unzip/unzip.c - $(CC) $(CFLAGS_CLIENT) -o $@ -c $< -# ---------- - -# Dedicated server Unix build -build/dedicated_server_unix/glob.o : src/unix/glob.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_unix/misc.o : src/unix/misc.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_unix/network.o : src/unix/network.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_unix/hunk.o : src/unix/hunk.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -build/dedicated_server_unix/system.o : src/unix/system.c - $(CC) $(CFLAGS_DEDICATED_SERVER) -o $@ -c $< - -# ---------- - -# OpenGL refresher build -build/ref_gl/r_draw.o: src/refresh/r_draw.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -build/ref_gl/r_image.o: src/refresh/r_image.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -build/ref_gl/r_light.o: src/refresh/r_light.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -build/ref_gl/r_lightmap.o: src/refresh/r_lightmap.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -build/ref_gl/r_main.o: src/refresh/r_main.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -build/ref_gl/r_mesh.o: src/refresh/r_mesh.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -build/ref_gl/r_misc.o: src/refresh/r_misc.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -build/ref_gl/r_model.o: src/refresh/r_model.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -build/ref_gl/r_scrap.o: src/refresh/r_scrap.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -build/ref_gl/r_surf.o: src/refresh/r_surf.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -build/ref_gl/r_warp.o: src/refresh/r_warp.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -build/ref_gl/files/md2.o: src/refresh/files/md2.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -build/ref_gl/files/pcx.o: src/refresh/files/pcx.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -build/ref_gl/files/sp2.o: src/refresh/files/sp2.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -build/ref_gl/files/tga.o: src/refresh/files/tga.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -build/ref_gl/files/wal.o: src/refresh/files/wal.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -# ---------- - -build/ref_gl_game/q_shared.o: src/game/baseq2/q_shared.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -# ---------- - -# OpenGL refresher Unix build -build/ref_gl_unix/glob.o: src/unix/glob.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -build/ref_gl_unix/hunk.o: src/unix/hunk.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -build/ref_gl_unix/input.o: src/sdl/input.c - $(CC) $(CFLAGS_OPENGL) $(SDLCFLAGS) -o $@ -c $< - -build/ref_gl_unix/misc.o: src/unix/misc.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -build/ref_gl_unix/qgl.o: src/unix/qgl.c - $(CC) $(CFLAGS_OPENGL) -o $@ -c $< - -build/ref_gl_unix/refresh.o: src/sdl/refresh.c - $(CC) $(CFLAGS_OPENGL) $(SDLCFLAGS) -o $@ -c $< - -# ---------- - -# Quake II build -build/baseq2/g_ai.o: src/game/baseq2/g_ai.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/g_chase.o: src/game/baseq2/g_chase.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/g_cmds.o: src/game/baseq2/g_cmds.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/g_combat.o: src/game/baseq2/g_combat.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/g_func.o: src/game/baseq2/g_func.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/g_items.o: src/game/baseq2/g_items.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/g_main.o: src/game/baseq2/g_main.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/g_misc.o: src/game/baseq2/g_misc.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/g_monster.o: src/game/baseq2/g_monster.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/g_phys.o: src/game/baseq2/g_phys.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/g_save.o: src/game/baseq2/g_save.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/g_spawn.o: src/game/baseq2/g_spawn.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/g_svcmds.o: src/game/baseq2/g_svcmds.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/g_target.o: src/game/baseq2/g_target.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/g_trigger.o: src/game/baseq2/g_trigger.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/g_turret.o: src/game/baseq2/g_turret.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/g_utils.o: src/game/baseq2/g_utils.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/g_weapon.o: src/game/baseq2/g_weapon.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_actor.o: src/game/baseq2/m_actor.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_berserk.o: src/game/baseq2/m_berserk.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_boss2.o: src/game/baseq2/m_boss2.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_boss3.o: src/game/baseq2/m_boss3.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_boss31.o: src/game/baseq2/m_boss31.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_boss32.o: src/game/baseq2/m_boss32.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_brain.o: src/game/baseq2/m_brain.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_chick.o: src/game/baseq2/m_chick.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_flash.o: src/game/baseq2/m_flash.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_flipper.o: src/game/baseq2/m_flipper.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_float.o: src/game/baseq2/m_float.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_flyer.o: src/game/baseq2/m_flyer.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_gladiator.o: src/game/baseq2/m_gladiator.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_gunner.o: src/game/baseq2/m_gunner.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_hover.o: src/game/baseq2/m_hover.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_infantry.o: src/game/baseq2/m_infantry.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_insane.o: src/game/baseq2/m_insane.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_medic.o: src/game/baseq2/m_medic.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_move.o: src/game/baseq2/m_move.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_mutant.o: src/game/baseq2/m_mutant.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_parasite.o: src/game/baseq2/m_parasite.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_soldier.o: src/game/baseq2/m_soldier.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_supertank.o: src/game/baseq2/m_supertank.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/m_tank.o: src/game/baseq2/m_tank.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/p_client.o: src/game/baseq2/p_client.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/p_hud.o: src/game/baseq2/p_hud.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/p_trail.o: src/game/baseq2/p_trail.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/p_view.o: src/game/baseq2/p_view.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/p_weapon.o: src/game/baseq2/p_weapon.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/baseq2/q_shared.o: src/game/baseq2/q_shared.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -# ---------- - -build/ctf/g_ai.o: src/game/ctf/g_ai.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/g_chase.o: src/game/ctf/g_chase.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/g_cmds.o: src/game/ctf/g_cmds.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/g_combat.o: src/game/ctf/g_combat.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/g_ctf.o: src/game/ctf/g_ctf.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/g_func.o: src/game/ctf/g_func.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/g_items.o: src/game/ctf/g_items.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/g_main.o: src/game/ctf/g_main.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/g_misc.o: src/game/ctf/g_misc.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/g_monster.o: src/game/ctf/g_monster.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/g_phys.o: src/game/ctf/g_phys.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/g_save.o: src/game/ctf/g_save.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/g_spawn.o: src/game/ctf/g_spawn.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/g_svcmds.o: src/game/ctf/g_svcmds.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/g_target.o: src/game/ctf/g_target.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/g_trigger.o: src/game/ctf/g_trigger.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/g_utils.o: src/game/ctf/g_utils.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/g_weapon.o: src/game/ctf/g_weapon.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/m_move.o: src/game/ctf/m_move.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/p_client.o: src/game/ctf/p_client.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/p_hud.o: src/game/ctf/p_hud.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/p_menu.o: src/game/ctf/p_menu.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/p_trail.o: src/game/ctf/p_trail.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/p_view.o: src/game/ctf/p_view.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/p_weapon.o: src/game/ctf/p_weapon.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -build/ctf/q_shared.o: src/game/ctf/q_shared.c - $(CC) $(CFLAGS_GAME) -o $@ -c $< - -# ---------- - -# The client -release/quake2 : $(CLIENT_OBJS) $(COMMON_OBJS) $(GAME_ABI_OBJS) \ - $(SERVER_OBJS) $(POSIX_OBJS) $(SDL_OBJS) - $(CC) $(CFLAGS_CLIENT) -o $@ $(CLIENT_OBJS) $(COMMON_OBJS) $(GAME_ABI_OBJS) \ - $(SERVER_OBJS) $(POSIX_OBJS) $(SDL_OBJS) $(LDFLAGS) \ - $(SDLLDFLAGS) $(OGGLDFLAGS) $(ZLIBLDFLAGS) $(X11LDFLAGS) - -# Dedicated Server -release/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) $(ZLIBLDFLAGS) - -# OpenGL refresher -release/ref_gl.so : $(OPENGL_OBJS) $(OPENGL_POSIX_OBJS) $(OPENGL_GAME_OBJS) - $(CC) $(CFLAGS_OPENGL) -o $@ $(OPENGL_OBJS) $(OPENGL_POSIX_OBJS) \ - $(OPENGL_GAME_OBJS) $(LDFLAGS) $(SDLLDFLAGS) $(OPENGLLDFLAGS) - -# Quake II +# release/quake2 +release/quake2 : $(CLIENT_OBJS) $(CLIENT_COMMON_OBJS) $(CLIENT_GAME_ABI_OBJS) \ + $(UNIX_CLIENT_OBJS) $(SDL_OBJS) $(CLIENT_SERVER_OBJS) + @echo '===> LD $@' + @$(CC) $(LDFLAGS) -o $@ $(CLIENT_OBJS) $(CLIENT_COMMON_OBJS) \ + $(CLIENT_GAME_ABI_OBJS) $(UNIX_CLIENT_OBJS) \ + $(SDL_OBJS) $(CLIENT_SERVER_OBJS) + +# release/q2ded +release/q2ded : $(SERVER_OBJS) $(SERVER_COMMON_OBJS) $(SERVER_GAME_ABI_OBJS) \ + $(UNIX_SERVER_OBJS) + @echo '===> LD $@' + @$(CC) $(LDFLAGS) -o $@ $(SERVER_OBJS) $(SERVER_COMMON_OBJS) \ + $(SERVER_GAME_ABI_OBJS) $(UNIX_SERVER_OBJS) + +# release/ref_gl.so +release/ref_gl.so : $(OPENGL_OBJS) $(OPENGL_GAME_ABI_OBJS) \ + $(UNIX_OPENGL_OBJS) $(SDL_OPENGL_OBJS) + @echo '===> LD $@' + @$(CC) $(LDFLAGS) -o $@ $(OPENGL_OBJS) $(OPENGL_GAME_ABI_OBJS) \ + $(UNIX_OPENGL_OBJS) $(SDL_OPENGL_OBJS) + +# release/bsaeq2/game.so release/baseq2/game.so : $(BASEQ2_OBJS) - $(CC) $(CFLAGS_GAME) -o $@ $(BASEQ2_OBJS) $(LDFLAGS) $(GAMELDFLAGS) + @echo '===> LD $@' + @$(CC) $(LDFLAGS) -o $@ $(BASEQ2_OBJS) -# Quake II - Three Wave Capture The Flag +# release/ctf/game.so release/ctf/game.so : $(CTF_OBJS) - $(CC) $(CFLAGS_GAME) -o $@ $(CTF_OBJS) $(LDFLAGS) $(GAMELDFLAGS) - + @echo '===> LD $@' + @$(CC) $(LDFLAGS) -o $@ $(CTF_OBJS) + +# ----------