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
|
###########################################################################
## Makefile for xtris, version 1.0 ##
## by Roger Espel Llima <roger.espel.llima@pobox.com> ##
###########################################################################
###################
## Configuration ##
###################
# change this to your favorite ANSI C compiler
CC = gcc
# change this to the directory where you want the xtris binaries installed
BINDIR = /usr/games
# change this to the directory where you want the xtris manpages installed
MANDIR = /usr/share/man
# change according to taste and local custom...
CFLAGS = -O3 -D__USE_FIXED_PROTOTYPES__
# on Solaris and similar systems, you'll need to uncomment this:
# EXTRALIBS = -lnsl -lsocket
# specify X11 libdir if your system needs it
XLIBDIR = -L/usr/X11R6/lib
###########################################################################
## You shouldn't need to change anything past this. ##
###########################################################################
XLIBS = -lX11
all: xtris xtserv xtbot
xtris: xtris.c
$(CC) $(CFLAGS) -DXTRISPATH="\"$(BINDIR)\"" xtris.c -o xtris $(XLIBDIR) $(XLIBS) $(EXTRALIBS)
xtserv: xtserv.c
$(CC) $(CFLAGS) xtserv.c -o xtserv $(EXTRALIBS)
xtbot: xtbot.o decide.o
$(CC) $(CFLAGS) xtbot.o decide.o -o xtbot $(EXTRALIBS)
clean:
rm -f xtris xtserv xtbot core xtbot.o decide.o
install: xtris xtserv xtbot
-strip xtris xtserv xtbot
-mkdir $(PREFIX)/$(BINDIR) 2>/dev/null
-mkdir -p $(PREFIX)/$(MANDIR) 2>/dev/null
-mkdir $(PREFIX)/$(MANDIR)/man6 2>/dev/null
cp xtris xtserv xtbot $(PREFIX)/$(BINDIR)
chmod 755 $(PREFIX)/$(BINDIR)/xtris $(PREFIX)/$(BINDIR)/xtserv $(PREFIX)/$(BINDIR)/xtbot
cp xtris.6 xtserv.6 xtbot.6 $(PREFIX)/$(MANDIR)/man6
chmod 644 $(PREFIX)/$(MANDIR)/man6/xtris.6 $(PREFIX)/$(MANDIR)/man6/xtserv.6 $(PREFIX)/$(MANDIR)/man6/xtbot.6
tar:
rm -f xtris.tar.gz
mv -f Makefile Makefile.local
cp Makefile.dist Makefile
cd .. ; tar cf xtris/xtris.tar xtris/Makefile xtris/Makefile.dist xtris/README xtris/ChangeLog xtris/COPYING xtris/PROTOCOL xtris/xtris.lsm xtris/xtris.c xtris/xtserv.c xtris/xtbot.c xtris/xtbot.h xtris/decide.c xtris/decide.h xtris/xtris.6 xtris/xtserv.6 xtris/xtbot.6 ; gzip -9 xtris/xtris.tar
mv -f Makefile.local Makefile
|