1999-12-29 13:58:47 +00:00
|
|
|
########################################################################
|
|
|
|
#
|
|
|
|
# Quake general stuff
|
|
|
|
#
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-03-13 11:54:24 +00:00
|
|
|
srcdir = @srcdir@
|
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
|
|
|
|
bindir = @bindir@
|
|
|
|
datadir = @datadir@
|
|
|
|
|
2000-03-07 23:13:00 +00:00
|
|
|
top_builddir = ..
|
2000-03-13 11:54:24 +00:00
|
|
|
PROJECT_DIR := ${top_srcdir}
|
2000-03-06 13:26:42 +00:00
|
|
|
BIN_PREFIX := qw-server
|
|
|
|
MODULE := qw_server
|
|
|
|
OBJ_PATTERN = $(BUILD_DIR)/%.@OBJEXT@
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-03-07 23:13:00 +00:00
|
|
|
include $(top_builddir)/Rules.mk
|
1999-12-29 13:58:47 +00:00
|
|
|
|
|
|
|
########################################################################
|
|
|
|
#
|
|
|
|
# Source files
|
|
|
|
#
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-01-06 16:56:38 +00:00
|
|
|
QW_SRV_SYS_SRC = sys_common.c @QW_SRV_SYS_SRC@
|
1999-12-30 13:40:47 +00:00
|
|
|
|
|
|
|
# Networking source files
|
2000-01-05 19:45:44 +00:00
|
|
|
# FIXME: Should not assume UNIX
|
1999-12-30 13:40:47 +00:00
|
|
|
|
2000-02-08 21:23:06 +00:00
|
|
|
QW_NET_SRC = @NET_SOURCE@ net_com.c mdfour.c
|
1999-12-30 13:40:47 +00:00
|
|
|
|
|
|
|
# Server source files
|
2000-01-05 19:45:44 +00:00
|
|
|
|
1999-12-30 13:40:47 +00:00
|
|
|
SRV_SRC = sv_main.c sv_user.c sv_move.c sv_phys.c
|
|
|
|
QW_SRV_SRC = sv_ccmds.c sv_ents.c sv_init.c sv_send.c sv_nchan.c world.c
|
|
|
|
SRV_PR_SRC = pr_cmds.c pr_edict.c pr_exec.c
|
|
|
|
|
|
|
|
|
|
|
|
QW_GENERAL_SRC = pmove.c pmovetst.c
|
|
|
|
|
1999-12-29 13:58:47 +00:00
|
|
|
|
|
|
|
########################################################################
|
|
|
|
#
|
|
|
|
# Directory specific stuff
|
|
|
|
#
|
2000-03-06 13:26:42 +00:00
|
|
|
CFLAGS += -DQUAKEWORLD -DSERVERONLY
|
1999-12-29 13:58:47 +00:00
|
|
|
|
|
|
|
SRVQUAKE = qw-server
|
|
|
|
targets = $(SRVQUAKE)
|
|
|
|
.PHONY: $(SRVQUAKE)
|
|
|
|
|
|
|
|
GENERAL_SRC = common.c crc.c cvar.c cmd.c mathlib.c wad.c zone.c \
|
|
|
|
$(QW_NET_SRC) net_chan.c $(SRV_SRC) $(QW_SRV_SRC) \
|
2000-01-03 01:40:54 +00:00
|
|
|
$(SRV_PR_SRC) $(QW_SRV_SYS_SRC) $(QW_GENERAL_SRC) \
|
2000-02-08 05:06:58 +00:00
|
|
|
register_check.c qendian.c qargs.c quakefs.c quakeio.c \
|
|
|
|
lib_replace.c
|
2000-03-04 03:06:46 +00:00
|
|
|
ifeq ($(GENERATIONS),yes)
|
|
|
|
GENERAL_SRC += unzip.c
|
|
|
|
endif
|
1999-12-31 02:10:33 +00:00
|
|
|
ALL_QW_SRV_SRC = $(GENERAL_SRC) model.c
|
2000-01-05 19:45:44 +00:00
|
|
|
# FIXME: add dos/win specifc source
|
1999-12-29 13:58:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
all: $(targets)
|
|
|
|
|
2000-01-05 19:45:44 +00:00
|
|
|
|
1999-12-29 13:58:47 +00:00
|
|
|
###########################################################################
|
|
|
|
#
|
2000-01-05 19:45:44 +00:00
|
|
|
# QuakeWorld server target
|
1999-12-29 13:58:47 +00:00
|
|
|
#
|
2000-01-05 19:45:44 +00:00
|
|
|
|
|
|
|
ALL_SRV_OBJS = $(patsubst %,$(BUILD_DIR)/%, $(addsuffix .@OBJEXT@,\
|
|
|
|
$(basename $(ALL_QW_SRV_SRC) .c .s)))
|
1999-12-29 13:58:47 +00:00
|
|
|
|
2000-02-14 00:35:13 +00:00
|
|
|
SRV_CFLAGS = -DSRV -DLIBDIR=\"$(libdir)\" $(X_CFLAGS)
|
2000-01-05 19:45:44 +00:00
|
|
|
# FIXME: Don't use X_EXTRA_LIBS below
|
2000-01-03 10:25:01 +00:00
|
|
|
SRV_LDFLAGS = @X_EXTRA_LIBS@
|
1999-12-29 13:58:47 +00:00
|
|
|
|
2000-03-06 13:26:42 +00:00
|
|
|
$(SRVQUAKE): $(BUILD_DIR)/../$(SRVQUAKE)
|
1999-12-29 13:58:47 +00:00
|
|
|
|
2000-01-05 19:45:44 +00:00
|
|
|
$(BUILD_DIR)/../$(SRVQUAKE): $(ALL_SRV_OBJS)
|
2000-01-05 22:12:51 +00:00
|
|
|
$(CC) $(CFLAGS) $(ALL_SRV_OBJS) $(SRV_LDFLAGS) $(LDFLAGS) $(LIBS) \
|
2000-01-05 19:45:44 +00:00
|
|
|
-o $(BUILD_DIR)/../$(SRVQUAKE)
|
1999-12-29 13:58:47 +00:00
|
|
|
|
|
|
|
|
1999-12-30 13:40:47 +00:00
|
|
|
###########################################################################
|
|
|
|
#
|
2000-01-05 19:45:44 +00:00
|
|
|
# Misc Targets
|
1999-12-30 13:40:47 +00:00
|
|
|
#
|
2000-01-05 19:45:44 +00:00
|
|
|
|
1999-12-30 13:40:47 +00:00
|
|
|
distclean: clean
|
|
|
|
rm -f config.cache config.log config.status Makefile
|
|
|
|
|
2000-01-10 07:55:48 +00:00
|
|
|
clean-qw-server:
|
|
|
|
rm -f $(BUILD_DIR)/../qw-server
|
|
|
|
|
|
|
|
clean: clean-qw-server
|
2000-03-06 13:26:42 +00:00
|
|
|
-rm -rf $(BUILD_DIR)
|
2000-01-05 19:45:44 +00:00
|
|
|
|
2000-01-03 08:03:01 +00:00
|
|
|
install: $(targets)
|
2000-01-08 21:35:03 +00:00
|
|
|
$(PROJECT_DIR)/mkinstalldirs $(DESTDIR)/$(bindir)
|
2000-03-23 23:04:48 +00:00
|
|
|
for i in x-dummy $(targets); do \
|
|
|
|
if test "$$i" != x-dummy; then \
|
|
|
|
$(PROJECT_DIR)/install-sh -m 755 $(BUILD_DIR)/../$$i \
|
|
|
|
$(DESTDIR)/$(bindir)/$$i; \
|
|
|
|
fi \
|
2000-01-03 08:03:01 +00:00
|
|
|
done
|
1999-12-30 13:40:47 +00:00
|
|
|
|
|
|
|
check:
|
|
|
|
@echo check not implemented
|
2000-01-05 19:45:44 +00:00
|
|
|
|