# binaries will be installed in $(LOCALDIR)/bin/ # man page will be installed in $(LOCALDIR)/man/man1/ # score file will be created in $(LOCALDIR)/share/qix/ LOCALDIR= /usr/X11R6 # location of X11 libraries X11LIB= /usr/X11R6/lib # location of X11 includes X11INC= /usr/X11R6/include #location of local X11 fonts X11FNT= /usr/X11R6/lib/X11/fonts/local #compilation options #CFLAGS= -O -Wall # nothing to be edited below. COMMON_OBJS= qix.o score.o O_OBJS= vt100.o $(COMMON_OBJS) X_OBJS= x11.o $(COMMON_OBJS) GAMEDIR= $(LOCALDIR)/share/qix LOCK_FILE= $(GAMEDIR)/qix.lck SCORE_FILE= $(GAMEDIR)/qix.score .if !defined(NO_X11) all: qix qix.bin qix.xbin fonts .else all: qix qix.bin .endif qix.bin: $(O_OBJS) $(CC) $(CFLAGS) -o qix.bin $(O_OBJS) qix.xbin: $(X_OBJS) x11.o $(CC) $(CFLAGS) -o qix.xbin $(X_OBJS) -L$(X11LIB) -lX11 qix: Makefile qix.sh sed -e s:BINDIR:$(LOCALDIR)/bin: < qix.sh > qix chmod ugo+x qix fonts: qix18.pcf.gz qix14.pcf.gz x11.o: x11.c $(CC) $(CFLAGS) -c -I$(X11INC) x11.c score.o: score.c $(CC) $(CFLAGS) -DGAMEDIR='"$(GAMEDIR)"' -DLOCK_FILE='"$(LOCK_FILE)"' -DSCORE_FILE='"$(SCORE_FILE)"' -c score.c qix18.pcf.gz: qix18.bdf bdftopcf qix18.bdf |gzip >qix18.pcf.gz qix14.pcf.gz: qix14.bdf bdftopcf qix14.bdf |gzip >qix14.pcf.gz clean: rm -f qix qix.bin qix.xbin $(O_OBJS) $(X_OBJS) install: mkdir -p $(GAMEDIR) chown root:games $(GAMEDIR) chmod g+w $(GAMEDIR) install -c qix $(LOCALDIR)/bin/ install -c qix.bin $(LOCALDIR)/bin/ .if !defined(NO_X11) install -c qix.xbin $(LOCALDIR)/bin/ install -c qix14.pcf.gz $(X11FNT) install -c qix18.pcf.gz $(X11FNT) cat fonts.alias >> $(X11FNT)/fonts.alias mkfontdir $(X11FNT) xset +fp $(X11FNT) chown root:games $(LOCALDIR)/bin/qix.xbin chmod g+s $(LOCALDIR)/bin/qix.xbin .endif if [ ! -e $(SCORE_FILE) ]; then\ install -c qix.score $(SCORE_FILE);\ chown root:games $(SCORE_FILE);\ chmod 664 $(SCORE_FILE);\ fi chown root:games $(LOCALDIR)/bin/qix.bin chmod g+s $(LOCALDIR)/bin/qix.bin install -c qix.1 $(LOCALDIR)/man/man1 mkimage: mkimage.c $(CC) -o mkimage mkimage.c images.h: mkimage ./mkimage blank-9x16.xpm blank.xpm f11-9x16.xpm f11.xpm f12-9x16.xpm f12.xpm \ f13-9x16.xpm f13.xpm f14-9x16.xpm f14.xpm f15-9x16.xpm f15.xpm \ f18-9x16.xpm f18.xpm f19-9x16.xpm f19.xpm f1c-9x16.xpm f1c.xpm \ f1d-9x16.xpm f1d.xpm f1e-9x16.xpm f1e.xpm f1f-9x16.xpm f1f.xpm \ fill-9x16.xpm fill.xpm fuse-9x16.xpm fuse.xpm qix_head-9x16.xpm \ qix_head.xpm you-9x16.xpm you.xpm >images.h tar: tar cf qix.tar Makefile qix.c score.c vt100.c x11.c qix.sh qix.1 \ fonts.alias qix14.bdf qix18.bdf qix.h images.h qix.score\