1# 2# Makefile for CHESS 3# 4# Copyright (C) 1986, 1987, 1988 Free Software Foundation, Inc. 5# 6# This file is part of CHESS. 7# 8# CHESS is distributed in the hope that it will be useful, 9# but WITHOUT ANY WARRANTY. No author or distributor 10# accepts responsibility to anyone for the consequences of using it 11# or for whether it serves any particular purpose or works at all, 12# unless he says so in writing. Refer to the CHESS General Public 13# License for full details. 14# 15# Everyone is granted permission to copy, modify and redistribute 16# CHESS, but only under the conditions described in the 17# CHESS General Public License. A copy of this license is 18# supposed to have been given to you along with CHESS so you 19# can know your rights and responsibilities. It should be in a 20# file named COPYING. Among other things, the copyright notice 21# and this notice must be preserved on all copies. 22# 23# 24# gnuchess will be the alpha-display version (with curses/termcap) 25# gnuchessr will be the non-display version (for dumb terminals and 26# for use with SUN's chesstool and X-window's xchess. 27# To use with latter, add -DCHESSTOOL to the gnuchess.o/nondsp.o 28# compilation lines (e.g. cc -O -DCHESSTOOL ...) 29# 30NEW=move.o 31CFLAGS= -O -DNEWMOVE=12 32all : gnuchess #gnuchessr 33MAN= chess.0 34 35gnuchess: gnuchess.o uxdsp.o $(NEW) 36 $(CC) $(CFLAGS) -o gnuchess gnuchess.o uxdsp.o $(NEW) \ 37 -lcurses -ltermlib -lcompat 38 39gnuchessr: gnuchess.o nondsp.o $(NEW) 40 $(CC) $(CFLAGS) -o gnuchessr gnuchess.o nondsp.o $(NEW) -lcompat 41 42gnuchess.o: gnuchess.c 43 $(CC) $(CFLAGS) -c gnuchess.c 44 45move.o: move.c 46 $(CC) $(CFLAGS) -c move.c 47 48uxdsp.o: uxdsp.c 49 $(CC) $(CFLAGS) -c uxdsp.c 50 51nondsp.o: nondsp.c 52 $(CC) $(CFLAGS) -c nondsp.c 53 54distribution: 55 tar cf - gnuchess.h gnuchess.c move.h move.c uxdsp.c nondsp.c Xchess gnuchess.book DOCUMENTATION Makefile > gnuchess.tar 56 compress gnuchess.tar 57 58install: ${MAN} 59 install -s -o games -g bin -m 4700 gnuchess ${DESTDIR}/usr/games/hide/chess 60 (cd ${DESTDIR}/usr/games; rm -f chess; ln -s dm chess; chown games.bin chess) 61 install -c -o bin -g bin -m 444 gnuchess.book /usr/games/lib 62 install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat6 63 64# cp gnuchessr /usr/games/gnuchess.chesstool 65# cp gnuchess /usr/games/gnuchess 66# cp gnuchess.book /usr/games/lib/gnuchess.book 67 68clean: 69 -rm gnuchess gnuchessr *.o 70 71