1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269
|
#
# XFrisk - The classic board game for X
# Copyright (C) 1993-1999 Elan Feingold (elan@aetherworks.com)
#
# This program 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
# (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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id: Makefile,v 1.22 2000/01/23 19:01:55 tony Exp $
#
# $Log: Makefile,v $
# Revision 1.22 2000/01/23 19:01:55 tony
# default to Xaw3d, with comment
#
# Revision 1.21 2000/01/20 18:03:20 morphy
# Cleanup, comments to aid the non-initiated and reordering for clarity
#
# Revision 1.20 2000/01/18 19:55:06 morphy
# Minor correction to Drop All Armies prevention
#
# Revision 1.19 2000/01/18 18:56:04 morphy
# Added note and option: -DNARROWPROTO fixes Xaw scrollbars
#
# Revision 1.18 2000/01/17 21:11:34 tony
# fix on dropping armies during fortification, made configurable from here
#
# Edited for Debian GNU/Linux.
DESTDIR =
##################
# Language options
# Define only either one, not both
LANGUAGE=ENGLISH
#LANGUAGE=FRENCH
##################
# Gameplay options
# Dropping more than 1 army while fortifying:
# Use this one to disallow dropping all...
#DROPALL=
# ... or this one to allow dropping all at once
DROPALL=-DDROPALL
# The max number of armies to drop is set in game.c, DROP_ARMIES
# which will be ignored it DROPALL is not set
####################
# C compiler options
# GNU gcc is recommended.
CC=gcc
# Use these with gcc
CFLAGS=-g -Wall -W -fno-common -pedantic
# If you don't have gcc, don't use -Wall -W -fno-common
#CFLAGS=-g
# Debugging options - these don't all work
# Assertions catch "shouldn't happen" type errors and immediately terminate the game
# if one is caught
#CFLAGS+=-DASSERTIONS
#
# For debugging memory problems
#CFLAGS+=-DMEM_DEBUG
#
# For logging
#CFLAGS+=-DLOGGING
#
# Test games (quick start)
#CFLAGS+=-DTEST_GAME
## Initial linker options
LDFLAGS=
## Installation prefix
# Adjust to taste. Stuff gets installed here.
#PREFIX=$(DESTDIR)/usr/games
#PREFIX=/usr/local/X11
## X11 location and options
# for X11R6
# Point this at your X tree.
XDIR=/usr/X11R6
#XDIR=/usr/local/X11
#XDIR=/usr/openwin
# try Xaw if you don't have Xaw3d
#XAW=Xaw
XAW=Xaw3d
XLIBS=-L$(XDIR)/lib -l$(XAW) -lXext -lXmu -lXt -lSM -lICE -lX11
XINC=-I$(XDIR)/include
CFLAGS+=$(XINC)
# for X11R5
#XLIBS=-L$(XDIR)/lib -lXaw -lXext -lXmu -lXt -lX11
# System V (Solaris, Irix, etc.) will probably want -lsocket -lnsl.
#LIBS=-lsocket -lnsl
# on other systems leave LIBS blank for now
LIBS=
# On some systems -DNARROWPROTO is needed for working Xaw scrollbars
# This includes FreeBSD 3.x and recent Linux
CFLAGS+=-DNARROWPROTO
# If the link fails because it can't find snprintf, uncomment this.
#COMPAT_OBJS+=snprintf.o
# If you get complaints about ranlib not being found, exchange these.
RANLIB=ranlib
#RANLIB=true
# For HPUX
#CFLAGS+=-Ae
# For Suns with OpenWindows
#CFLAGS+=-I/usr/openwin/include
# On particularly lame systems (e.g., Solaris 2.5) you may need to
# uncomment this.
#XLIBS+=-Wl,-rpath,$(XDIR)/lib
# For BSD/OS (BSD/OS's ranlib sometimes seems to munch files)
#XLIBS+=-lipc
#RANLIB=true
# For BSD and other nonbroken systems
INSTALL_DATA=install -c -m 644
INSTALL_BIN=install -c -m 755
# For systems without a BSD install
#INSTALL_DATA=cp
#INSTALL_BIN=cp
############################################################
# You shouldn't need to edit below here #
############################################################
LIBDIR=$(DESTDIR)/usr/lib/games/xfrisk
BINDIR=$(DESTDIR)/usr/games
HELPDIR=$(DESTDIR)/usr/share/games/xfrisk
DOCDIR=$(DESTDIR)/usr/share/doc/xfrisk
# Data files, stored in LIBDIR
MAP=World.risk
COUNTRY=Countries.risk
HELP=Help.risk
# Flags & programs
DEFINES=-D$(LANGUAGE) -DMAPFILE=\"$(LIBDIR)/$(MAP)\" -DCOUNTRYFILE=\"$(LIBDIR)/$(COUNTRY)\" -DHELPFILE=\"$(HELPDIR)/$(HELP)\" $(DROP_ONE)
CFLAGS+=$(DEFINES)
# The targets and directives
all: xfrisk friskserver aiDummy aiConway aiColson World.risk Countries.risk
# The client program
GAMEOBJS=client.o network.o gui.o callbacks.o utils.o dice.o cards.o \
game.o colormap.o help.o riskgame.o debug.o clientMain.o colorEdit.o \
registerPlayers.o addPlayer.o viewStats.o viewCards.o viewLog.o \
viewChat.o viewFeedback.o
xfrisk: $(GAMEOBJS) $(COMPAT_OBJS)
$(CC) $(LDFLAGS) $^ $(XINC) $(XLIBS) $(LIBS) -o $@
# The server program
SERVEROBJS=server.o network.o deck.o riskgame.o debug.o clients.o serverMain.o
# these could be compiled without X as soon as callbacks gets fixed :-)
# right now compile will break if the X include files are not found
friskserver: $(SERVEROBJS) $(COMPAT_OBJS)
$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
ai: aiDummy aiConway aiColson
# The map building program
buildmap: buildmap.o debug.o
$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
# The architecture analysis program
findtypes: findtypes.o
$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
# A framework for a computer player
aiDummy: aiDummy.o libfriskAI.a
$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
# A real computer player, by Andrew Conway
aiConway: aiConway.o libfriskAI.a
$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
# A real computer player, by Jean-Claude Colson
aiColson: aiColson.o libfriskAI.a
$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
# The computer player library
libfriskAI.a: network.o aiDice.o game.o riskgame.o debug.o aiClientMain.o \
aiController.o aiStubs.o $(COMPAT_OBJS)
$(AR) -cruv $@ $^
$(RANLIB) $@
install: all
-(umask 022; mkdir -p -m755 $(LIBDIR) $(BINDIR) $(APPLOADDIR))
$(INSTALL_DATA) FAQ $(DOCDIR)
$(INSTALL_DATA) BUGS $(DOCDIR)
$(INSTALL_DATA) $(MAP) $(LIBDIR)
$(INSTALL_DATA) $(COUNTRY) $(LIBDIR)
$(INSTALL_DATA) $(HELP) $(HELPDIR)
$(INSTALL_BIN) risk $(BINDIR)
$(INSTALL_BIN) xfrisk $(BINDIR)
$(INSTALL_BIN) friskserver $(BINDIR)
$(INSTALL_BIN) aiDummy $(BINDIR)
$(INSTALL_BIN) aiConway $(BINDIR)
$(INSTALL_BIN) aiColson $(BINDIR)
# Other targets
Countries.risk World.risk: World.ppm buildmap
./buildmap World.ppm World.risk Countries.risk
uninstall:
rm -rf $(LIBDIR)
rm -rf $(HELPDIR)
rm -f $(BINDIR)/risk
rm -f $(BINDIR)/xfrisk
rm -f $(BINDIR)/friskserver
rm -f $(BINDIR)/aiDummy
rm -f $(BINDIR)/aiConway
rm -f $(BINDIR)/aiColson
types.h: findtypes
./findtypes
version:
touch version.h
include depend.mk
depend: types.h
$(CC) $(CFLAGS) -MM *.c >depend.mk
depend.mk:
touch depend.mk
$(MAKE) depend
tidy:
rm -f *.log *~ core
clean: tidy
rm -f *.o *.a findtypes types.h buildmap Countries.risk World.risk
distclean: clean
rm -f aiDummy aiConway aiColson xfrisk friskserver depend.mk core
check:
find . -type f \! -perm 444 \! -perm 555 -print
|