# # Makefile for the othello game. # # Graphics versions for SunView, X11, XView and dumb terminals. # # @(#)Makefile 1.9 90/04/10 # # Othello routines originally written by Chris Miller. # Original SunView graphics by # Ed Falk - Sun Microsystems (Mountain View CA.) # # New SunView, X11, XView and tty versions and consolidation by # Rich Burridge - Sun Microsystems, Australia. # # Permission is given to distribute these sources, as long as the # introductory messages are not removed, and no monies are exchanged. # # No responsibility is taken for any errors inherent either # to the comments or the code of this program, but if reported # to me then an attempt will be made to fix them. # #======================================================================== # # There are various small changes needed when compiling othello on # different systems. These have been isolated here, and should be # uncommented if needed. # #======================================================================= # 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 #----------------------------------------------------------------------- # Full pathname of the othello remarks file. This can also be overridden # with a command line option. # #REMNAMEFILE = $(LIBDIR)/othello.remarks #REMNAME = -DREMNAME=\"$(REMNAMEFILE)\" #----------------------------------------------------------------------- # If you are not running under a BSD4.3 derived system, then the # second parameter to a select 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 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 = /home/lave/inge/bin LIBDIR = /home/lave/inge/lib MANDIR = /usr/man/man$(MANSECT) MANSECT = l # # Compilation flags and standard macro definitions. # CDEFS = $(NO_USLEEP) $(REMNAME) $(SIGRET) \ $(X11INCDIR) $(XVIEWINCDIR) CFLAGS = -g $(CDEFS) -O # #========================================================================== BINARIES = sv_othello tty_othello xothello xv_othello CC = gcc -traditional -pipe STDSRCS = boardstuff.c events.c items.c makemove.c othello.c \ procs.c remark.c STDOBJS = boardstuff.o events.o items.o makemove.o othello.o \ procs.o remark.o GSRCS = sunview.c tty.c x11.c xview.c HDRS = color.h extern.h images.h othello.h patchlevel.h IMAGES = black.icon othello.icon othello.color.icon white.icon \ button.invert.icon button.normal.icon button.stencil.icon \ cycle.glyph.icon cycle.linvert.icon cycle.rinvert.icon \ cycle.stencil.icon hglass.cursor nocur.cursor OTHERS = CHANGES README TODO othello.1 othello.remarks Makefile SFILES1 = $(STDSRCS) SFILES2 = $(HDRS) $(OTHERS) SFILES3 = $(GSRCS) SFILES4 = $(IMAGES) 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_othello $(STDOBJS) sunview.o $(SVIEWLIBS) # $(CC) -o sv_othello $(CFLAGS) $(STDOBJS) sunview.o $(SVIEWLIBS) -cp sv_othello othello tty: $(STDOBJS) tty.o $(CC) -o tty_othello $(CFLAGS) $(STDOBJS) tty.o $(TTYLIBS) -cp tty_othello othello x11: $(STDOBJS) x11.o $(CC) -o xothello $(X11LIBDIR) $(CFLAGS) $(STDOBJS) x11.o \ $(X11LIBS) -cp xothello othello xview: $(STDOBJS) xview.o $(CC) -o xv_othello $(XVIEWLIBDIR) $(CFLAGS) $(STDOBJS) \ xview.o $(XVIEWLIBS) -cp xv_othello othello install: install -s -m 751 othello $(BINDIR) install -c -m 644 othello.remarks $(LIBDIR) install -c -m 644 othello.1 $(MANDIR)/othello.$(MANSECT) clean:; rm -f *.o Part* *~ $(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) shar:; shar.script $(SFILES1) > Part1 shar.script $(SFILES2) > Part2 shar.script $(SFILES3) > Part3 shar.script $(SFILES4) > Part4 create: SCCS -sccs create $(STDSRCS) $(GSRCS) $(HDRS) $(IMAGES) $(OTHERS) SCCS: mkdir SCCS chmod 755 SCCS boardstuff.o: boardstuff.c color.h othello.h extern.h events.o: events.c othello.h color.h extern.h items.o: items.c color.h othello.h extern.h makemove.o: makemove.c othello.h extern.h othello.o: othello.c othello.h color.h patchlevel.h procs.o: procs.c color.h othello.h extern.h remark.o: remark.c othello.h extern.h sunview.o: sunview.c othello.h color.h extern.h images.h $(IMAGES) tty.o: tty.c othello.h color.h extern.h x11.o: x11.c othello.h color.h extern.h images.h $(IMAGES) xview.o: xview.c othello.h color.h extern.h images.h $(IMAGES)