]> git.pond.sub.org Git - empserver/blobdiff - Make.mk
Fix PRNG seeding to resist guessing
[empserver] / Make.mk
diff --git a/Make.mk b/Make.mk
index 22d43050d3bc9867a89fbaa83a94ee243f5829e7..feae71a642c6b40ec2f82ce263f950607f506df4 100644 (file)
--- a/Make.mk
+++ b/Make.mk
@@ -1,11 +1,11 @@
 #
 #   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
+#   Copyright (C) 1986-2013, Dave Pare, Jeff Bailey, Thomas Ruschak,
+#                 Ken Stevens, Steve McClure, Markus Armbruster
 #
-#   This program is free software; you can redistribute it and/or modify
+#   Empire is free software: you can redistribute it and/or modify
 #   it under the terms of the GNU General Public License as published by
-#   the Free Software Foundation; either version 2 of the License, or
+#   the Free Software Foundation, either version 3 of the License, or
 #   (at your option) any later version.
 #
 #   This program is distributed in the hope that it will be useful,
@@ -14,8 +14,7 @@
 #   GNU General Public License for more details.
 #
 #   You should have received a copy of the GNU General Public License
-#   along with this program; if not, write to the Free Software
-#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 #   ---
 #
 #   Make.mk: The real Makefile, included by GNUmakefile
 #
 #   Known contributors to this file:
-#      Markus Armbruster, 2005-2009
+#      Markus Armbruster, 2005-2012
 #
 
 # This makefile was inspired by `Recursive Make Considered Harmful',
 # Peter Miller, 1997.
-# http://www.pcug.org.au/~millerp/rmch/recu-make-cons-harm.html
+# http://miller.emu.id.au/pmiller/books/rmch/
 
 # Recursively expanded variables are occasionally useful, but can be
 # slow and tricky.  Do not use them gratuitously.  If you don't
@@ -120,7 +119,7 @@ obj := $(csrc:.c=.o) $(filter %.o, $(ac:.c=.o))
 # Dependencies:
 deps := $(obj:.o=.d)
 # Library archives:
-libs := $(addprefix lib/, libcommon.a libas.a libgen.a libglobal.a)
+libs := $(addprefix lib/, libcommon.a libgen.a libglobal.a)
 # Programs:
 util := $(addprefix src/util/, $(addsuffix $(EXEEXT), empdump empsched fairland files pconfig))
 client := src/client/empire$(EXEEXT)
@@ -131,6 +130,9 @@ ttop := info/TOP.t
 # Formatted info:
 info.nr := $(addprefix info.nr/, $(info))
 info.html := $(addprefix info.html/, $(addsuffix .html, $(info)))
+info.all := $(info.nr) $(info.html) info.ps
+# Tests
+# sandbox
 
 # Conditionally generated files:
 empth_obj := src/lib/empthread/io.o
@@ -155,7 +157,7 @@ endif
 # Each generated file should be in one of the following sets.
 # Removed by clean:
 clean := $(obj) $(deps) $(libs) $(util) $(client) $(server) $(tsubj)   \
-$(ttop) $(info.nr) $(info.html) $(empth_obj) $(empth_lib)
+$(ttop) $(info.all) $(empth_obj) $(empth_lib) sandbox
 # Removed by distclean:
 distclean := $(ac) $(mk)
 # Distributed by dist-source from $(srcdir):
@@ -178,6 +180,10 @@ endif
 $(client): LDLIBS := $(LIBS_client)
 $(server): LDLIBS := $(LIBS_server)
 
+# Self-tests
+checks := check-smoke
+
+
 ### Advertized goals
 
 .PHONY: all
@@ -189,7 +195,7 @@ html: $(info.html)
 
 .PHONY: clean
 clean:
-       $(call quiet-command,rm -f $(clean),CLEAN)
+       $(call quiet-command,rm -rf $(clean),CLEAN)
 
 .PHONY: distclean
 distclean: clean
@@ -244,6 +250,19 @@ uninstall:
 .PHONY: dist
 dist: dist-source dist-client dist-info
 
+.PHONY: check $(checks)
+check: $(checks)
+$(checks): all
+check-smoke:
+       @echo "Warning: smoke test is immature and needs work." >&2
+       $(srcdir)/tests/files-test $(srcdir)
+       $(srcdir)/tests/fairland-test $(srcdir)
+ifeq ($(empthread),LWP)
+       $(srcdir)/tests/smoke-test $(srcdir)
+else
+       @echo "$(srcdir)/tests/smoke-test SKIPPED"
+endif
+
 
 ### Implicit rules
 
@@ -291,7 +310,6 @@ $(client): $(filter src/client/%, $(obj)) src/lib/global/version.o
 
 $(util): $(libs)
 
-lib/libas.a: $(filter src/lib/as/%, $(obj))
 lib/libcommon.a: $(filter src/lib/common/%, $(obj))
 lib/libgen.a: $(filter src/lib/gen/%, $(obj))
 lib/libglobal.a: $(filter src/lib/global/%, $(obj))
@@ -356,6 +374,8 @@ dist-info: info html
        $(tarball) $(TARNAME)-info-text-$(VERSION) -C info.nr $(info)
        $(tarball) $(TARNAME)-info-html-$(VERSION) -C info.html $(addsuffix .html, $(info))
 
+# Dependencies
+
 ifneq ($(deps),)
 -include $(deps)
 endif