empserver/GNUmakefile.in
Markus Armbruster 23373d01d9 configure: Test compiler flags
When AC_PROG_CC detects GCC, Make.mk adds a bunch of flags to CFLAGS.
Works only for flags that any version of gcc in use accepts.

Instead, make configure add the flags that actually work to CFLAGS.
This will let us add flags that work only for some compilers.

The new autoconf macros are from autoconf-archive v2015.02.24.

Unfortunately, AX_APPEND_COMPILE_FLAGS doesn't work reliably for
-Wno-*: gcc complains about unknown -Wno-foo only when other
diagnostics are being produced.  Test -Wfoo instead of -Wno-foo, and
rename to MY_APPEND_COMPILE_FLAGS.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2015-11-22 10:23:54 +01:00

91 lines
2.5 KiB
Text

#
# Empire - A multi-player, client/server Internet based war game.
# Copyright (C) 1986-2015, Dave Pare, Jeff Bailey, Thomas Ruschak,
# Ken Stevens, Steve McClure, Markus Armbruster
#
# 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 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# 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, see <http://www.gnu.org/licenses/>.
#
# ---
#
# See files README, COPYING and CREDITS in the root of the source
# tree for related information and legal notices. It is expected
# that future projects/authors will amend these files as needed.
#
# ---
#
# @configure_input@
# GNUmakefile.in: Makefile template for configure
#
# Known contributors to this file:
# Markus Armbruster, 2005-2009
#
# The real meat is in Make.mk, which see.
TARNAME := @PACKAGE_TARNAME@
VERSION := @PACKAGE_VERSION@
CC := @CC@
CFLAGS := @CFLAGS@
CPPFLAGS := @CPPFLAGS@ @DEFS@
LDFLAGS := @LDFLAGS@
LIBOBJS := @LIBOBJS@
LDLIBS := -lm
empthread := @empthread@
ifeq ($(empthread),POSIX)
CC := @PTHREAD_CC@
CFLAGS := $(CFLAGS) @PTHREAD_CFLAGS@
LDFLAGS := $(LDFLAGS) @PTHREAD_CFLAGS@
LDLIBS := @PTHREAD_LIBS@ $(LDLIBS)
endif
ifeq ($(empthread),Windows)
CFLAGS := $(CFLAGS) -mthreads
endif
LIBS_client := @LIBS_client@ $(LDLIBS)
LIBS_server := @LIBS_server@ $(LDLIBS)
LDLIBS := @LIBS@ $(LDLIBS)
CCDEPMODE := @CCDEPMODE@
@am__fastdepCC_TRUE@how_to_dep := fast
@am__fastdepCC_FALSE@@AMDEP_TRUE@how_to_dep := depcomp
EXEEXT := @EXEEXT@
ifneq (@OBJEXT@,o)
$(error This makefile can't cope with your compiler's object file names)
endif
AWK := @AWK@
INSTALL := @INSTALL@
INSTALL_DATA := @INSTALL_DATA@
INSTALL_PROGRAM := @INSTALL_PROGRAM@
NROFF := @NROFF@
RANLIB := @RANLIB@
prefix := @prefix@
exec_prefix := @exec_prefix@
bindir := @bindir@
sbindir := @sbindir@
datarootdir := @datarootdir@
datadir := @datadir@
localstatedir := @localstatedir@
mandir := @mandir@
sysconfdir := @sysconfdir@
srcdir := @srcdir@
VPATH := @srcdir@
revctrl := @revctrl@
EMPIREHOST := @EMPIREHOST@
EMPIREPORT := @EMPIREPORT@
include $(srcdir)/Make.mk