1999-12-29 13:58:47 +00:00
|
|
|
########################################################################
|
|
|
|
#
|
|
|
|
# Quake general stuff
|
|
|
|
#
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-01-04 21:29:10 +00:00
|
|
|
PROJECT_DIR = @top_srcdir@
|
|
|
|
PROJECT_ODIR = ..
|
|
|
|
SRC_DIR = @srcdir@
|
|
|
|
COMMON_DIR = $(PROJECT_DIR)/common
|
|
|
|
COMMON_ODIR = $(PROJECT_ODIR)/common
|
2000-01-29 18:46:26 +00:00
|
|
|
BIN_PREFIX = uquake
|
1999-12-31 02:10:33 +00:00
|
|
|
|
2000-01-04 21:29:10 +00:00
|
|
|
DESTDIR =
|
2000-01-03 08:03:01 +00:00
|
|
|
|
2000-01-04 21:29:10 +00:00
|
|
|
prefix = @prefix@
|
2000-01-08 21:35:03 +00:00
|
|
|
exec_prefix = @exec_prefix@
|
2000-01-04 21:29:10 +00:00
|
|
|
bindir = @bindir@
|
2000-02-14 00:35:13 +00:00
|
|
|
libdir = @libdir@
|
2000-01-04 21:29:10 +00:00
|
|
|
mandir = @mandir@
|
2000-01-03 08:03:01 +00:00
|
|
|
|
2000-01-29 18:46:26 +00:00
|
|
|
TARGET_DIR = $(PROJECT_ODIR)/targets
|
|
|
|
BUILD_DIR = $(TARGET_DIR)/uquake
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-02-12 23:54:54 +00:00
|
|
|
LDFLAGS = @LDFLAGS@ @SOUND_LIBS@ @NET_LIBS@ -lm -rdynamic
|
1999-12-30 13:40:47 +00:00
|
|
|
LIBS = @LIBS@
|
|
|
|
CC = @CC@
|
|
|
|
INTEL_ARCH = @INTEL_ARCH@
|
2000-02-03 02:34:26 +00:00
|
|
|
NO_ASMOPT = @NO_ASMOPT@
|
1999-12-30 13:40:47 +00:00
|
|
|
|
|
|
|
ifneq ($(SRC_DIR),.)
|
|
|
|
SRC_DIR_INC = -I$(SRC_DIR)
|
|
|
|
endif
|
|
|
|
|
2000-01-09 07:15:41 +00:00
|
|
|
HAS_DGA = @HAS_DGA@
|
2000-01-07 01:20:15 +00:00
|
|
|
HAS_VGA = @HAS_VGA@
|
2000-01-04 23:38:36 +00:00
|
|
|
HAS_MGL = @HAS_MGL@
|
2000-01-02 08:50:13 +00:00
|
|
|
HAS_GGI = @HAS_GGI@
|
1999-12-31 23:03:00 +00:00
|
|
|
HAS_SVGA = @HAS_SVGA@
|
1999-12-30 13:40:47 +00:00
|
|
|
HAS_GLIDE = @HAS_GLIDE@
|
|
|
|
HAS_TDFXGL = @HAS_TDFXGL@
|
|
|
|
HAS_OGL = @HAS_OGL@
|
|
|
|
HAS_XIL = @HAS_XIL@
|
|
|
|
HAS_X11 = @HAS_X11@
|
2000-01-03 06:18:32 +00:00
|
|
|
HAS_SDL = @HAS_SDL@
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-01-07 01:20:15 +00:00
|
|
|
HAVE_WSOCK = @HAVE_WSOCK@
|
|
|
|
HAVE_UDP = @HAVE_UDP@
|
|
|
|
|
1999-12-30 13:40:47 +00:00
|
|
|
MAKE_SURE_DIR = if test -d "$(BUILD_DIR)/$$DIR"; \
|
|
|
|
then \
|
|
|
|
true; \
|
|
|
|
else \
|
|
|
|
echo "Creating directory $(BUILD_DIR)/$$DIR"; \
|
|
|
|
mkdir -p $(BUILD_DIR)/$$DIR; \
|
|
|
|
fi
|
|
|
|
|
1999-12-29 13:58:47 +00:00
|
|
|
|
|
|
|
########################################################################
|
|
|
|
#
|
|
|
|
# Client targets
|
|
|
|
#
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-01-22 12:54:51 +00:00
|
|
|
COMMON_LIB=common_lib.a
|
|
|
|
|
1999-12-30 16:08:34 +00:00
|
|
|
ifeq ($(HAS_OGL),yes)
|
2000-02-13 09:06:11 +00:00
|
|
|
GLQUAKE =$(BIN_PREFIX)-glx
|
1999-12-30 13:40:47 +00:00
|
|
|
endif
|
|
|
|
|
1999-12-30 16:08:34 +00:00
|
|
|
ifeq ($(HAS_TDFXGL),yes)
|
1999-12-30 13:40:47 +00:00
|
|
|
TDFXQUAKE= $(BIN_PREFIX)-3dfx
|
|
|
|
endif
|
|
|
|
|
1999-12-30 16:08:34 +00:00
|
|
|
ifeq ($(HAS_X11),yes)
|
1999-12-30 13:40:47 +00:00
|
|
|
X11QUAKE = $(BIN_PREFIX)-x11
|
|
|
|
endif
|
|
|
|
|
1999-12-31 23:03:00 +00:00
|
|
|
ifeq ($(HAS_SVGA),yes)
|
1999-12-30 13:40:47 +00:00
|
|
|
SVGAQUAKE = $(BIN_PREFIX)-svga
|
|
|
|
endif
|
|
|
|
|
2000-01-07 01:20:15 +00:00
|
|
|
ifeq ($(HAS_VGA),yes)
|
|
|
|
VGAQUAKE = $(BIN_PREFIX)-vga
|
|
|
|
endif
|
|
|
|
|
2000-01-04 23:38:36 +00:00
|
|
|
ifeq ($(HAS_MGL),yes)
|
|
|
|
MGLQUAKE = $(BIN_PREFIX)-mgl
|
|
|
|
endif
|
|
|
|
|
2000-01-02 08:50:13 +00:00
|
|
|
ifeq ($(HAS_GGI),yes)
|
|
|
|
GGIQUAKE = $(BIN_PREFIX)-ggi
|
|
|
|
endif
|
|
|
|
|
2000-01-03 06:18:32 +00:00
|
|
|
ifeq ($(HAS_SDL),yes)
|
|
|
|
SDLQUAKE = $(BIN_PREFIX)-sdl
|
|
|
|
endif
|
|
|
|
|
1999-12-30 13:40:47 +00:00
|
|
|
RELEASE = @RELEASE@
|
|
|
|
ifeq ($(RELEASE),yes)
|
|
|
|
OPTFLAGS = @RELEASE_CFLAGS@
|
|
|
|
else
|
|
|
|
OPTFLAGS = -g
|
|
|
|
endif
|
|
|
|
|
2000-01-07 01:20:15 +00:00
|
|
|
soft_targets = $(X11QUAKE) $(SVGAQUAKE) $(GGIQUAKE) $(SDLQUAKE) $(MGLQUAKE) \
|
|
|
|
$(VGAQUAKE)
|
2000-01-06 03:13:04 +00:00
|
|
|
gl_targets = $(GLQUAKE) $(TDFXQUAKE)
|
2000-01-22 12:54:51 +00:00
|
|
|
lib_targets = $(COMMON_LIB)
|
|
|
|
targets = $(lib_targets) $(gl_targets) $(soft_targets)
|
1999-12-30 13:40:47 +00:00
|
|
|
CLEAN_TARGETS = $(patsubst %,clean-%, $(targets))
|
2000-01-05 19:10:52 +00:00
|
|
|
.PHONY: $(targets) $(CLEAN_TARGETS) clean-soft clean-gl
|
1999-12-30 13:40:47 +00:00
|
|
|
|
|
|
|
all: $(targets)
|
1999-12-29 13:58:47 +00:00
|
|
|
|
|
|
|
########################################################################
|
|
|
|
#
|
|
|
|
# Source files
|
|
|
|
#
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-02-03 02:34:26 +00:00
|
|
|
ifneq ($(NO_ASMOPT),yes)
|
2000-01-05 19:10:52 +00:00
|
|
|
|
1999-12-30 13:40:47 +00:00
|
|
|
# Source file the Intel archictecture only
|
2000-01-05 19:10:52 +00:00
|
|
|
|
2000-02-03 02:34:26 +00:00
|
|
|
CFLAGS = -Did386=1
|
1999-12-30 13:40:47 +00:00
|
|
|
UQ_GENERAL_SRC = worlda.s
|
|
|
|
UQ_SWREND_SRC_PLAT = dosasm.s
|
|
|
|
CL_ADDITIONAL_GENERAL_SRC = sys_dosa.s math.s
|
2000-01-04 23:38:36 +00:00
|
|
|
SWREND_SRC_PLAT = d_draw.s d_draw16.s d_parta.s d_polysa.s d_scana.s \
|
1999-12-30 13:40:47 +00:00
|
|
|
d_spr8.s d_varsa.s r_aclipa.s r_aliasa.s \
|
|
|
|
r_drawa.s r_edgea.s r_varsa.s surf16.s surf8.s
|
|
|
|
else
|
2000-01-05 19:10:52 +00:00
|
|
|
|
1999-12-30 13:40:47 +00:00
|
|
|
# Source files for non-Intel platforms
|
2000-01-05 19:10:52 +00:00
|
|
|
|
2000-02-03 02:34:26 +00:00
|
|
|
CFLAGS = -Did386=0
|
1999-12-30 13:40:47 +00:00
|
|
|
SWREND_SRC_PLAT = nonintel.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
# System specific source files
|
|
|
|
|
1999-12-31 02:10:33 +00:00
|
|
|
CD_AUDIO_SRC = cd_wrapper.c
|
|
|
|
|
2000-01-06 16:56:38 +00:00
|
|
|
SYS_SRC = sys_common.c @SYS_SRC@
|
1999-12-30 13:40:47 +00:00
|
|
|
|
|
|
|
# Networking source files
|
2000-01-05 19:10:52 +00:00
|
|
|
|
2000-01-07 01:20:15 +00:00
|
|
|
ifeq ($(HAVE_WSOCK),yes)
|
|
|
|
NET_SRC = net_win.c net_wins.c net_wipx.c
|
|
|
|
else
|
|
|
|
ifeq ($(HAVE_UDP),yes)
|
|
|
|
NET_SRC = net_bsd.c net_udp.c
|
|
|
|
else
|
|
|
|
NET_SRC = net_dos.c net_bw.c net_ipx.c net_mp.c net_ser.c
|
|
|
|
endif
|
|
|
|
endif
|
1999-12-30 13:40:47 +00:00
|
|
|
UQ_NET_SRC = net_dgrm.c net_loop.c net_main.c net_vcr.c $(NET_SRC)
|
|
|
|
|
|
|
|
# Common source files
|
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
MISC_SRC = common.c crc.c cvar.c cmd.c mathlib.c register_check.c \
|
2000-02-08 05:06:58 +00:00
|
|
|
wad.c zone.c cvars.c lib_replace.c qendian.c quakefs.c \
|
2000-02-12 10:02:22 +00:00
|
|
|
quakeio.c qargs.c plugin.c
|
2000-01-05 19:10:52 +00:00
|
|
|
|
|
|
|
# GL renderer source
|
1999-12-30 13:40:47 +00:00
|
|
|
|
|
|
|
GL_REND_SRC = gl_screen.c gl_model.c gl_draw.c gl_mesh.c gl_refrag.c \
|
2000-01-22 12:54:51 +00:00
|
|
|
gl_rlight.c gl_rmain.c gl_rmisc.c gl_rsurf.c gl_test.c gl_warp.c \
|
|
|
|
gl_cl_parse.c gl_rpart.c gl_view.c
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
# Software renderer source
|
|
|
|
|
1999-12-30 13:40:47 +00:00
|
|
|
SW_REND_SRC = screen.c $(SWREND_SRC_PLAT) draw.c \
|
|
|
|
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 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-01-22 12:54:51 +00:00
|
|
|
r_sky.c r_sprite.c r_surf.c r_vars.c sw_cl_parse.c sw_rpart.c sw_view.c
|
1999-12-30 13:40:47 +00:00
|
|
|
|
|
|
|
# Client source files
|
2000-01-05 19:10:52 +00:00
|
|
|
|
2000-02-10 14:02:36 +00:00
|
|
|
CL_SRC = cl_demo.c cl_input.c cl_main.c cl_parse.c cl_tent.c cl_ents.c \
|
2000-02-12 11:25:12 +00:00
|
|
|
cl_cam.c cl_pred.c
|
1999-12-30 13:40:47 +00:00
|
|
|
CL_GUI_SRC= console.c sbar.c view.c keys.c menu.c
|
|
|
|
|
|
|
|
# Server source files
|
2000-01-05 19:10:52 +00:00
|
|
|
|
1999-12-30 13:40:47 +00:00
|
|
|
SRV_SRC = sv_main.c sv_user.c sv_move.c sv_phys.c
|
|
|
|
UQ_SRV_SRC = host.c host_cmd.c $(SRV_SRC)
|
2000-02-12 11:25:12 +00:00
|
|
|
SRV_PR_SRC = pr_cmds.c pr_edict.c pr_exec.c pmove.c pmovetst.c
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
# Source common to QW/UQuake
|
1999-12-30 13:40:47 +00:00
|
|
|
CL_COMMON_SRC = $(MISC_SRC) $(CL_GUI_SRC) $(CL_SRC) \
|
2000-01-29 18:46:26 +00:00
|
|
|
$(CL_ADDITIONAL_GENERAL_SRC) r_part.c
|
1999-12-30 13:40:47 +00:00
|
|
|
|
1999-12-29 13:58:47 +00:00
|
|
|
|
|
|
|
########################################################################
|
|
|
|
#
|
|
|
|
# Directory specific stuff
|
|
|
|
#
|
1999-12-30 11:58:44 +00:00
|
|
|
DEFS = @DEFS@
|
2000-02-14 00:35:13 +00:00
|
|
|
CFLAGS += @CFLAGS@ -DUQUAKE -DLIBDIR=\"$(libdir)\" $(OPTFLAGS) \
|
|
|
|
$(DEFS) -I. $(SRC_DIR_INC) -I$(COMMON_ODIR) -I$(COMMON_DIR)
|
1999-12-29 13:58:47 +00:00
|
|
|
|
|
|
|
GENERAL_SRC = $(CL_COMMON_SRC) \
|
2000-02-10 23:38:19 +00:00
|
|
|
$(SYS_SRC) world.c $(SRV_PR_SRC) \
|
1999-12-29 13:58:47 +00:00
|
|
|
$(UQ_NET_SRC) $(UQ_SRV_SRC) \
|
|
|
|
$(UQ_GENERAL_SRC) $(UQ_SWREND_SRC_PLAT)
|
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
# FIXME: add dos/win specific source
|
1999-12-29 13:58:47 +00:00
|
|
|
|
|
|
|
###########################################################################
|
|
|
|
#
|
|
|
|
# Compilation rules
|
|
|
|
#
|
|
|
|
|
2000-01-22 12:54:51 +00:00
|
|
|
# Common lib targets.
|
|
|
|
|
|
|
|
$(BUILD_DIR)/common_lib/%.@OBJEXT@: $(SRC_DIR)/%.c
|
|
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
|
|
|
|
$(BUILD_DIR)/common_lib/%.@OBJEXT@: $(SRC_DIR)/%.s
|
|
|
|
$(CC) $(CFLAGS) -x assembler-with-cpp -o $@ -c $<
|
|
|
|
|
|
|
|
$(BUILD_DIR)/common_lib/%.@OBJEXT@: $(COMMON_DIR)/%.c
|
|
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
|
|
|
|
$(BUILD_DIR)/common_lib/%.@OBJEXT@: $(COMMON_DIR)/%.s
|
|
|
|
$(CC) $(CFLAGS) -x assembler-with-cpp -o $@ -c $<
|
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
# Software targets
|
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/%.@OBJEXT@: $(SRC_DIR)/%.c
|
2000-01-05 19:10:52 +00:00
|
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/%.@OBJEXT@: $(SRC_DIR)/%.s
|
2000-01-06 01:06:17 +00:00
|
|
|
$(CC) $(CFLAGS) -x assembler-with-cpp -o $@ -c $<
|
2000-01-05 19:10:52 +00:00
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/%.@OBJEXT@: $(COMMON_DIR)/%.c
|
2000-01-05 19:10:52 +00:00
|
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/%.@OBJEXT@: $(COMMON_DIR)/%.s
|
2000-01-06 01:06:17 +00:00
|
|
|
$(CC) $(CFLAGS) -x assembler-with-cpp -o $@ -c $<
|
2000-01-05 19:10:52 +00:00
|
|
|
|
|
|
|
# GL targets
|
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/%.@OBJEXT@: $(SRC_DIR)/%.c
|
2000-01-05 19:10:52 +00:00
|
|
|
$(CC) $(CFLAGS) $(GL_CFLAGS) -o $@ -c $<
|
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/%.@OBJEXT@: $(SRC_DIR)/%.s
|
2000-01-06 01:06:17 +00:00
|
|
|
$(CC) $(CFLAGS) -x assembler-with-cpp -o $@ -c $<
|
2000-01-05 19:10:52 +00:00
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/%.@OBJEXT@: $(COMMON_DIR)/%.c
|
2000-01-05 19:10:52 +00:00
|
|
|
$(CC) $(CFLAGS) $(GL_CFLAGS) -o $@ -c $<
|
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/%.@OBJEXT@: $(COMMON_DIR)/%.s
|
2000-01-06 01:06:17 +00:00
|
|
|
$(CC) $(CFLAGS) -x assembler-with-cpp -o $@ -c $<
|
2000-01-05 19:10:52 +00:00
|
|
|
|
1999-12-30 13:40:47 +00:00
|
|
|
###########################################################################
|
|
|
|
#
|
2000-01-05 19:10:52 +00:00
|
|
|
# Specific target rules
|
1999-12-30 13:40:47 +00:00
|
|
|
#
|
2000-01-05 19:10:52 +00:00
|
|
|
|
2000-01-22 12:54:51 +00:00
|
|
|
# Lib Software targets
|
|
|
|
ALL_COMMON_LIB_OBJS = $(patsubst %,$(BUILD_DIR)/common_lib/%,$(addsuffix \
|
|
|
|
.@OBJEXT@, $(basename $(GENERAL_SRC) .c .s)))
|
|
|
|
|
|
|
|
common_lib_DIR:
|
|
|
|
@DIR=common_lib; $(MAKE_SURE_DIR)
|
|
|
|
|
|
|
|
$(COMMON_LIB): common_lib_DIR $(BUILD_DIR)/common_lib.a
|
|
|
|
|
|
|
|
$(BUILD_DIR)/common_lib.a: $(ALL_COMMON_LIB_OBJS)
|
|
|
|
ar cru $@ $(ALL_COMMON_LIB_OBJS)
|
2000-01-29 23:24:16 +00:00
|
|
|
@RANLIB@ $@
|
2000-01-22 12:54:51 +00:00
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
# X11 software target
|
|
|
|
|
1999-12-30 13:40:47 +00:00
|
|
|
ifneq ($(X11QUAKE),)
|
|
|
|
|
2000-01-22 12:54:51 +00:00
|
|
|
ALL_X11_SRC = $(CD_AUDIO_SRC) $(SW_REND_SRC) @X11_VID_SRC@ model.c
|
2000-01-30 00:36:41 +00:00
|
|
|
ALL_X11_OBJS = $(patsubst %,$(BUILD_DIR)/%,$(addsuffix .@OBJEXT@,\
|
2000-01-22 12:54:51 +00:00
|
|
|
$(basename $(ALL_X11_SRC) .c .s))) \
|
2000-01-29 18:46:26 +00:00
|
|
|
$(BUILD_DIR)/common_lib.a \
|
|
|
|
$(TARGET_DIR)/sound_lib.a
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-01-02 11:23:41 +00:00
|
|
|
X11_CFLAGS = -DX11 @X_CFLAGS@
|
2000-01-03 10:25:01 +00:00
|
|
|
X11_LDFLAGS = @X_LIBS@ -lX11 @X11_SHM_LIB@ @X_EXTRA_LIBS@
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
# FIXME: This rule is pathological because of the seperate sunx driver,
|
2000-02-13 09:06:11 +00:00
|
|
|
# either merge it into vid_x11.c or make a seperate sun target. In either
|
2000-01-05 19:10:52 +00:00
|
|
|
# case, find the moro^wpeople responsible for this and other stupidities
|
|
|
|
# in Solaris and "educate" them.
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/$(addsuffix .@OBJEXT@,$(basename @X11_VID_SRC@ .c)):\
|
2000-01-05 19:10:52 +00:00
|
|
|
$(COMMON_DIR)/@X11_VID_SRC@
|
1999-12-30 13:40:47 +00:00
|
|
|
$(CC) $(CFLAGS) $(X11_CFLAGS) -o $@ -c $<
|
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(X11QUAKE): $(BUILD_DIR)/../$(X11QUAKE)
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
$(BUILD_DIR)/../$(X11QUAKE): $(ALL_X11_OBJS)
|
2000-01-05 22:12:51 +00:00
|
|
|
$(CC) $(CFLAGS) $(ALL_X11_OBJS) $(X11_LDFLAGS) $(LDFLAGS) $(LIBS) \
|
2000-01-05 19:10:52 +00:00
|
|
|
-o $(BUILD_DIR)/../$(X11QUAKE)
|
1999-12-30 13:40:47 +00:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
# SVGALib software target
|
2000-01-04 23:38:36 +00:00
|
|
|
|
1999-12-30 13:40:47 +00:00
|
|
|
ifneq ($(SVGAQUAKE),)
|
2000-01-22 12:54:51 +00:00
|
|
|
ALL_SVGA_SRC = $(CD_AUDIO_SRC) $(SW_REND_SRC) \
|
2000-01-09 02:45:58 +00:00
|
|
|
vid_svgalib.c in_svgalib.c d_copy.s model.c
|
2000-01-30 00:36:41 +00:00
|
|
|
ALL_SVGA_OBJS = $(patsubst %,$(BUILD_DIR)/%,$(addsuffix .@OBJEXT@,\
|
2000-01-22 12:54:51 +00:00
|
|
|
$(basename $(ALL_SVGA_SRC) .c .s))) \
|
2000-01-29 18:46:26 +00:00
|
|
|
$(BUILD_DIR)/common_lib.a \
|
|
|
|
$(TARGET_DIR)/sound_lib.a
|
1999-12-30 13:40:47 +00:00
|
|
|
|
1999-12-31 23:03:00 +00:00
|
|
|
SVGA_CFLAGS = @SVGA_CFLAGS@
|
2000-01-03 10:25:01 +00:00
|
|
|
SVGA_LDFLAGS = @SVGA_LIBS@
|
1999-12-30 13:40:47 +00:00
|
|
|
|
|
|
|
# Not sure why this -O is needed, but it is...
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/vid_svgalib.@OBJEXT@: $(COMMON_DIR)/vid_svgalib.c
|
2000-01-08 22:28:07 +00:00
|
|
|
$(CC) $(CFLAGS) $(SVGA_CFLAGS) -O -o $@ -c $<
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/d_copy.@OBJEXT@: $(COMMON_DIR)/d_copy.s
|
2000-01-06 01:06:17 +00:00
|
|
|
$(CC) $(CFLAGS) -x assembler-with-cpp -o $@ -c $<
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(SVGAQUAKE): $(BUILD_DIR)/../$(SVGAQUAKE)
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
$(BUILD_DIR)/../$(SVGAQUAKE): $(ALL_SVGA_OBJS)
|
2000-01-05 22:12:51 +00:00
|
|
|
$(CC) $(CFLAGS) $(ALL_SVGA_OBJS) $(SVGA_LDFLAGS) $(LDFLAGS) $(LIBS) \
|
2000-01-05 19:10:52 +00:00
|
|
|
-o $(BUILD_DIR)/../$(SVGAQUAKE)
|
1999-12-30 13:40:47 +00:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
# GGI software target
|
2000-01-04 23:38:36 +00:00
|
|
|
|
2000-01-02 08:50:13 +00:00
|
|
|
ifneq ($(GGIQUAKE),)
|
|
|
|
|
|
|
|
# Map the list of source files into a list of object files
|
2000-01-22 12:54:51 +00:00
|
|
|
ALL_GGI_SRC = $(CD_AUDIO_SRC) $(SW_REND_SRC) vid_ggi.c\
|
2000-01-05 19:10:52 +00:00
|
|
|
model.c
|
2000-01-30 00:36:41 +00:00
|
|
|
ALL_GGI_OBJS = $(patsubst %,$(BUILD_DIR)/%,$(addsuffix .@OBJEXT@,\
|
2000-01-22 12:54:51 +00:00
|
|
|
$(basename $(ALL_GGI_SRC) .c .s))) \
|
2000-01-29 18:46:26 +00:00
|
|
|
$(BUILD_DIR)/common_lib.a \
|
|
|
|
$(TARGET_DIR)/sound_lib.a
|
2000-01-02 08:50:13 +00:00
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
GGI_SRC = vid_ggi.c
|
2000-01-02 08:50:13 +00:00
|
|
|
GGI_CFLAGS = -DGGI @GGI_CFLAGS@
|
2000-01-03 10:25:01 +00:00
|
|
|
GGI_LDFLAGS = @GGI_LIBS@
|
2000-01-02 08:50:13 +00:00
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/vid_ggi.@OBJEXT@: $(COMMON_DIR)/vid_ggi.c
|
2000-01-02 08:50:13 +00:00
|
|
|
$(CC) $(CFLAGS) $(GGI_CFLAGS) -o $@ -c $<
|
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(GGIQUAKE): $(BUILD_DIR)/../$(GGIQUAKE)
|
2000-01-02 08:50:13 +00:00
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
$(BUILD_DIR)/../$(GGIQUAKE): $(ALL_GGI_OBJS)
|
2000-01-05 22:12:51 +00:00
|
|
|
$(CC) $(CFLAGS) $(ALL_GGI_OBJS) $(GGI_LDFLAGS) $(LDFLAGS) $(LIBS) \
|
2000-01-05 19:10:52 +00:00
|
|
|
-o $(BUILD_DIR)/../$(GGIQUAKE)
|
2000-01-02 08:50:13 +00:00
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# SDL software target
|
|
|
|
|
|
|
|
ifneq ($(SDLQUAKE),)
|
2000-01-22 12:54:51 +00:00
|
|
|
ALL_SDL_SRC = $(SW_REND_SRC) $(SDL_SRC) vid_sdl.c cd_sdl.c\
|
2000-01-05 19:10:52 +00:00
|
|
|
model.c
|
2000-01-30 00:36:41 +00:00
|
|
|
ALL_SDL_OBJS = $(patsubst %,$(BUILD_DIR)/%,$(addsuffix .@OBJEXT@,\
|
2000-01-22 12:54:51 +00:00
|
|
|
$(basename $(ALL_SDL_SRC) .c .s))) \
|
2000-01-29 18:46:26 +00:00
|
|
|
$(BUILD_DIR)/common_lib.a \
|
|
|
|
$(TARGET_DIR)/sound_lib.a
|
2000-01-05 19:10:52 +00:00
|
|
|
|
|
|
|
SDL_CFLAGS = @SDL_CFLAGS@ -DSDL
|
|
|
|
SDL_LDFLAGS = @SDL_LIBS@
|
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/vid_sdl.@OBJEXT@: $(COMMON_DIR)/vid_sdl.c
|
2000-01-05 19:10:52 +00:00
|
|
|
$(CC) $(CFLAGS) $(SDL_CFLAGS) -o $@ -c $<
|
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/cd_sdl.@OBJEXT@: $(COMMON_DIR)/cd_sdl.c
|
2000-01-05 19:10:52 +00:00
|
|
|
$(CC) $(CFLAGS) $(SDL_CFLAGS) -o $@ -c $<
|
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(SDLQUAKE): $(BUILD_DIR)/../$(SDLQUAKE)
|
2000-01-02 08:50:13 +00:00
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
$(BUILD_DIR)/../$(SDLQUAKE): $(ALL_SDL_OBJS)
|
2000-01-05 22:12:51 +00:00
|
|
|
$(CC) $(CFLAGS) $(ALL_SDL_OBJS) $(SDL_LDFLAGS) $(LDFLAGS) $(LIBS) \
|
2000-01-05 19:10:52 +00:00
|
|
|
-o $(BUILD_DIR)/../$(SDLQUAKE)
|
2000-01-02 08:50:13 +00:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2000-01-06 03:13:04 +00:00
|
|
|
# MGL software target
|
2000-01-04 23:38:36 +00:00
|
|
|
|
|
|
|
ifneq ($(MGLQUAKE),)
|
|
|
|
|
|
|
|
# Map the list of source files into a list of object files
|
2000-01-22 12:54:51 +00:00
|
|
|
ALL_MGL_SRC = $(CD_AUDIO_SRC) $(SW_REND_SRC) \
|
2000-01-07 01:20:15 +00:00
|
|
|
vid_win.c in_win.c conproc.c model.c
|
2000-01-30 00:36:41 +00:00
|
|
|
ALL_MGL_OBJS = $(patsubst %,$(BUILD_DIR)/%,$(addsuffix .@OBJEXT@,\
|
2000-01-22 12:54:51 +00:00
|
|
|
$(basename $(ALL_MGL_SRC) .c .s))) \
|
2000-01-29 18:46:26 +00:00
|
|
|
$(BUILD_DIR)/common_lib.a \
|
|
|
|
$(TARGET_DIR)/sound_lib.a
|
2000-01-04 23:38:36 +00:00
|
|
|
|
2000-01-06 03:13:04 +00:00
|
|
|
MGL_CFLAGS = @MGL_CFLAGS@ -DMGL
|
|
|
|
MGL_LDFLAGS = @MGL_LIBS@
|
2000-01-04 23:38:36 +00:00
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/vid_win.@OBJEXT@: $(COMMON_DIR)/vid_win.c
|
2000-01-04 23:38:36 +00:00
|
|
|
$(CC) $(CFLAGS) $(MGL_CFLAGS) -o $@ -c $<
|
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/in_win.@OBJEXT@: $(COMMON_DIR)/in_win.c
|
2000-01-04 23:38:36 +00:00
|
|
|
$(CC) $(CFLAGS) $(MGL_CFLAGS) -o $@ -c $<
|
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(MGLQUAKE): $(BUILD_DIR)/../$(MGLQUAKE)
|
2000-01-04 23:38:36 +00:00
|
|
|
|
2000-01-06 03:13:04 +00:00
|
|
|
$(BUILD_DIR)/../$(MGLQUAKE): $(ALL_MGL_OBJS)
|
|
|
|
$(CC) $(CFLAGS) $(ALL_MGL_OBJS) $(MGL_LDFLAGS) $(LDFLAGS) $(LIBS) \
|
2000-01-05 22:12:51 +00:00
|
|
|
-o $(BUILD_DIR)/../$(MGLQUAKE)
|
2000-01-05 19:10:52 +00:00
|
|
|
|
2000-01-04 23:38:36 +00:00
|
|
|
endif
|
|
|
|
|
2000-01-07 01:20:15 +00:00
|
|
|
# VGA software target
|
|
|
|
|
|
|
|
ifneq ($(VGAQUAKE),)
|
|
|
|
|
|
|
|
# Map the list of source files into a list of object files
|
2000-01-22 12:54:51 +00:00
|
|
|
ALL_VGA_SRC = $(CD_AUDIO_SRC) $(SW_REND_SRC) $(DOS_NET_SRC) \
|
2000-01-07 01:20:15 +00:00
|
|
|
vid_vga.c vid_ext.c vid_dos.c vregset.c in_dos.c dos_v2.c \
|
|
|
|
d_copy.s model.c
|
2000-01-30 00:36:41 +00:00
|
|
|
ALL_VGA_OBJS = $(patsubst %,$(BUILD_DIR)/%,$(addsuffix .@OBJEXT@,\
|
2000-01-22 12:54:51 +00:00
|
|
|
$(basename $(ALL_VGA_SRC) .c .s))) \
|
2000-01-29 18:46:26 +00:00
|
|
|
$(BUILD_DIR)/common_lib.a \
|
|
|
|
$(TARGET_DIR)/sound_lib.a
|
2000-01-07 01:20:15 +00:00
|
|
|
|
|
|
|
VGA_CFLAGS = @VGA_CFLAGS@ -DVGA
|
|
|
|
VGA_LDFLAGS = @VGA_LIBS@
|
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/vid_win.@OBJEXT@: $(COMMON_DIR)/vid_win.c
|
2000-01-07 01:20:15 +00:00
|
|
|
$(CC) $(CFLAGS) $(VGA_CFLAGS) -o $@ -c $<
|
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/in_win.@OBJEXT@: $(COMMON_DIR)/in_win.c
|
2000-01-07 01:20:15 +00:00
|
|
|
$(CC) $(CFLAGS) $(VGA_CFLAGS) -o $@ -c $<
|
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(VGAQUAKE): $(BUILD_DIR)/../$(VGAQUAKE)
|
2000-01-07 01:20:15 +00:00
|
|
|
|
|
|
|
$(BUILD_DIR)/../$(VGAQUAKE): $(ALL_VGA_OBJS)
|
|
|
|
$(CC) $(CFLAGS) $(ALL_VGA_OBJS) $(VGA_LDFLAGS) $(LDFLAGS) $(LIBS) \
|
|
|
|
-o $(BUILD_DIR)/../$(VGAQUAKE)
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
# X11 GL target
|
2000-01-04 23:38:36 +00:00
|
|
|
|
1999-12-30 13:40:47 +00:00
|
|
|
ifneq ($(GLQUAKE),)
|
2000-01-22 12:54:51 +00:00
|
|
|
ALL_GL_SRC = $(CD_AUDIO_SRC) $(GL_REND_SRC) \
|
2000-01-15 04:14:04 +00:00
|
|
|
gl_vidglx.c dga_check.c
|
2000-01-30 00:36:41 +00:00
|
|
|
ALL_GL_OBJS = $(patsubst %,$(BUILD_DIR)/%,$(addsuffix .@OBJEXT@,\
|
2000-01-22 12:54:51 +00:00
|
|
|
$(basename $(ALL_GL_SRC) .c .s))) \
|
2000-01-29 18:46:26 +00:00
|
|
|
$(BUILD_DIR)/common_lib.a \
|
|
|
|
$(TARGET_DIR)/sound_lib.a
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-02-10 05:43:45 +00:00
|
|
|
GL_CFLAGS = @OGL_CFLAGS@
|
2000-02-12 21:30:01 +00:00
|
|
|
GL_LDFLAGS = $(X11_LDFLAGS) @OGL_LIBS@ @DGA_LIBS@
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/gl_vidglx.o: $(COMMON_DIR)/gl_vidglx.c
|
1999-12-30 13:40:47 +00:00
|
|
|
$(CC) $(CFLAGS) $(GL_CFLAGS) -o $@ -c $<
|
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/dga_check.@OBJEXT@: $(COMMON_DIR)/dga_check.c
|
2000-01-15 03:33:27 +00:00
|
|
|
$(CC) $(CFLAGS) $(X11_CFLAGS) -o $@ -c $<
|
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(GLQUAKE): $(BUILD_DIR)/../$(GLQUAKE)
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
$(BUILD_DIR)/../$(GLQUAKE): $(ALL_GL_OBJS)
|
2000-01-05 22:12:51 +00:00
|
|
|
$(CC) $(CFLAGS) $(ALL_GL_OBJS) $(GL_LDFLAGS) $(LDFLAGS) $(LIBS) \
|
2000-01-05 19:10:52 +00:00
|
|
|
-o $(BUILD_DIR)/../$(GLQUAKE)
|
1999-12-30 13:40:47 +00:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2000-01-04 23:38:36 +00:00
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
# 3Dfx GL MCD target
|
|
|
|
|
1999-12-30 13:40:47 +00:00
|
|
|
ifneq ($(TDFXQUAKE),)
|
2000-01-22 12:54:51 +00:00
|
|
|
ALL_TDFX_SRC = $(CD_AUDIO_SRC) $(GL_REND_SRC) \
|
2000-01-09 02:45:58 +00:00
|
|
|
gl_vidlinux_3dfx.c in_svgalib.c
|
2000-01-30 00:36:41 +00:00
|
|
|
ALL_TDFX_OBJS = $(patsubst %,$(BUILD_DIR)/%,$(addsuffix .@OBJEXT@,\
|
2000-01-22 12:54:51 +00:00
|
|
|
$(basename $(ALL_TDFX_SRC) .c .s))) \
|
2000-01-29 18:46:26 +00:00
|
|
|
$(BUILD_DIR)/common_lib.a \
|
|
|
|
$(TARGET_DIR)/sound_lib.a
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-02-10 05:43:45 +00:00
|
|
|
TDFX_CFLAGS = @OGL_CFLAGS@ @GLIDE_CFLAGS@
|
2000-01-03 10:25:01 +00:00
|
|
|
TDFX_LDFLAGS = @SVGA_LIBS@ @TDFXGL_LIBS@
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(BUILD_DIR)/gl_vidlinux_3dfx.@OBJEXT@: $(COMMON_DIR)/gl_vidlinux_3dfx.c
|
1999-12-30 13:40:47 +00:00
|
|
|
$(CC) $(CFLAGS) $(TDFX_CFLAGS) -o $@ -c $<
|
|
|
|
|
2000-01-30 00:36:41 +00:00
|
|
|
$(TDFXQUAKE): $(BUILD_DIR)/../$(TDFXQUAKE)
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
$(BUILD_DIR)/../$(TDFXQUAKE): $(ALL_TDFX_OBJS)
|
2000-01-05 22:12:51 +00:00
|
|
|
$(CC) $(CFLAGS) $(ALL_TDFX_OBJS) $(TDFX_LDFLAGS) $(LDFLAGS) $(LIBS) \
|
2000-01-05 19:10:52 +00:00
|
|
|
-o $(BUILD_DIR)/../$(TDFXQUAKE)
|
1999-12-30 13:40:47 +00:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2000-01-03 06:18:32 +00:00
|
|
|
###########################################################################
|
|
|
|
#
|
2000-01-05 19:10:52 +00:00
|
|
|
# Misc targets
|
2000-01-03 06:18:32 +00:00
|
|
|
#
|
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
distclean: clean
|
|
|
|
rm -f Makefile
|
2000-01-03 06:18:32 +00:00
|
|
|
|
2000-01-05 19:10:52 +00:00
|
|
|
$(CLEAN_TARGETS):
|
|
|
|
rm -f $(BUILD_DIR)/../$(subst clean-,,$@)
|
2000-01-04 23:38:36 +00:00
|
|
|
|
2000-01-22 12:54:51 +00:00
|
|
|
clean-soft clean-gl clean-common_lib:
|
2000-02-14 11:30:37 +00:00
|
|
|
rm -f $(BUILD_DIR)/$(subst clean-,,$@)/*
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-01-22 12:54:51 +00:00
|
|
|
clean: clean-soft clean-gl clean-common_lib $(CLEAN_TARGETS)
|
2000-02-14 11:30:37 +00:00
|
|
|
-rm -f $(BUILD_DIR)/*
|
2000-01-03 08:03:01 +00:00
|
|
|
|
|
|
|
install: $(targets)
|
2000-01-08 21:35:03 +00:00
|
|
|
$(PROJECT_DIR)/mkinstalldirs $(DESTDIR)/$(bindir)
|
2000-01-03 08:03:01 +00:00
|
|
|
for i in $(targets); do \
|
|
|
|
$(PROJECT_DIR)/install-sh -m 755 $(BUILD_DIR)/../$$i \
|
2000-01-08 21:35:03 +00:00
|
|
|
$(DESTDIR)/$(bindir)/$$i; \
|
2000-01-03 08:03:01 +00:00
|
|
|
done
|
1999-12-30 13:40:47 +00:00
|
|
|
|
|
|
|
check:
|
|
|
|
@echo check not implemented
|
|
|
|
|