2000-05-10 12:09:20 +00:00
|
|
|
# *Defines*
|
|
|
|
|
2000-05-13 20:51:02 +00:00
|
|
|
SV_name=qf-server
|
2000-05-11 13:15:59 +00:00
|
|
|
SV_libs=
|
|
|
|
|
2000-05-13 20:51:02 +00:00
|
|
|
CL_SVGA_name=qf-client-svga
|
2000-05-11 13:30:04 +00:00
|
|
|
CL_SVGA_libs=-lvga
|
2000-05-11 13:15:59 +00:00
|
|
|
|
2000-05-13 20:51:02 +00:00
|
|
|
CL_X11_name=qf-client-x11
|
2000-05-11 13:51:14 +00:00
|
|
|
CL_X11_libs=-lX11 -lXext
|
2000-05-10 12:09:20 +00:00
|
|
|
|
2000-05-13 20:51:02 +00:00
|
|
|
CL_GLX_name=qf-client-glx
|
2000-05-12 23:19:23 +00:00
|
|
|
CL_GLX_libs=-lX11 -lXext -lGL
|
2000-05-12 08:13:08 +00:00
|
|
|
|
2000-05-10 12:09:20 +00:00
|
|
|
DIRECTORIES=
|
|
|
|
vpath %.a $(patsubst @%,%,$(DIRECTORIES)) /usr/lib
|
|
|
|
|
2000-05-13 02:52:36 +00:00
|
|
|
CPPFLAGS=-I . -I ../include -I /usr/X11R6/include -DELF -Did386=1 -MMD -Dstricmp=strcasecmp
|
2000-05-12 23:19:23 +00:00
|
|
|
|
2000-05-10 20:33:16 +00:00
|
|
|
CFLAGS=-Wall -Werror
|
|
|
|
CXXFLAGS=-Wall -Werror
|
2000-05-11 13:51:14 +00:00
|
|
|
LDFLAGS=-L/usr/X11R6/lib
|
2000-05-10 12:09:20 +00:00
|
|
|
|
|
|
|
CC=gcc
|
|
|
|
CXX=g++
|
|
|
|
|
|
|
|
CFLAGS+=-g -O2
|
|
|
|
CXXFLAGS+=-g -O2
|
|
|
|
|
|
|
|
|
|
|
|
%.d:
|
|
|
|
|
|
|
|
# *List Macros*
|
|
|
|
|
2000-05-11 13:45:45 +00:00
|
|
|
COM_sources=\
|
|
|
|
net_chan.c \
|
|
|
|
net_com.c \
|
|
|
|
net_udp.c \
|
|
|
|
pmove.c \
|
|
|
|
pmovetst.c \
|
|
|
|
zone.c \
|
|
|
|
mdfour.c \
|
|
|
|
mathlib.c \
|
|
|
|
math.S \
|
|
|
|
cvar.c \
|
|
|
|
crc.c \
|
|
|
|
common.c \
|
2000-05-14 02:32:27 +00:00
|
|
|
model.c \
|
2000-05-13 20:25:02 +00:00
|
|
|
cmd.c
|
2000-05-11 13:45:45 +00:00
|
|
|
|
|
|
|
COM_dependencies = $(patsubst %,%.d,$(basename $(COM_sources)))
|
|
|
|
COM_objects = $(patsubst %.d,%.o,$(COM_dependencies))
|
|
|
|
|
2000-05-11 13:15:59 +00:00
|
|
|
SV_sources=\
|
2000-05-10 12:09:20 +00:00
|
|
|
pr_cmds.c \
|
|
|
|
pr_edict.c \
|
|
|
|
pr_exec.c \
|
|
|
|
sv_init.c \
|
|
|
|
sv_main.c \
|
2000-05-11 12:00:26 +00:00
|
|
|
sv_misc.c \
|
2000-05-12 00:09:16 +00:00
|
|
|
sv_model.c \
|
2000-05-10 12:09:20 +00:00
|
|
|
sv_nchan.c \
|
|
|
|
sv_ents.c \
|
|
|
|
sv_send.c \
|
|
|
|
sv_move.c \
|
|
|
|
sv_phys.c \
|
|
|
|
sv_user.c \
|
|
|
|
sv_ccmds.c \
|
|
|
|
world.c \
|
2000-05-10 12:31:54 +00:00
|
|
|
worlda.S \
|
2000-05-10 12:09:20 +00:00
|
|
|
sys_unix.c \
|
2000-05-11 13:45:45 +00:00
|
|
|
sv_cvar.c
|
2000-05-11 13:15:59 +00:00
|
|
|
|
|
|
|
SV_dependencies = $(patsubst %,%.d,$(basename $(SV_sources)))
|
|
|
|
SV_objects = $(patsubst %.d,%.o,$(SV_dependencies))
|
|
|
|
|
2000-05-12 08:13:08 +00:00
|
|
|
CL_SW_sources=\
|
2000-05-13 05:20:33 +00:00
|
|
|
cl_model.c \
|
2000-05-14 23:04:47 +00:00
|
|
|
cl_trans.c \
|
2000-05-11 13:15:59 +00:00
|
|
|
d_edge.c \
|
|
|
|
d_fill.c \
|
|
|
|
d_init.c \
|
|
|
|
d_modech.c \
|
|
|
|
d_part.c \
|
|
|
|
d_polyse.c \
|
|
|
|
d_scan.c \
|
|
|
|
d_sky.c \
|
|
|
|
d_sprite.c \
|
|
|
|
d_surf.c \
|
|
|
|
d_vars.c \
|
|
|
|
d_zpoint.c \
|
|
|
|
draw.c \
|
|
|
|
r_aclip.c \
|
|
|
|
r_alias.c \
|
|
|
|
r_bsp.c \
|
|
|
|
r_draw.c \
|
|
|
|
r_edge.c \
|
|
|
|
r_efrag.c \
|
|
|
|
r_light.c \
|
|
|
|
r_main.c \
|
|
|
|
r_misc.c \
|
2000-05-12 23:19:23 +00:00
|
|
|
r_part.c \
|
2000-05-11 13:15:59 +00:00
|
|
|
r_sky.c \
|
|
|
|
r_sprite.c \
|
|
|
|
r_surf.c \
|
|
|
|
r_vars.c \
|
2000-05-14 07:19:15 +00:00
|
|
|
sw_view.c \
|
2000-05-11 13:15:59 +00:00
|
|
|
screen.c \
|
2000-05-11 13:30:04 +00:00
|
|
|
d_copy.S \
|
|
|
|
d_draw.S \
|
|
|
|
d_draw16.S \
|
|
|
|
d_parta.S \
|
|
|
|
d_polysa.S \
|
|
|
|
d_scana.S \
|
|
|
|
d_spr8.S \
|
|
|
|
d_varsa.S \
|
|
|
|
r_aclipa.S \
|
|
|
|
r_aliasa.S \
|
|
|
|
r_drawa.S \
|
|
|
|
r_edgea.S \
|
|
|
|
r_varsa.S \
|
|
|
|
surf16.S \
|
2000-05-13 05:24:54 +00:00
|
|
|
surf8.S
|
2000-05-11 13:15:59 +00:00
|
|
|
|
2000-05-12 08:13:08 +00:00
|
|
|
CL_SW_dependencies = $(patsubst %,%.d,$(basename $(CL_SW_sources)))
|
|
|
|
CL_SW_objects = $(patsubst %.d,%.o,$(CL_SW_dependencies))
|
|
|
|
|
|
|
|
CL_sources=\
|
|
|
|
cl_cmd.c \
|
|
|
|
cl_cvar.c \
|
|
|
|
cl_demo.c \
|
|
|
|
cl_ents.c \
|
|
|
|
cl_input.c \
|
|
|
|
cl_main.c \
|
|
|
|
cl_math.S \
|
|
|
|
cl_misc.c \
|
2000-05-14 23:04:47 +00:00
|
|
|
cl_parse.c \
|
2000-05-12 08:13:08 +00:00
|
|
|
cl_pred.c \
|
|
|
|
cl_tent.c \
|
|
|
|
cl_cam.c \
|
|
|
|
snd_linux.c \
|
|
|
|
sys_linux.c \
|
|
|
|
cd_linux.c \
|
2000-05-14 07:19:15 +00:00
|
|
|
r_view.c \
|
2000-05-12 08:13:08 +00:00
|
|
|
wad.c \
|
|
|
|
snd_dma.c \
|
|
|
|
snd_mem.c \
|
|
|
|
snd_mix.c \
|
2000-05-13 05:24:54 +00:00
|
|
|
snd_mixa.S \
|
2000-05-12 08:13:08 +00:00
|
|
|
skin.c \
|
|
|
|
sbar.c \
|
|
|
|
nonintel.c \
|
|
|
|
menu.c \
|
|
|
|
keys.c \
|
2000-05-13 05:24:54 +00:00
|
|
|
console.c \
|
2000-05-14 16:56:28 +00:00
|
|
|
sys_x86.S
|
2000-05-12 08:13:08 +00:00
|
|
|
|
2000-05-11 13:15:59 +00:00
|
|
|
CL_dependencies = $(patsubst %,%.d,$(basename $(CL_sources)))
|
|
|
|
CL_objects = $(patsubst %.d,%.o,$(CL_dependencies))
|
2000-05-10 12:09:20 +00:00
|
|
|
|
2000-05-11 13:15:59 +00:00
|
|
|
CL_SVGA_sources=\
|
|
|
|
vid_svgalib.c
|
2000-05-10 12:09:20 +00:00
|
|
|
|
2000-05-11 13:15:59 +00:00
|
|
|
CL_SVGA_dependencies = $(patsubst %,%.d,$(basename $(CL_SVGA_sources)))
|
|
|
|
CL_SVGA_objects = $(patsubst %.d,%.o,$(CL_SVGA_dependencies))
|
|
|
|
|
|
|
|
CL_X11_sources=\
|
2000-05-11 14:13:35 +00:00
|
|
|
vid_x11.c
|
2000-05-11 13:15:59 +00:00
|
|
|
|
|
|
|
CL_X11_dependencies = $(patsubst %,%.d,$(basename $(CL_X11_sources)))
|
|
|
|
CL_X11_objects = $(patsubst %.d,%.o,$(CL_X11_dependencies))
|
2000-05-10 12:09:20 +00:00
|
|
|
|
2000-05-12 08:13:08 +00:00
|
|
|
CL_GLX_sources=\
|
|
|
|
gl_draw.c \
|
|
|
|
gl_mesh.c \
|
|
|
|
gl_model.c \
|
|
|
|
gl_ngraph.c \
|
2000-05-12 23:19:23 +00:00
|
|
|
gl_part.c \
|
2000-05-12 08:13:08 +00:00
|
|
|
gl_refrag.c \
|
|
|
|
gl_rlight.c \
|
|
|
|
gl_rmain.c \
|
|
|
|
gl_rmisc.c \
|
|
|
|
gl_rsurf.c \
|
|
|
|
gl_screen.c \
|
2000-05-14 23:04:47 +00:00
|
|
|
gl_trans.c \
|
2000-05-12 23:19:23 +00:00
|
|
|
gl_view.c \
|
2000-05-12 08:13:08 +00:00
|
|
|
gl_warp.c \
|
2000-05-14 02:32:27 +00:00
|
|
|
vid_glx.c
|
2000-05-12 08:13:08 +00:00
|
|
|
|
|
|
|
CL_GLX_dependencies = $(patsubst %,%.d,$(basename $(CL_GLX_sources)))
|
|
|
|
CL_GLX_objects = $(patsubst %.d,%.o,$(CL_GLX_dependencies))
|
2000-05-10 12:09:20 +00:00
|
|
|
|
|
|
|
# *Explicit Rules*
|
|
|
|
|
2000-05-12 08:13:08 +00:00
|
|
|
all: $(SV_name) $(CL_SVGA_name) $(CL_X11_name) $(CL_GLX_name)
|
2000-05-11 13:15:59 +00:00
|
|
|
|
2000-05-11 13:51:14 +00:00
|
|
|
$(SV_name): $(COM_objects) $(SV_objects)
|
2000-05-11 14:25:50 +00:00
|
|
|
$(CC) $(LDFLAGS) -o $@ $^ -lm $(SV_libs)
|
2000-05-11 13:15:59 +00:00
|
|
|
|
2000-05-12 08:13:08 +00:00
|
|
|
$(CL_SVGA_name): $(COM_objects) $(CL_objects) $(CL_SW_objects) $(CL_SVGA_objects)
|
2000-05-11 14:25:50 +00:00
|
|
|
$(CC) $(LDFLAGS) -o $@ $^ -lm $(CL_SVGA_libs)
|
2000-05-11 13:15:59 +00:00
|
|
|
|
2000-05-12 08:13:08 +00:00
|
|
|
$(CL_X11_name): $(COM_objects) $(CL_objects) $(CL_SW_objects) $(CL_X11_objects)
|
2000-05-11 14:25:50 +00:00
|
|
|
$(CC) $(LDFLAGS) -o $@ $^ -lm $(CL_X11_libs)
|
2000-05-10 12:09:20 +00:00
|
|
|
|
2000-05-12 08:13:08 +00:00
|
|
|
$(CL_GLX_name): $(COM_objects) $(CL_objects) $(CL_GL_objects) $(CL_GLX_objects)
|
|
|
|
$(CC) $(LDFLAGS) -o $@ $^ -lm $(CL_GLX_libs)
|
|
|
|
|
2000-05-10 12:09:20 +00:00
|
|
|
clean:
|
2000-05-13 02:56:00 +00:00
|
|
|
-rm -f *.[od] $(SV_name) $(CL_SVGA_name) $(CL_X11_name) $(CL_GLX_name)
|
2000-05-10 12:09:20 +00:00
|
|
|
|
|
|
|
# *Individual File Dependencies*
|
|
|
|
|
2000-05-11 13:45:45 +00:00
|
|
|
-include $(COM_dependencies)
|
2000-05-11 13:15:59 +00:00
|
|
|
-include $(SV_dependencies)
|
|
|
|
-include $(CL_dependencies)
|
2000-05-13 02:56:00 +00:00
|
|
|
-include $(CL_SW_dependencies)
|
2000-05-11 13:15:59 +00:00
|
|
|
-include $(CL_SVGA_dependencies)
|
|
|
|
-include $(CL_X11_dependencies)
|
2000-05-12 08:13:08 +00:00
|
|
|
-include $(CL_GLX_dependencies)
|