# # Makefile for GNU othello # # Inge Wallin ingwa@isy.liu.se # # # Change the following variables to suit the situation at your own site. # # BINDIR is the directory where the executable will be placed on # `make install'. MANDIR is the manual directory and MANEXT is the # extension the manual file name will have in MANDIR. # BINDIR = /usr/local/gnu/bin MANDIR = /usr/local/man/man6 MANEXT = 6 # Choose a C compiler and the compilation flags. CC = gcc -traditional CFLAGS = -O -fstrength-reduce -fcombine-regs -fforce-mem \ -fforce-addr -fomit-frame-pointer -finline-functions #CFLAGS = -g -Wall #CC = cc #CFLAGS = -O #CFLAGS = -g # Choose a C compiler to link with. Sometimes you want to use one # compiler to compile with since it produces faster code and another # to link with since the first one doesn't produce executables with # shared libraries. This is the case with gcc and cc on the SUN. LINKCC = cc # ************************************************************* # ******** DON'T CHANGE ANYTHING BELOW THIS LINE ******** # ************************************************************* VERSION = 1.0 DISTDIR = othello-$(VERSION) DTOBJS = dumbterm.o DTLIBS = XOBJS = x11.o textwindow.o XLIBS = -lXaw -lXmu -lXt -lX11 SVOBJS = sunview.o textwindow.o SVLIBS = -lsuntool -lsunwindow -lpixrect CLOBJS = remoteterm.o remote_clnt.o remote_xdr.o CLLIBS = CUROBJS = curses.o textwindow.o CURLIBS = -lcurses -ltermcap #CURLIBS = -lcurses -ltermlib # IO for the server SERVOBJS = $(DTOBJS) SERVLIBS = $(DTLIBS) SRCS = sqlist.c global.c othello.c lowlevel.c highlevel.c \ curses.c dumbterm.c sunview.c textwindow.c SRC2 = server.c remote.x showedgeval.c testsqlist.c remoteterm.c \ oldothello.c edgeval.c edgeval.h dist_makefile Makefile HDRS = sqlist.h global.h othello.h textwindow.h io.h clib.h version.h ICONS = blackpiece.icon whitepiece.icon nopiece.icon othellotool.icon SRC3 = README TODO PORTING othello.man $(ICONS) GAMEOBJS = sqlist.o global.o othello.o lowlevel.o highlevel.o info: @echo @echo 'You can compile othello with the following interfaces using' @echo 'the following commands:' @echo @echo 'make sunview - Interface for sunview' @echo 'make dumbterm - Scrolling interface for a dumb terminal' @echo @echo 'The outfile will always be named othello.' @echo x11: $(GAMEOBJS) $(XOBJS) $(LINKCC) -o xothello $(GAMEOBJS) $(XOBJS) $(LIBS) $(XLIBS) rm -f othello ln xothello othello sunview: $(GAMEOBJS) $(SVOBJS) $(LINKCC) -o svothello $(GAMEOBJS) $(SVOBJS) $(LIBS) $(SVLIBS) rm -f othello ln svothello othello dumbterm: $(GAMEOBJS) $(DTOBJS) $(LINKCC) -o dtothello $(GAMEOBJS) $(DTOBJS) $(LIBS) $(DTLIBS) rm -f othello ln dtothello othello curses: $(GAMEOBJS) $(CUROBJS) $(LINKCC) -o curothello $(GAMEOBJS) $(CUROBJS) $(LIBS) $(CURLIBS) rm -f othello ln curothello othello client: $(GAMEOBJS) $(CLOBJS) $(LINKCC) -o othello $(GAMEOBJS) $(CLOBJS) $(LIBS) $(CLLIBS) testsqlist: testsqlist.o sqlist.o $(CC) $(CFLAGS) -o testsqlist testsqlist.o sqlist.o showedgeval: showedgeval.o edgeval.o $(CC) $(CFLAGS) -o showedgeval showedgeval.o edgeval.o SERVEROBJS = remote_svc.o remote_xdr.o server.o sqlist.o lowlevel.o \ global.o server: $(SERVEROBJS) $(SERVOBJS) $(LINKCC) -o server $(SERVEROBJS) $(SERVLIBS) clean: rm -f *.o *~ core othello xothello svothello dtothello curothello rm -f showedgeval server rm -f remote_svc.c remote_clnt.c remote_xdr.c remote.h rm -rf $(DISTDIR) install: othello othello.man cp othello $(BINDIR) cp othello.man $(MANDIR)/othello.$(MANEXT) tags: etags $(SRCS) $(HDRS) lint: lint $(SRCS) distribution: -mkdir $(DISTDIR) rm -rf $(DISTDIR)/* cp $(SRCS) $(HDRS) $(SRC3) $(DISTDIR) cp dist_makefile $(DISTDIR)/Makefile tar cvf $(DISTDIR).tar $(DISTDIR) compress $(DISTDIR).tar shar: shar $(SRCS) $(HDRS) $(SRC2) $(SRC3) > othello.shar wc: wc $(SRCS) $(HDRS) othello.o: othello.h sqlist.h global.h io.h version.h global.o: othello.h sqlist.h lowlevel.o: othello.h sqlist.h global.h io.h highlevel.o: othello.h global.h sqlist.o: sqlist.h dumbterm.o: othello.h sqlist.h global.h io.h version.h sunview.o: textwindow.h othello.h global.h io.h $(ICONS) version.h textwindow.o: textwindow.h remoteterm.o: othello.h global.h io.h remote.h curses.o: textwindow.h othello.h global.h io.h version.h testsqlist.o: sqlist.h showedgeval.o: othello.h edgeval.h server.o: remote.h othello.h sqlist.h global.h io.h edgeval.o: othello.h edgeval.h remote_svc.c remote_clnt.c remote_xdr.c remote.h: remote.x rpcgen remote.x