[comp.sources.games] v07i011: conquer4 - middle earth multi-player game

billr@saab.CNA.TEK.COM (Bill Randle) (07/12/89)

Submitted-by: Bill Randle <billr@tekred.CNA.TEK.COM>
Posting-number: Volume 7, Issue 11
Archive-name: conquer4/Patch2b
Patch-To: conquer4: Volume 6, Issue 96

	[This replaces the original Makefile. Remove the original
	 before unpacking this shar file (otherwise it will fail).]

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  Makefile
# Wrapped by billr@saab on Wed Jul 12 06:36:20 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Makefile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Makefile'\"
else
echo shar: Extracting \"'Makefile'\" \(8505 characters\)
sed "s/^X//" >'Makefile' <<'END_OF_FILE'
X#	conquer: Copyright (c) 1989 by Edward M Barlow
X#
X#	BY CHANGING THIS FILE, YOU AGREE TO ABIDE BY THE LIMITATIONS STATED IN
X#	THE LIMITED USE CONTRACT CONTAINED IN THE FILE "header.h"
X#
X#       This makefile has been modified to allow compilation using
X#       a parallelized make program.  It has been used successfully
X#       on an Encore Multimax parallel computer with both 4 and
X#       6 cpus.
X#
X#       It should pose no problems for non parallel makes.
X#
X#       Please report any problems to adb@bucsf.bu.edu
X#
XMAKE	= /bin/make
XCC	= /bin/cc
XRM      = /bin/rm -f
X
X#	LN must be "ln -s" if source, data, and default span disks
XLN	= ln
XCP	= cp
XNULL	= 2>/dev/null
X
X#	Flags to lint
XLTFLG   = -h -lcurses
X
X#	Options for shar program, SHARLIM is limit of each shar
X#	file created in kilobytes and SHARNAM is the prefix for
X#	SHARFILE name.
X#	[This is for a public domain shar from USENET, I can send
X#	copies if you wish - adb@bu-cs.bu.edu]
XSHAR	= xshar
XSHARLIM	= 50
XSHARNAM	= shar.
XSHARFLG = -D -c -l$(SHARLIM) -o$(SHARNAM)
X
X#	This should be installed by whomever you want to own the game.
X#	I recommend "games" or "root".
X
X#	uncomment the next line if you dont have getopt in your library
X#	(eg you are on a pc, or a non unix system).  getopt.c is a
X#	public domain software, and has not been tested by the authors
X#	of conquer.
X#GETOPT	= getopt.o
X
X#if the final link does not compile change to the line below
XLIBRARIES = -lcurses -ltermcap
X#LIBRARIES = -lcurses
X
X#	DEFAULT is the directory where default nations & help files will be 
X#	stored.	 It is also the default directory = where players will play 
X#	if they do not use the -d option.
XDEFAULT = /usr4/acm/stud/adb/games/conqlib
X
X#	This directory is where the executables will be stored
XEXEDIR = /usr4/acm/stud/adb/games
X
X#	Definitions used for compiling conquer
XCDEFS  = -DDEFAULTDIR=\"$(DEFAULT)\" -DEXEDIR=\"$(EXEDIR)\"
X
X#	Options flag used for non-debugging purposes
XOPTFLG  = -O
X
X#	Options flag used for debugging purposes
X#	[make sure to comment out 'strip' commands in install section]
X#OPTFLG  = -DDEBUG -g
X
X#	this is the name of the user executable
X#       the user executable contains commands for the games players
XGAME  = conquer
X#	this is the name of the administrative executable
X#       the administrative executable contains commands for the game super user
XADMIN = conqrun
X#	this is the name of the sorting program which conquer uses
XSORT  = conqsort
X
X#       GAME IDENTIFICATION
X#	this is the game identifier.  See the DATA variable below
XGAMEID = 1
X#	This directory is where individual Conquer game data will be stored.
X#	As multiple simultaneous games are supported, each game must have its 
X#	own directory.
XDATA  = $(DEFAULT)/$(GAMEID)
X
X#	Suffixes for conquer files.
X.SUFFIXES:	A.o G.o
X
X# AFILS are files needed for game updating...
XAFILS = combat.c cexecute.c io.c admin.c makeworl.c navy.c spew.c \
Xnewlogin.c update.c magic.c npc.c misc.c randeven.c data.c trade.c check.c
XAOBJS = combat.o cexecuteA.o ioA.o admin.o makeworl.o navyA.o spew.o \
Xnewlogin.o update.o magicA.o npc.o miscA.o randeven.o dataA.o \
XtradeA.o $(GETOPT) check.o
X
X# GFILS are files needed to run a normal interactive game
XGFILS = commands.c cexecute.c forms.c io.c main.c move.c navy.c \
Xmagic.c misc.c reports.c data.c display.c extcmds.c trade.c check.c
XGOBJS = commands.o cexecuteG.o forms.o ioG.o main.o move.o navyG.o \
XmagicG.o miscG.o reports.o dataG.o display.o extcmds.o tradeG.o \
X$(GETOPT) check.o
X
X#txt[0-4] are input help files.  help[0-4] are output. HELPSCR is sed script.
XHELP=txt
XHELPOUT=help
XHELPSCR=sed
X
XHEADERS=header.h data.h newlogin.h patchlevel.h
XSUPT1=nations Makefile $(HELP)[0-5] README run man.page rules
XSUPT2=execute messages news commerce
XALLFILS=$(SUPT1) $(HEADERS) $(AFILS) commands.c forms.c main.c move.c \
Xreports.c display.c extcmds.c newhelp.c sort.c getopt.c
X
Xall:	$(ADMIN) $(GAME) $(SORT) helpfile
X	@echo YAY! make new_game to set up permissions, zero appropriate
X	@echo initial files, move $(GAME) and $(ADMIN) to 
X	@echo $(EXEDIR), and set up the world.
X	@echo If a game is in progress, make install will just move $(GAME) 
X	@echo and $(ADMIN) to $(EXEDIR).
X	@echo
X
X$(ADMIN):	$(AOBJS)
X	@echo phew...
X	@echo if the next command does not work you might also need -ltermcap
X	@echo === compiling administrative functions
X	$(CC) $(OPTFLG) -o $(ADMIN) $(AOBJS) $(LIBRARIES)
X#	comment out the next line during debugging	
X	strip $(ADMIN)
X
X$(GAME):	$(GOBJS)
X	@echo phew... 
X	@echo if the next command does not work you might also need -ltermcap
X	@echo === compiling user interface
X	$(CC) $(OPTFLG) -o $(GAME) $(GOBJS) $(LIBRARIES)
X#	comment out the next line during debugging
X	strip $(GAME)
X
X$(SORT):	sort.c
X	$(CC) $(OPTFLG) -o $(SORT) sort.c
X#	comment out the next line if debugging
X	strip $(SORT)
X
Xclobber:
X	$(RM) *.o $(HELPOUT)[0-5] $(SORT) newhelp in$(GAME) in$(SORT) in$(ADMIN) $(HELPSCR).[12] lint[aghs] conquer.doc $(GAME) $(ADMIN) $(NULL)
X
Xclean:
X	$(RM) *.o lint[aghs] conquer.doc $(NULL)
X
Xin$(GAME):	$(GAME)
X	-$(RM) $(EXEDIR)/$(GAME)
X	$(CP) $(GAME) $(EXEDIR)
X	chmod 4751 $(EXEDIR)/$(GAME)
X	touch in$(GAME)
X
Xin$(ADMIN):	$(ADMIN)
X	-$(RM) $(EXEDIR)/$(ADMIN)
X	$(CP) $(ADMIN) $(EXEDIR)
X	chmod 4751 $(EXEDIR)/$(ADMIN)
X	touch in$(ADMIN)
X
Xin$(SORT):	$(SORT)
X	-$(RM) $(EXEDIR)/$(SORT)
X	$(CP) $(SORT) $(EXEDIR)
X	chmod 751 $(EXEDIR)/$(SORT)
X	touch in$(SORT)
X
Xinstall:	in$(GAME) in$(ADMIN) in$(SORT) helpfile
X	@echo ""
X	@echo "Installation complete"
X
Xnew_game:	all
X	@echo Installing new game
X	-mkdir $(EXEDIR) $(NULL)
X	-mkdir $(DATA) $(NULL)
X	-mkdir $(DEFAULT)  $(NULL)
X	chmod 755 $(EXEDIR)
X	chmod 750 $(DATA) $(DEFAULT)
X	$(CP) $(GAME) $(ADMIN) $(SORT) $(EXEDIR)
X	chmod 4755 $(EXEDIR)/$(GAME) $(EXEDIR)/$(ADMIN)
X	chmod 0755 $(EXEDIR)/$(SORT)
X	chmod 0600 nations
X	chmod 0700 run
X	$(CP) nations rules $(DATA)
X	$(CP) nations rules $(DEFAULT)
X	@echo now making the world
X	$(EXEDIR)/$(ADMIN) -d$(DATA) -m
X	$(EXEDIR)/$(ADMIN) -d$(DATA) -a
X
Xhelpfile:	$(HELPOUT)0 $(HELPOUT)1 $(HELPOUT)2 $(HELPOUT)3 $(HELPOUT)4 $(HELPOUT)5
X	@echo Helpfiles built
X	touch helpfile
X
X$(HELPOUT)0:	$(HELP)0 $(HELPSCR).1 $(HELPSCR).2
X	@echo building $(HELPOUT)0
X	cat $(HELP)0 | sed -f $(HELPSCR).1 | sed -f $(HELPSCR).2 > $(HELPOUT)0
X	-$(RM) $(DEFAULT)/$(HELPOUT)0
X	-$(LN) $(HELPOUT)0 $(DEFAULT)/$(HELPOUT)0
X
X$(HELPOUT)1:	$(HELP)1 $(HELPSCR).1 $(HELPSCR).2
X	@echo building $(HELPOUT)1
X	cat $(HELP)1 | sed -f $(HELPSCR).1 | sed -f $(HELPSCR).2 > $(HELPOUT)1
X	-$(RM) $(DEFAULT)/$(HELPOUT)1
X	-$(LN) $(HELPOUT)1 $(DEFAULT)/$(HELPOUT)1
X
X$(HELPOUT)2:	$(HELP)2 $(HELPSCR).1 $(HELPSCR).2
X	@echo building $(HELPOUT)2
X	cat $(HELP)2 | sed -f $(HELPSCR).1 | sed -f $(HELPSCR).2 > $(HELPOUT)2
X	-$(RM) $(DEFAULT)/$(HELPOUT)2
X	-$(LN) $(HELPOUT)2 $(DEFAULT)/$(HELPOUT)2
X
X$(HELPOUT)3:	$(HELP)3 $(HELPSCR).1 $(HELPSCR).2
X	@echo building $(HELPOUT)3
X	cat $(HELP)3 | sed -f $(HELPSCR).1 | sed -f $(HELPSCR).2 > $(HELPOUT)3
X	-$(RM) $(DEFAULT)/$(HELPOUT)3
X	-$(LN) $(HELPOUT)3 $(DEFAULT)/$(HELPOUT)3
X
X$(HELPOUT)4:	$(HELP)4 $(HELPSCR).1 $(HELPSCR).2
X	@echo building $(HELPOUT)4
X	cat $(HELP)4 | sed -f $(HELPSCR).1 | sed -f $(HELPSCR).2 > $(HELPOUT)4
X	-$(RM) $(DEFAULT)/$(HELPOUT)4
X	-$(LN) $(HELPOUT)4 $(DEFAULT)/$(HELPOUT)4
X
X$(HELPOUT)5:	$(HELP)5 $(HELPSCR).1 $(HELPSCR).2
X	@echo building $(HELPOUT)5
X	cat $(HELP)5 | sed -f $(HELPSCR).1 | sed -f $(HELPSCR).2 > $(HELPOUT)5
X	-$(RM) $(DEFAULT)/$(HELPOUT)5
X	-$(LN) $(HELPOUT)5 $(DEFAULT)/$(HELPOUT)5
X
X$(HELPSCR).1:	newhelp
X	newhelp
X
X$(HELPSCR).2:	newhelp
X	newhelp
X
Xnewhelp:	dataG.o	newhelp.o
X	$(CC) dataG.o newhelp.o -o newhelp
X
Xlint:
X	lint $(LTFLG) $(CDEFS) -DCONQUER $(GFILS) > lintg
X	lint $(LTFLG) $(CDEFS) -DADMIN $(AFILS) > linta
X
Xdocs:	conquer.doc
X
Xconquer.doc:	$(HELPOUT)0 $(HELPOUT)1 $(HELPOUT)2 $(HELPOUT)3 $(HELPOUT)4 $(HELPOUT)5
X	cat $(HELPOUT)? |sed -e "s/^DONE//g"|sed -e "s/^END//g" >conquer.doc
X
Xcpio:
X	-$(RM) core
X	find . -name '*[CrpsEech]' -print | cpio -ocBv > cpiosv
X
Xshar:	
X	echo " lines   words chars   FILENAME" > MANIFEST
X	wc $(ALLFILS) >> MANIFEST
X	$(SHAR) $(SHARFLG) $(ALLFILS)
X
X.cA.o:	$<
X	( trap "" 0 1 2 3 4 ; $(LN) $*.c $*A.c ;\
X	$(CC) $(OPTFLG) $(CDEFS) -DADMIN -c $*A.c ;\
X	$(RM) $*A.c )
X
X.cG.o:	$<
X	( trap "" 0 1 2 3 4 ; $(LN) $*.c $*G.c ;\
X	$(CC) $(OPTFLG) $(CDEFS) -DCONQUER -c $*G.c ;\
X	$(RM) $*G.c )
X
X.c.o:	$<
X#	compiles using both defines since they
X#	are needed for the data.h definitions for
X#	each file... but should not be needed for
X#	the actual C source file being compiled
X	$(CC) $(OPTFLG) $(CDEFS) -DADMIN -DCONQUER -c $*.c
X
X$(GOBJS):	data.h header.h
X
X$(AOBJS):	data.h header.h
X
END_OF_FILE
if test 8505 -ne `wc -c <'Makefile'`; then
    echo shar: \"'Makefile'\" unpacked with wrong size!
fi
# end of 'Makefile'
fi
echo shar: End of shell archive.
exit 0