1#this is only for very very old hpux 2#for newer ise imakefile!! 3#uncoment this to enable network support 4NET = -D NETSUPPORT 5#uncoment this for use shared memory 6SHM = -D MITSHM 7#uncoment following if you have internal compiler error problems 8#CCBUG = -DAVOID_HPUX_CC_BUG 9#don`t add / and spaces at end of path! 10#the directories 11SOUNDDIR = /usr/local/lib/koules 12BINDIR = /usr/bin/X11 13MANDIR = /usr/man/man6 14#uncoment following three lines for linux sound support 15SOUND = -D SOUND 16SOUNDSERVER = koules.sndsrv.hp 17INSTALLSOUND = True 18 19SOUNDOBJS = sound.o 20SOUNDDEV = /dev/audio 21INSTALL = cp 22 23 24CC = cc 25OPTIMIZE = -I/usr/lib/X11R6 -L/usr/lib/X11R5 -L/usr/lib/X11R4 -Ixlib $(CCBUG) +O3 -n 26CFLAGS = $(DEFINES) $(SHM) -DSOUNDDIR="\"$(SOUNDDIR)\"" $(SOUND) $(NET) \ 27 -DSOUNDSERVER=\"$(SOUNDDIR)/$(SOUNDSERVER)\" \ 28 -DSOUNDDIR=\"$(SOUNDDIR)\" \ 29 -DSOUNDDEV=\"$(SOUNDDEV)\" 30 31LFLAGS = 32 33PROGS = xkoules 34PROGS_O = koules.o menu.o gameplan.o font.o intro.o xlib/init.o xlib/interface.o xlib/shmbitmap.o framebuffer.o cmap-x11.o util/usleep.o rcfiles.o sound.o sock.o client.o server.o objectsio.o mygetopt.o xlib/text.o xlib/font8x8.o 35PROGS_C = koules.c menu.c gameplan.c font.c intro.c xlib/init.c xlib/interface.c xlib/shmbitmap.c framebuffer.c cmap-x11.c util/usleep.c rcfiles.c sound.c sock.c client.c server.c objectsio.c nygetopt.c xlib/text.c xlib/font8x8.c 36LIBS = -L /usr/X11R6/lib -lX11 -lXext 37 38 39all: progs $(SOUNDSERVER) 40 41progs : $(PROGS) 42 43objs: $(PROGS_O) 44 45.c.o: 46 $(CC) $(CFLAGS) $(OPTIMIZE) -c -o $*.o $< 47 48.c.s: 49 $(CC) $(CFLAGS) $(OPTIMIZE) -S -o $*.s $< 50 51.o: 52 $(CC) $(CFLAGS) $(OPTIMIZE) $(LFLAGS) -o $* $*.o $(LIBS) 53 chmod a+rs,go-w $* 54 55font.o: font.c 56 @echo please be patient. 57 @echo the font.c is big and ugly i ripped it from zgv. 58 @echo do you know about better one? 59 $(CC) $(OPTIMIZE) $(CFLAGS) -c $< 60 61koules.o: koules.c 62 $(CC) $(OPTIMIZE) $(CFLAGS) -c $< 63 64koules.sndsrv.hp.o: koules.sndsrv.hp 65 $(CC) $(OPTIMIZE) $(CFLAGS) -c $< 66 67xkoules: $(PROGS_O) 68 $(CC) $(OPTIMIZE) $(CFLAGS) $(LFLAGS) -o xkoules $(PROGS_O) $(LIBS) -lm 69 70install: $(PROG) $(SOUNDSERVER) 71 @echo "Koules directory is " $(BINDIR) 72 @: 73 @echo "Instalin man page to " $(MANDIR) 74 $(INSTALL) $(INSTBINFLAGS) xkoules $(MANDIR); 75 @: 76 @echo "Creating directory " $(BINDIR) 77 @if [ ! -d $(BINDIR) ]; then mkdir $(BINDIR); fi 78 $(INSTALL) $(INSTBINFLAGS) xkoules $(BINDIR) 79 @: 80 @if [ "$(INSTALLSOUND)" = "True" ]; \ 81 then \ 82 echo "Creating directory " $(SOUNDDIR); \ 83 if [ ! -d $(SOUNDDIR) ]; then mkdir $(SOUNDDIR); fi; \ 84 echo "Copying sound server to directory " $(SOUNDDIR); \ 85 $(INSTALL) $(INSTBINFLAGS) $(SOUNDSERVER) $(SOUNDDIR); \ 86 echo "Copying sound files into directory " $(SOUNDDIR); \ 87 cd ./sounds; set -x; \ 88 for file in *.raw; do \ 89 $(INSTALL) $(INSTDATFLAGS) $$file $(SOUNDDIR); \ 90 done; \ 91 fi 92 93clean: 94 rm -f xkoules 95 rm -f core `find . -name '*.[oas]' -print` 96 rm -f core `find . -name '*~' -print` 97 rm -f core `find . -type f -name 'core' -print` 98 99 100lint: 101 lint -Ixlib $(PROGS_C) -D_INCLUDE_HPUX_SOURCE -D_INCLUDE_POSIX_SOURCE -Ixlib -D_INCLUDE_XOPEN_SOURCE 102 103koules.o: koules.c koules.h 104 105menu.o: menu.c koules.h 106 107gameplan.o: gameplan.c koules.h 108 109font.o: font.c font.h koules.h 110 111intro.o: intro.c koules.h font.h text.h 112 113init.o: xlib/init.c xlib/../koules.h xlib/../framebuffer.h 114 115framebuffer.o: framebuffer.c koules.h 116 117cmap.o: cmap.c koules.h 118 119koules.h:xlib/interface.h xlib/input.h 120