home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
games
/
volume14
/
okbridge2
/
part12
/
Makefile
< prev
next >
Wrap
Makefile
|
1993-01-27
|
8KB
|
235 lines
# makefile for Okbridge 1.7
#
# Copyright (C) 1990-1992 by Matthew Clegg. All Rights Reserved
#
# OKbridge is made available as a free service to the Internet.
# Accordingly, the following restrictions are placed on its use:
#
# 1. OKbridge may not be modified in any way without the explicit
# permission of Matthew Clegg.
#
# 2. OKbridge may not be used in any way for commercial advantage.
# It may not be placed on for-profit networks or on for-profit
# computer systems. It may not be bundled as part of a package
# or service provided by a for-profit organization.
#
# If you have questions about restrictions on the use of OKbridge,
# write to mclegg@cs.ucsd.edu.
#
# DISCLAIMER: The user of OKbridge accepts full responsibility for any
# damage which may be caused by OKbridge.
#
# In general the okbridge program can be compiled simply by
# typing 'make'. If you are planning to install okbridge in
# a public directory, then you may want to first change the
# values of the variables OKBRIDGE_DIR and OKBRIDGE_HELPFILE.
# Then, type 'make install'.
OKBRIDGE_DIR = /usr/local/games
OKBRIDGE_HELPFILE = /usr/local/games/okbridge.help
INSTALL = /usr/bin/install
# Thanks to George Ferguson of the University of Rochester, we now have
# a set of manual pages for okbridge. To install these, change the
# following definitions as appropriate and type "make install.man"
MANDIR = /usr/local/man/man6
MANEXT = 6
# MACHINE SPECIFIC INFORMATION:
#
# Okbridge has been compiled and run successfully on the following systems:
#
# Machine OS Changes to Makefile
# ------- -- -------------------
# Decstation 3100,5000 ULTRIX V4.0 & 4.2 none
# HP 400 apollo 4.3 bsd PWCOMMENT = -DNO_PWCOMMENT
# IBM RS/6000 AIX 3.1 MACHINE_FLAGS = -DAIX
# IBM RT Modified BSD none
# NeXTStation NextStep 2.1 none
# Sun Sparcstation SunOS 4.1.x none
# Vax 2000 & 3100 BSD UNIX 4.3 none
#
#
# If you are compiling with SunOS (version 4.0 or later), then you may wish
# to uncomment the following two lines. This slightly alters the behavior
# of the curses interface.
#MACHINE_FLAGS = -DSUNOS
#CC = /usr/5bin/cc
#
# If you are compiling this program on a machine which is
# running IBM's AIX operating system, then uncomment the
# next line:
#MACHINE_FLAGS = -DAIX
#
# If you are running on an HP/UX system, you may need to uncomment
# the following line:
#MACHINE_FLAGS = -DHPUX
#
# If you are compiling this program on a machine which does not
# have strcasecmp and strncasecmp, then you will need to uncomment
# the following line (this is not necessary if you are using
# SunOS or a recent version of Ultrix):
#STRCASECMP = -DNO_STRCASECMP
#
# A few machines do not provide the name of the time zone when returning
# the system time through the localtime() call. Typically, this will
# cause a compile time error in network.c near line 600. If you have such
# a machine, then you will want to uncomment the following line:
#TIMEZONE = -DNO_TM_ZONE
#
# Some other machines do not store the 'gecos' field in the password file
# file entry. If the player has not specified his/her name using the
# FULLNAME field in the .okbridgerc file, then we try to extract his
# name from the gecos field. This is used in listing the current bridge
# players in the GPS. If your machine cannot compile this code, then
# you will get a compile time error in network.c near line 500. You
# should then uncomment the following line:
#PWCOMMENT = -DNO_PWCOMMENT
#
FLAGS = $(STRCASECMP) $(TIMEZONE) $(MACHINE_FLAGS) $(PW_COMMENT)
# The following flags may be useful if you have modified the okbridge
# program and you need assistance debugging it:
#
# CFLAGS = -g -DDEBUG -DLOGFILE -DMDEBUG
# MFLAGS = /usr/lib/debug/malloc.o
#
# CFLAGS = $(FLAGS) -g -DDEBUG -DLOGFILE
# CFLAGS = $(FLAGS) -g -DDEBUG
# CFLAGS = -g
# CC = gcc
CFLAGS = -O $(FLAGS)
# Sun people might like to define this to get pure executables.
# pure = all code is in the binary
# non-pure = code may use shared libs, and be demand-paged
# The advatages about pure code, is that you needn't worry about having the
# right version of the shared libs (important if run different versions
# of the os), and if you store the binary on NFS, you aren't swapping
# code over the network. Disadvantages is that the size of pure code is
# bigger, and might use more virtual mem (not using shared libs).
#
# For gcc on SunOS
# LDFLAGS= -static -n
# For cc on SunOS
# LDFLAGS= -Bstatic -n
OBJ = bridge.o input.o display.o terminal.o network.o help.o scoring.o\
boards.o cipher.o rc.o protocol.o parser.o nonstd.o socket.o\
gps.o ccdef.o commands.o conversation.o cs.o log.o
SHUFFLEOBJ = okshuffle.o nonstd.o boards.o cipher.o scoring.o
TALLYOBJ = oktally.o nonstd.o boards.o cipher.o scoring.o log.o
GPSOBJ = gps_server.o socket.o boards.o nonstd.o cipher.o scoring.o
GPSSRC = ../gps-1.1/gps_server.c
GPS = ../gps-1.1/gps_server
all: okbridge okshuffle oktally
okbridge: $(OBJ)
$(CC) $(LDFLAGS) -o okbridge $(OBJ) -lcurses -ltermcap $(MFLAGS)
okshuffle: $(SHUFFLEOBJ) types.h boards.h
$(CC) $(LDFLAGS) -o okshuffle $(SHUFFLEOBJ)
oktally: $(TALLYOBJ) types.h
$(CC) $(LDFLAGS) -o oktally $(TALLYOBJ)
gps_server: $(GPSOBJ) $(GPSSRC)
$(CC) $(LDFLAGS) -o gps_server $(GPSOBJ)
cp gps_server $(GPS)
install: install.bin install.help
install.bin: okbridge okshuffle oktally
strip okbridge
strip okshuffle
strip oktally
$(INSTALL) okbridge $(OKBRIDGE_DIR)/okbridge
$(INSTALL) okshuffle $(OKBRIDGE_DIR)
$(INSTALL) oktally $(OKBRIDGE_DIR)
install.help:
$(INSTALL) -c -m 644 okbridge.help $(OKBRIDGE_HELPFILE)
install.man:
install -c -m 0644 okbridge.man $(MANDIR)/okbridge.$(MANEXT)
install -c -m 0644 okshuffle.man $(MANDIR)/okshuffle.$(MANEXT)
install -c -m 0644 oktally.man $(MANDIR)/oktally.$(MANEXT)
clean:
rm -f *.o
rm -f *~
rm -f tmp*
rm -f *.log
rm -f *.zlog
rm -f *.orig
veryclean: clean
rm -f okbridge okshuffle oktally gps_server helpfile.h core tags TAGS
distrib: veryclean
csh -f < MkDistrib
bridge.o: bridge.c state.h types.h network.h protocol.h\
display.h input.h terminal.h help.h scoring.h parser.h\
conversation.h
boards.o: boards.c boards.h types.h cipher.h boards.h socket.h\
parser.h protocol.h network.h scoring.h
ccdef.o: ccdef.c
cipher.o: cipher.h cipher.c
commands.o: commands.h commands.c types.h parser.h state.h terminal.h \
display.h input.h gps.h network.h
conversation.o: conversation.h conversation.c types.h protocol.h network.h
cs.o: cs.h cs.c socket.h state.h types.h network.h protocol.h gps.h
display.o: display.h display.c terminal.h types.h state.h
gps.o: gps.h gps_info.h parser.h gps.c conversation.h
gps_server.o: $(GPSSRC) types.h boards.h gps_info.h socket.h
cp $(GPSSRC) gps_server.c
$(CC) -c $(CFLAGS) gps_server.c
rm gps_server.c
help.o: help.h help.c types.h input.h terminal.h helpfile.h
input.o: input.h input.c network.h terminal.h display.h\
help.h input.h protocol.h state.h types.h conversation.h
log.o: log.h log.c boards.h
network.o: network.h network.c state.h types.h protocol.h socket.h
nonstd.o: nonstd.c
parser.o: parser.h parser.c
protocol.o: protocol.h parser.h protocol.c types.h
rc.o: rc.h rc.c types.h parser.h state.h network.h
scoring.o: scoring.h scoring.c state.h types.h
socket.o: socket.h socket.c
startup.o: state.h types.h parser.h
terminal.o: terminal.h terminal.c
helpfile.h:
echo 'char *help_file_name="'$(OKBRIDGE_HELPFILE)'";' \
> helpfile.h