home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
games
/
volume11
/
reve
/
part06
/
Makefile.dist
< prev
next >
Wrap
Makefile
|
1990-11-15
|
8KB
|
226 lines
#
# Makefile for Reve (an othello game).
#
# @(#)Makefile.dist 1.7 90/10/18
#
# Copyright (C) 1990 - Rich Burridge & Yves Gallot.
# All rights reserved.
#
# Permission is given to distribute these sources, as long as the
# introductory messages are not removed, and no monies are exchanged.
#
# You are forbidden from using Reve as is, or in a modified state, in
# any tournaments, without the permission of the authors.
#
# No responsibility is taken for any errors inherent either
# to the comments or the code of this program, but if reported
# (see README file), then an attempt will be made to fix them.
#
#========================================================================
#
# There are various small changes needed when compiling reve on
# different systems. These have been isolated here, and should be
# uncommented if needed.
#
#=======================================================================
# Full pathname of the reve edge table file. This can also be overridden
# with a command line option.
#
EDGENAMEFILE = $(LIBDIR)/reve.edgetable
EDGENAME = -DEDGENAME=\"$(EDGENAMEFILE)\"
#-----------------------------------------------------------------------
# Not all machines have the index() string library function. If you
# don't have this function then you should uncomment the NOINDEX
# definition below.
#
#NOINDEX = -DNOINDEX
#-----------------------------------------------------------------------
# Not every version of Unix (in particular System V derivitives) has the
# select() system call. If your machine doesn't have this call, then you
# need to uncomment the following definition.
#
#NOSELECT = -DNOSELECT
#-----------------------------------------------------------------------
# Some machines do not have the usleep library function. If this is
# true, then you will need to uncomment this definition.
#
#NO_USLEEP = -DNO_USLEEP
#-----------------------------------------------------------------------
# If you not running under a BSD4.3 derived system, the parameters
# to the select call are different, and this definition should be
# uncommented. You need to uncomment this for SunOS v3.x.
#
#SELTYPE = -DNO_43SELECT
#-----------------------------------------------------------------------
# If you are not running under a BSD4.3 derived system, then the
# second parameter to a signal call is a pointer to an integer function,
# and this definition needs to be uncommented. You need to uncomment this
# for SunOS v3.x.
#
#SIGRET = -DNO_4_3SIGNAL
#-----------------------------------------------------------------------
# If you are running on a 80286 machine, Microport's 5.2 port of SYSV,
# SVAT, or Xenix286, then you will need to uncomment this definition.
# This ought to work under 5.3 as well.
#
#SYSV = -DSYSV
#-----------------------------------------------------------------------
# If you are compiling the X11 version and the X11 include and
# library files are not in a standard place, then the following
# two lines should be uncommented, and set appropriately.
#
#X11INCDIR = -I$(OPENWINHOME)/include
#X11LIBDIR = -L$(OPENWINHOME)/lib
#------------------------------------------------------------------------
# If you are compiling the XView version, then the following two lines
# should be uncommented, and set appropriately.
#
#XVIEWINCDIR = -I$(OPENWINHOME)/include
#XVIEWLIBDIR = -L$(OPENWINHOME)/lib
#
#===========================================================================
#
# Default locations where Othello files will be installed.
# You might wish to alter these values.
#
BINDIR = /usr/local/games
LIBDIR = /usr/local/lib
MANDIR = /usr/man/man$(MANSECT)
MANSECT = l
#
# Compilation flags and standard macro definitions.
#
CDEFS = $(NOINDEX) $(NOSELECT) $(NO_USLEEP) $(EDGENAME) $(SELTYPE) \
$(SIGRET) $(SYSV) $(X11INCDIR) $(XVIEWINCDIR)
CFLAGS = -O $(CDEFS)
#
#==========================================================================
BINARIES = sv_reve tty_reve xreve xv_reve
ETABLE = reve.edgetable
CC = cc
STDSRCS = boardstuff.c events.c items.c makemove.c main.c \
procs.c rev_eval.c rev_ip.c rev_iycp.c
STDOBJS = boardstuff.o events.o items.o makemove.o main.o \
procs.o rev_eval.o rev_ip.o rev_iycp.o
GSRCS = sunview.c tty.c x11.c xview.c
HDRS = color.h extern.h images.h reve.h patchlevel.h
IDIR = images
IMAGES = $(IDIR)/black.icon \
$(IDIR)/reve.icon \
$(IDIR)/reve.color.icon \
$(IDIR)/white.icon \
$(IDIR)/button.invert.icon \
$(IDIR)/button.normal.icon \
$(IDIR)/button.stencil.icon \
$(IDIR)/cycle.glyph.icon \
$(IDIR)/cycle.linvert.icon \
$(IDIR)/cycle.rinvert.icon \
$(IDIR)/cycle.stencil.icon \
$(IDIR)/hglass.cursor \
$(IDIR)/nocur.cursor
OTHERS = CHANGES README TODO reve.6 MANIFEST FILES \
reve.man Makefile.dist
SFILES1 = events.c items.c makemove.c main.c procs.c
SFILES2 = boardstuff.c rev_eval.c rev_ip.c rev_iycp.c $(HDRS)
SFILES3 = $(OTHERS)
SFILES4 = tty.c x11.c xview.c
SFILES5 = sunview.c $(IDIR)
SFILES6 = reve.edge1
SFILES7 = reve.edge2
SVIEWLIBS = -lsuntool -lsunwindow -lpixrect
TTYLIBS = -ltermcap
X11LIBS = -lX11
XVIEWLIBS = -lxview -lolgx -lX11
help:
@echo
@echo "You need to specify one of the following options:"
@echo
@echo " make sunview - to make the SunView version."
@echo " make tty - to make the dumb tty version."
@echo " make x11 - to make the X11 version."
@echo " make xview - to make the XView version."
@echo
@echo "This should be followed by:"
@echo
@echo " make install"
@echo " make clean"
@echo
all: $(BINARIES)
sunview: $(STDOBJS) sunview.o
$(CC) -o sv_reve $(CFLAGS) $(STDOBJS) sunview.o $(SVIEWLIBS)
-cp sv_reve reve
tty: $(STDOBJS) tty.o
$(CC) -o tty_reve $(CFLAGS) $(STDOBJS) tty.o $(TTYLIBS)
-cp tty_reve reve
x11: $(STDOBJS) x11.o
$(CC) -o xreve $(X11LIBDIR) $(CFLAGS) $(STDOBJS) x11.o \
$(X11LIBS)
-cp xreve reve
xview: $(STDOBJS) xview.o
$(CC) -o xv_reve $(XVIEWLIBDIR) $(CFLAGS) $(STDOBJS) \
xview.o $(XVIEWLIBS)
-cp xv_reve reve
install:
-cp reve $(BINDIR)
-chmod 751 $(BINDIR)/reve
-strip $(BINDIR)/reve
-cat reve.edge1 reve.edge2 > $(ETABLE)
-cp $(ETABLE) $(LIBDIR)
-chmod 644 $(LIBDIR)/$(ETABLE)
-cp reve.6 $(MANDIR)/reve.$(MANSECT)
-chmod 644 $(MANDIR)/reve.$(MANSECT)
clean:; rm -f *.o *.Z *.uu Part* *~ reve $(BINARIES) core
lint: lint-sunview lint-tty lint-xview lint-x11
lint-sunview:; lint $(CDEFS) $(STDSRCS) sunview.c $(SVIEWLIBS)
lint-tty:; lint $(CDEFS) $(STDSRCS) tty.c $(TTYLIBS)
lint-xview:; lint $(CDEFS) $(STDSRCS) xview.c $(XVIEWLIBS)
lint-x11:; lint $(CDEFS) $(STDSRCS) x11.c $(X11LIBS)
saber: $(STDSRCS) x11.c
#load $(LDFLAGS) $(CDEFS) $(STDSRCS) x11.c $(X11LIBS)
shar:; shar.script $(SFILES1) > Part1
shar.script $(SFILES2) > Part2
shar.script $(SFILES3) > Part3
shar.script $(SFILES4) > Part4
shar.script $(SFILES5) > Part5
shar.script $(SFILES6) > Part6
shar.script $(SFILES7) > Part7
create: SCCS
-sccs create $(STDSRCS) $(GSRCS) $(HDRS) $(IMAGES) $(OTHERS)
SCCS:
mkdir SCCS
chmod 755 SCCS
boardstuff.o: boardstuff.c color.h reve.h extern.h
events.o: events.c reve.h color.h extern.h
items.o: items.c color.h reve.h extern.h
makemove.o: makemove.c reve.h extern.h
main.o: main.c reve.h color.h patchlevel.h
procs.o: procs.c color.h reve.h extern.h
rev_eval.o: rev_eval.c reve.h
rev_ip.o: rev_ip.c reve.h
rev_iycp.o: rev_iycp.c reve.h
sunview.o: sunview.c reve.h color.h extern.h images.h $(IMAGES)
tty.o: tty.c reve.h color.h extern.h
x11.o: x11.c reve.h color.h extern.h images.h $(IMAGES)
xview.o: xview.c reve.h color.h extern.h images.h $(IMAGES)