#
#  Makefile for the reve_proc computer move program.
#
#  @(#)Makefile 1.2 94/01/20
#
#  Copyright (C) 1990 - 1993 - Rich Burridge & Yves Gallot.
#  All rights reserved.
#
#  Permission is granted to copy this source, for redistribution
#  in source form only, provided the news headers in "substantially
#  unaltered format" are retained, the introductory messages are not
#  removed, and no monies are exchanged.
#
#  Permission is also granted to copy this source, without the
#  news headers, for the purposes of making an executable copy by
#  means of compilation, provided that such copy will not be used
#  for the purposes of competition in any othello tournaments, without
#  prior permission from 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.
#
#=====================================================================
#  If you want the computer moves to be played by a separate program,
#  started by reve and connected to reve by a pair of pipes, then
#  uncomment this definition.
#
#HASREVEPROC     = -DHASREVEPROC
#-----------------------------------------------------------------------
#  If you are building reve_proc on an SVR4 machine, then you should also
#  uncomment this definition.
#
#  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.
#
#SVR4  = -DSVR4
#===========================================================================
#  Compilation flags and standard macro definitions.
#
CDEFS    = $(HASREVEPROC) $(SVR4) -I../common
CCOMP    = -O

CC       = gcc

CFLAGS   = $(CCOMP) $(CDEFS)
CCFLAGS  = $(CCOMP) $(CDEFS)
#=================================================================
 
.KEEP_STATE:

COMMONDIR    = ../common
COMMONSRCS   = $(COMMONDIR)/rev_eval.c $(COMMONDIR)/rev_ip.c \
	       $(COMMONDIR)/rev_iycp.c
COMMONOBJS   = $(COMMONDIR)/rev_eval.o $(COMMONDIR)/rev_ip.o \
	       $(COMMONDIR)/rev_iycp.o
REVEPROCSRCS = reve_proc.c
REVEPROCOBJS = reve_proc.o

reve_proc: $(REVEPROCOBJS)
	$(CC) -o reve_proc $(CFLAGS) $(REVEPROCOBJS) $(COMMONOBJS)

clean:
	rm -f *.o  *~ reve_proc core

lint:
	lint $(CDEFS) $(REVEPROCSRCS)

saber:  $(REVEPROCSRCS)
	#load $(CDEFS) $(REVEPROCSRCS)

create: SCCS
	-sccs create $(REVEPROCSRCS) Makefile

SCCS:
	mkdir SCCS
	chmod 755 SCCS

reve_proc.o: reve_proc.c $(COMMONDIR)/reve.h
