1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
#Log is a flag to turn logging of two players on/off (default if on)
#Have to include -lbsd on SysV
OBJS= xtet42.o
LIBS= -lX11 #-lbsd
#CC=gcc
CC=cc
LIBDIR = /store/lib/xtet42
_Ver = 2.01
_Finger = /usr/bin/finger
_Lock = $(LIBDIR)/.xtet42.lock
_Unlock = $(LIBDIR)/.xtet42.unlock
_Log = $(LIBDIR)/.xtet42.log
_Hiscore = $(LIBDIR)/.xtet42.hiscore
_Hione = $(LIBDIR)/.xtet42.hiscore.single
DEFS = -D_Lock=\"$(_Lock)\" -D_Unlock=\"$(_Unlock)\" \
-D_Hiscore=\"$(_Hiscore)\" -D_Hione=\"$(_Hione)\" \
-D_Log=\"$(_Log)\" -DLog -DFINGER=\"$(_Finger)\" \
-D_Ver=\"$(_Ver)\" # -DGNUFINGER
BINDIR = /store/bin
MANDIR = /store/man/man
MANEXT = 6
#The highscore file has to (should) be sgi, so that only one (few) can
#use it
GROUP = store
CFLAGS = -O $(DEFS) -I/store/include
#CFLAGS = -O $(DEFS) -I/local/include
.c.o:
$(CC) -c $*.c $(CFLAGS)
xtet42: $(OBJS)
$(CC) -o xtet42 $(OBJS) $(LIBS) -L/store/lib
clean:
rm *.o xtet42 *~ core
install: xtet42
-strip xtet42
test -d $(BINDIR) || mkdir $(BINDIR)
rm -f $(BINDIR)/xtet42
cp xtet42 $(BINDIR)
chgrp $(GROUP) $(BINDIR)/xtet42
chmod 2755 $(BINDIR)/xtet42
test -d $(LIBDIR) || mkdir $(LIBDIR)
chgrp $(GROUP) $(LIBDIR)
rm -f $(_Unlock)
touch $(_Unlock)
chgrp $(GROUP) $(_Unlock)
chmod o-rwx $(_Unlock)
chmod g+rw $(_Unlock)
rm -f $(_Hiscore)
cp xtet42.hiscore $(_Hiscore)
chgrp $(GROUP) $(_Hiscore)
chmod o-rwx $(_Hiscore)
chmod g+rw $(_Hiscore)
rm -f $(_Hione)
cp xtet42.hiscore.single $(_Hione)
chgrp $(GROUP) $(_Hione)
chmod o-rwx $(_Hione)
chmod g+rw $(_Hione)
rm -f $(MANDIR)$(MANEXT)/xtet42.$(MANEXT)
cp xtet42.$(MANEXT) $(MANDIR)$(MANEXT)
|