VERSION="Koules v1.1c - OS/2 Beta 3.2" DEFINES=-D OS2VERSION=\"$(VERSION)\" #edit this for your architekture! #ARCH=-m386 ARCH=-m486 #ARCH=-mpentium #uncoment following for joystick support #JOYSTICK = -D JOYSTICK #requires joystick toolkit installed! #uncoment following three lines for linux sound support SOUND = -D SOUND #SOUNDSERVER = koules.sndsrv.linux #INSTALLSOUND = True #uncoment following for mouse support MOUSE = -D MOUSE #don`t add / and spaces at end of path! #directories #SOUNDDIR = /usr/local/lib/koules #BINDIR = /usr/local/bin #MANDIR = /usr/man/man6 #SOUNDOBJS = sound.o #SOUNDDEV = /dev/dsp INSTALL = install CC = gcc #OPTIMIZE = -Wall OPTIMIZE = -I os2dive -fomit-frame-pointer -O6 -ffast-math -DOS2DIVE -DASSEMBLY -D__i386__ -Zomf -Zmt OPTIMIZE1 = -I os2dive -fomit-frame-pointer -O6 -ffast-math -funroll-loops -finline-functions -DOS2DIVE -DASSEMBLY -D__i386__ -Zomf -Zmt #OPTIMIZE = -O2 -g -p #OPTIMIZE1 = -O2 -g -p CFLAGS = $(DEFINES) $(ARCH) $(JOYSTICK) -DSOUNDDIR="\"$(SOUNDDIR)\"" $(SOUND) $(MOUSE)\ -DSOUNDSERVER=\"$(BINDIR)/$(SOUNDSERVER)\" \ -DSOUNDDIR=\"$(SOUNDDIR)\" \ -DSOUNDDEV=\"$(SOUNDDEV)\" LFLAGS = -Zsys -Zmts -Zomf os2dive/koules.def PROGS = koules.exe PROGS_O = koules.obj menu.obj gameplan.obj font.obj intro.obj os2dive/pm_main.obj os2dive/init.obj os2dive/input.obj framebuffer.obj cmap.obj rcfiles.obj soundos2.obj LIBS = -ldive -los2me -lvga -lvgagl all: progs $(SOUNDSERVER) progs : $(PROGS) objs: $(PROGS_O) koules.exe: $(PROGS_O) koules.res $(CC) $(OPTIMIZE1) $(CFLAGS) $(LFLAGS) -o koules.exe $(PROGS_O) $(LIBS) -lm rc os2dive/koules $(PROGS) koules.res: os2dive/koules.rc os2dive/pm_main.h rc -r os2dive/koules font.obj: font.c @echo please be patient. @echo the font.c is big and ugly i ripped it from zgv. @echo do you know about better one? $(CC) $(OPTIMIZE1) $(CFLAGS) -c $< koules.obj: koules.c os2dive/interface.h $(CC) $(OPTIMIZE1) $(CFLAGS) -Wall -c $< menu.obj: menu.c koules.h $(CC) $(CFLAGS) $(OPTIMIZE) -Wall -c $< gameplan.obj: gameplan.c koules.h $(CC) $(CFLAGS) $(OPTIMIZE) -Wall -c $< intro.obj: intro.c koules.h font.h text.h os2dive/interface.h $(CC) $(CFLAGS) $(OPTIMIZE) -Wall -c $< soundos2.obj: soundos2.c sound.h $(CC) $(CFLAGS) $(OPTIMIZE) -Wall -c $< os2dive/pm_main.obj: os2dive/pm_main.c os2dive/interface.h \ os2dive/input.h os2dive/pm_main.h $(CC) $(CFLAGS) $(OPTIMIZE) -Wall -c -o os2dive/pm_main.obj $< os2dive/init.obj: os2dive/init.c ./koules.h os2dive/pm_main.h ./framebuffer.h \ os2dive/newbutton.c $(CC) $(CFLAGS) $(OPTIMIZE) -Wall -c -o os2dive/init.obj $< os2dive/input.obj: os2dive/input.c ./koules.h os2dive/pm_main.h $(CC) $(CFLAGS) $(OPTIMIZE) -Wall -c -o os2dive/input.obj $< framebuffer.obj: framebuffer.c koules.h os2dive/interface.h $(CC) $(CFLAGS) $(OPTIMIZE) -Wall -c $< cmap.obj: cmap.c koules.h $(CC) $(CFLAGS) $(OPTIMIZE) -Wall -c $< rcfiles.obj: rcfiles.c koules.h $(CC) $(CFLAGS) $(OPTIMIZE) -Wall -c $< install:: $(PROG) $(SOUNDSERVER) @echo "Koules directory is " $(BINDIR) @: @echo "Instalin man page to " $(MANDIR) $(INSTALL) -c $(INSTBINFLAGS) koules.svga.6 $(MANDIR); @: @echo "Creating directory " $(BINDIR) @if [ ! -d $(BINDIR) ]; then mkdir $(BINDIR); fi $(INSTALL) -c -s $(INSTBINFLAGS) koules.svga $(BINDIR) @: @if [ "$(INSTALLSOUND)" = "True" ]; \ then \ echo "Creating directory " $(SOUNDDIR); \ if [ ! -d $(SOUNDDIR) ]; then mkdir $(SOUNDDIR); fi; \ echo "Copying sound server to directory " $(SOUNDDIR); \ $(INSTALL) -c -s $(INSTBINFLAGS) $(SOUNDSERVER) $(BINDIR); \ echo "Copying sound files into directory " $(SOUNDDIR); \ cd ./sounds; set -x; \ for file in *.raw; do \ $(INSTALL) -c $(INSTDATFLAGS) $$file $(SOUNDDIR); \ done; \ fi @echo "Don't forget to remove your old koules from /usr/games/koules " @echo "and /usr/games/kouleslib " clean: rm -f koules $(SOUNDSERVER) rm -f core `find . -name '*.[oas]' -print` rm -f core `find . -name '*~' -print` rm -f core `find . -type f -name 'core' -print` indent: indent -di16 *.c *.h svgalib/*.c svgalib/*.h xlib/*.c xlib/*.h