######################################################################## # # Quake general stuff # srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ datadir = @datadir@ top_builddir = .. PROJECT_DIR := ${top_srcdir} BIN_PREFIX := qw-server MODULE := qw_server OBJ_PATTERN = $(BUILD_DIR)/%.@OBJEXT@ include $(top_builddir)/Rules.mk ######################################################################## # # Source files # QW_SRV_SYS_SRC = sys_common.c @QW_SRV_SYS_SRC@ # Networking source files # FIXME: Should not assume UNIX QW_NET_SRC = @NET_SOURCE@ net_com.c mdfour.c # Server source files 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 ######################################################################## # # Directory specific stuff # CFLAGS += -DQUAKEWORLD -DSERVERONLY 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) \ $(SRV_PR_SRC) $(QW_SRV_SYS_SRC) $(QW_GENERAL_SRC) \ register_check.c qendian.c qargs.c quakefs.c quakeio.c \ lib_replace.c ifeq ($(GENERATIONS),yes) GENERAL_SRC += unzip.c endif ALL_QW_SRV_SRC = $(GENERAL_SRC) model.c # FIXME: add dos/win specifc source all: $(targets) ########################################################################### # # QuakeWorld server target # ALL_SRV_OBJS = $(patsubst %,$(BUILD_DIR)/%, $(addsuffix .@OBJEXT@,\ $(basename $(ALL_QW_SRV_SRC) .c .s))) SRV_CFLAGS = -DSRV -DLIBDIR=\"$(libdir)\" $(X_CFLAGS) # FIXME: Don't use X_EXTRA_LIBS below SRV_LDFLAGS = @X_EXTRA_LIBS@ $(SRVQUAKE): $(BUILD_DIR)/../$(SRVQUAKE) $(BUILD_DIR)/../$(SRVQUAKE): $(ALL_SRV_OBJS) $(CC) $(CFLAGS) $(ALL_SRV_OBJS) $(SRV_LDFLAGS) $(LDFLAGS) $(LIBS) \ -o $(BUILD_DIR)/../$(SRVQUAKE) ########################################################################### # # Misc Targets # distclean: clean rm -f config.cache config.log config.status Makefile clean-qw-server: rm -f $(BUILD_DIR)/../qw-server clean: clean-qw-server -rm -rf $(BUILD_DIR) install: $(targets) $(PROJECT_DIR)/mkinstalldirs $(DESTDIR)/$(bindir) for i in $(targets); do \ $(PROJECT_DIR)/install-sh -m 755 $(BUILD_DIR)/../$$i \ $(DESTDIR)/$(bindir)/$$i; \ done check: @echo check not implemented