#
# Empire - A multi-player, client/server Internet based war game.
-# Copyright (C) 1986-2014, Dave Pare, Jeff Bailey, Thomas Ruschak,
+# Copyright (C) 1986-2016, Dave Pare, Jeff Bailey, Thomas Ruschak,
# Ken Stevens, Steve McClure, Markus Armbruster
#
# Empire is free software: you can redistribute it and/or modify
# Make.mk: The real Makefile, included by GNUmakefile
#
# Known contributors to this file:
-# Markus Armbruster, 2005-2014
+# Markus Armbruster, 2005-2016
#
# This makefile was inspired by `Recursive Make Considered Harmful',
# Source files
ifeq ($(revctrl),git)
-src := $(shell cd $(srcdir) && git ls-files)
+src := $(shell cd $(srcdir) && git ls-files | uniq)
else
include $(srcdir)/sources.mk
endif
server := src/server/emp_server$(EXEEXT)
# Info subjects:
tsubj := $(addprefix info/, $(addsuffix .t, $(subjects)))
-ttop := info/TOP.t
# Formatted info:
info.nr := $(addprefix info.nr/, $(info))
info.html := $(addprefix info.html/, $(addsuffix .html, $(info)))
# Each generated file should be in one of the following sets.
# Removed by clean:
clean := $(obj) $(deps) $(libs) $(util) $(client) $(server) $(tsubj) \
-$(ttop) $(info.all) $(empth_obj) $(empth_lib) sandbox
+info/toc info/TOP.t $(info.all) $(empth_obj) $(empth_lib) sandbox
# Removed by distclean:
distclean := $(ac) $(mk)
# Distributed by dist-source from $(srcdir):
ifeq ($(empthread),Windows) # really: W32, regardless of thread package
CPPFLAGS += -I$(srcdir)/src/lib/w32
endif
-ifeq ($(have_gcc),yes)
-CFLAGS += -fno-builtin-carg # conflicts with our carg()
-CFLAGS += -fno-common
-CFLAGS += -Wall -W -Wno-unused-parameter -Wpointer-arith \
--Wstrict-prototypes -Wmissing-prototypes -Wnested-externs \
--Wredundant-decls
-endif
$(client): LDLIBS := $(LIBS_client)
$(server): LDLIBS := $(LIBS_server)
.PHONY: check check-accept _check
check check-accept: _check
-check: export override EMPIRE_CHECK_ACCEPT :=
-check-accept: export override EMPIRE_CHECK_ACCEPT := y
+check: export EMPIRE_CHECK_ACCEPT :=
+check-accept: export EMPIRE_CHECK_ACCEPT := y
_check: all
@echo "Warning: test suite is immature and needs work." >&2
$(srcdir)/tests/files-test $(srcdir)
ifeq ($(empthread),LWP)
$(srcdir)/tests/smoke-test $(srcdir)
$(srcdir)/tests/actofgod-test $(srcdir)
+ $(srcdir)/tests/build-test $(srcdir)
+ $(srcdir)/tests/navi-march-test $(srcdir)
$(srcdir)/tests/fire-test $(srcdir)
+ $(srcdir)/tests/torpedo-test $(srcdir)
+ $(srcdir)/tests/bridgefall-test $(srcdir)
+ $(srcdir)/tests/retreat-test $(srcdir)
+ $(srcdir)/tests/update-test $(srcdir)
+ $(srcdir)/tests/version-test $(srcdir)
else
@echo "$(srcdir)/tests/smoke-test SKIPPED"
@echo "$(srcdir)/tests/actofgod-test SKIPPED"
+ @echo "$(srcdir)/tests/build-test SKIPPED"
+ @echo "$(srcdir)/tests/navi-march-test SKIPPED"
@echo "$(srcdir)/tests/fire-test SKIPPED"
+ @echo "$(srcdir)/tests/torpedo-test SKIPPED"
+ @echo "$(srcdir)/tests/bridgefall-test SKIPPED"
+ @echo "$(srcdir)/tests/retreat-test SKIPPED"
+ @echo "$(srcdir)/tests/update-test SKIPPED"
+ @echo "$(srcdir)/tests/version-test SKIPPED"
endif
+ $(srcdir)/tests/empdump-test $(srcdir)
### Implicit rules
$(call quiet-command,perl $(srcdir)/info/mksubj.pl $(subjects) $(filter %.t, $^),GEN '$(tsubj) info/toc')
>$@
-$(ttop): info/mktop.pl info/subjects.mk
+info/TOP.t: info/mktop.pl info/subjects.mk
$(call quiet-command,perl $(srcdir)/info/mktop.pl $@ $(subjects),GEN $@)
info.nr/all: $(filter-out info.nr/all, $(info.nr))
$(info.html): info/emp2html.pl
-info.ps: info/TROFF.MAC info/INFO.MAC $(ttop) $(tsubj) $(tsrc)
+info.ps: info/TROFF.MAC info/INFO.MAC info/TOP.t $(tsubj) $(tsrc)
groff $^ >$@
# Distributing