### These two definitions are used if you 'make install' ### the value of LIBDIR should be the same as OMEGALIB in defs.h BINDIR = $(DESTDIR)/usr/games LIBDIR = $(DESTDIR)/usr/share/games/omega-rpg ### choose your optimization level CFLAGS ?= -O2 -pipe ### One of these should be uncommented, as appropriate, unless your compiler ### does it for you. You can test this by simply trying to 'make' omega - ### it will fail if none of them are defined. If you do uncomment ### one, make sure you comment out the other definition of CFLAGS lower down OPTS = -DBSD #OPTS = -DSYSV #OPTS = -DMSDOS #OPTS = -DAMIGA ### CPP should contain the command to run the C preprocessor. #CPP = cc -E #CPP = /lib/cpp CPP = gcc -E ### define a compiler CC = gcc ### Select one of the following that is appropriate for your curses... ### Comment ALL of them out if you are using opcurses #LIBS = -lncurses -ltermcap #LIBS = -lcurses -ltermlib #LIBS = -lpdcurses #Linux links in term?? automatically. LIBS = -lncurses ### uncomment to use "op-curses" package #OPDEF = -DUSE_OPCURSES #CUROBJ = ../opcurses/curses.o ../opcurses/curgtk.o ### uncomment to compile using opcurses GTK+ driver #CPPFLAGS = `gtk-config --cflags` -DUSE_OPCURSES #LDFLAGS = `gtk-config --libs` #################### that's it for changing the Makefile #################### OLIBSTUFF = tools/libsrc/maps.dat lib/maps.dat TOOLS = tools/crypt tools/decrypt tools/makedate CLROBJ = clrgen.o OBJ = omega.o abyss.o aux1.o aux2.o aux3.o bank.o char.o city.o\ command1.o command2.o command3.o country.o effect1.o\ effect2.o effect3.o etc.o env.o file.o gen1.o gen2.o guild1.o guild2.o\ house.o init.o inv.o item.o itemf1.o itemf2.o itemf3.o lev.o map.o\ mmelee.o mmove.o mon.o move.o movef.o mspec.o mstrike.o mtalk.o\ newrand.o priest.o pdump.o save.o scr.o site1.o site2.o spell.o\ stats.o time.o trap.o util.o village.o all: maps.dat omega .c.o: $(CC) $(CFLAGS) $(CPPFLAGS) $(OPTS) $< -c -o $@ omega: $(CUROBJ) $(CLROBJ) $(OBJ) $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) $(CUROBJ) $(CLROBJ) $(OBJ) $(LIBS) -o omega #rm date.c date.o date.c: tools/makedate > date.c maps.dat: cd tools; make cd tools/libsrc; make maps.dat install: omega maps.dat mkdir -p $(BINDIR) $(LIBDIR) cp omega $(BINDIR)/omega-rpg chmod 4711 $(BINDIR)/omega-rpg - cp lib/* $(LIBDIR) cp lib/maps.dat $(LIBDIR) chmod 0644 $(LIBDIR)/help*.txt $(LIBDIR)/license.txt $(LIBDIR)/motd.txt $(LIBDIR)/thanks.txt $(LIBDIR)/update.txt chmod 0600 $(LIBDIR)/abyss.txt $(LIBDIR)/scroll[1234].txt $(LIBDIR)/maps.dat chmod 0600 $(LIBDIR)/omega.hi $(LIBDIR)/omega.log $(LIBDIR)/omega.hi.backup install_not_suid: omega maps.dat mkdir -p $(BINDIR) $(LIBDIR) cp omega $(BINDIR)/omega-rpg chmod 0711 $(BINDIR)/omega-rpg - cp lib/* $(LIBDIR) cp maps.dat $(LIBDIR) chmod 0644 $(LIBDIR)/help*.txt $(LIBDIR)/license.txt $(LIBDIR)/motd.txt $(LIBDIR)/thanks.txt $(LIBDIR)/update.txt chmod 0644 $(LIBDIR)/abyss.txt $(LIBDIR)/scroll[1234].txt $(LIBDIR)/*.dat chmod 0666 $(LIBDIR)/omega.hi $(LIBDIR)/omega.log chmod 0600 $(LIBDIR)/omega.hi.backup clean: rm -f $(OBJ) $(CLROBJ) clrgen.h clrgen.c clrgen.o genclr.o genclr test omega cd tools; $(MAKE) clean cd tools/libsrc; $(MAKE) clean cd lib; $(MAKE) clean distclean: rm -f $(OBJ) $(CUROBJ) $(TOOLS) $(OLIBSTUFF) clrgen.h clrgen.c clrgen.o genclr.o genclr test omega cp lib/omega.hi.backup lib/omega.hi cp lib/omega.log.backup lib/omega.log $(CUROBJ): ../opcurses/curses.h ../opcurses/cmacros.h ../opcurses/xcurses.h $(CLROBJ): clrgen.c $(OBJ): defs.h extern.h glob.h iinit.h minit.h clrgen.h clrgen.c: clrgen.h clrgen.h: genclr minit.h defs.h $(CPP) $(OPDEF) -DOMEGA_CLRGEN *.[ch] | ./genclr clrgen.c clrgen.h genclr: genclr.o $(CC) $(LDFLAGS) genclr.o -o genclr