Debian Codegraph @

Makefile

raw symbols ◀ ▶ SCIP
2 Debian patches touch this file
1 ### These two definitions are used if you 'make install'
2 ### the value of LIBDIR should be the same as OMEGALIB in defs.h
•3 BINDIR = $(DESTDIR)/usr/games
4 LIBDIR = $(DESTDIR)/usr/share/games/omega-rpg
5
6 ### choose your optimization level
•7 CFLAGS ?= -O2 -pipe
8
9 ### One of these should be uncommented, as appropriate, unless your compiler
10 ### does it for you. You can test this by simply trying to 'make' omega -
11 ### it will fail if none of them are defined. If you do uncomment
12 ### one, make sure you comment out the other definition of CFLAGS lower down
13
•14 OPTS = -DBSD
15 #OPTS = -DSYSV
16 #OPTS = -DMSDOS
17 #OPTS = -DAMIGA
18
19 ### CPP should contain the command to run the C preprocessor.
20 #CPP = cc -E
21 #CPP = /lib/cpp
22 CPP = gcc -E
23
24 ### define a compiler
25 CC = gcc
26
27 ### Select one of the following that is appropriate for your curses...
28 ### Comment ALL of them out if you are using opcurses
29 #LIBS = -lncurses -ltermcap
30 #LIBS = -lcurses -ltermlib
31 #LIBS = -lpdcurses
32 #Linux links in term?? automatically.
•33 LIBS = -lncurses
34
35 ### uncomment to use "op-curses" package
•36 #OPDEF = -DUSE_OPCURSES
37 #CUROBJ = ../opcurses/curses.o ../opcurses/curgtk.o
38
39 ### uncomment to compile using opcurses GTK+ driver
•40 #CPPFLAGS = `gtk-config --cflags` -DUSE_OPCURSES
41 #LDFLAGS = `gtk-config --libs`
42
43 #################### that's it for changing the Makefile ####################
44
45 OLIBSTUFF = tools/libsrc/maps.dat lib/maps.dat
46
47 TOOLS = tools/crypt tools/decrypt tools/makedate
48
49 CLROBJ = clrgen.o
50
51 OBJ = omega.o abyss.o aux1.o aux2.o aux3.o bank.o char.o city.o\
•52 command1.o command2.o command3.o country.o effect1.o\
53 effect2.o effect3.o etc.o env.o file.o gen1.o gen2.o guild1.o guild2.o\
54 house.o init.o inv.o item.o itemf1.o itemf2.o itemf3.o lev.o map.o\
55 mmelee.o mmove.o mon.o move.o movef.o mspec.o mstrike.o mtalk.o\
56 newrand.o priest.o pdump.o save.o scr.o site1.o site2.o spell.o\
57 stats.o time.o trap.o util.o village.o
58
59 all: maps.dat omega
60
•61 .c.o:
62 $(CC) $(CFLAGS) $(CPPFLAGS) $(OPTS) $< -c -o $@
•63
64 omega: $(CUROBJ) $(CLROBJ) $(OBJ)
•65 $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) $(CUROBJ) $(CLROBJ) $(OBJ) $(LIBS) -o omega
66 #rm date.c date.o
67
68 date.c:
69 tools/makedate > date.c
70
71 maps.dat:
72 cd tools; make
73 cd tools/libsrc; make maps.dat
74
•75 install: omega maps.dat
•76 mkdir -p $(BINDIR) $(LIBDIR)
77 cp omega $(BINDIR)/omega-rpg
78 chmod 4711 $(BINDIR)/omega-rpg
79 - cp lib/* $(LIBDIR)
•80 cp lib/maps.dat $(LIBDIR)
81 chmod 0644 $(LIBDIR)/help*.txt $(LIBDIR)/license.txt $(LIBDIR)/motd.txt $(LIBDIR)/thanks.txt $(LIBDIR)/update.txt
82 chmod 0600 $(LIBDIR)/abyss.txt $(LIBDIR)/scroll[1234].txt $(LIBDIR)/maps.dat
•83 chmod 0600 $(LIBDIR)/omega.hi $(LIBDIR)/omega.log $(LIBDIR)/omega.hi.backup
84
•85 install_not_suid: omega maps.dat
•86 mkdir -p $(BINDIR) $(LIBDIR)
87 cp omega $(BINDIR)/omega-rpg
88 chmod 0711 $(BINDIR)/omega-rpg
89 - cp lib/* $(LIBDIR)
90 cp maps.dat $(LIBDIR)
91 chmod 0644 $(LIBDIR)/help*.txt $(LIBDIR)/license.txt $(LIBDIR)/motd.txt $(LIBDIR)/thanks.txt $(LIBDIR)/update.txt
92 chmod 0644 $(LIBDIR)/abyss.txt $(LIBDIR)/scroll[1234].txt $(LIBDIR)/*.dat
93 chmod 0666 $(LIBDIR)/omega.hi $(LIBDIR)/omega.log
•94 chmod 0600 $(LIBDIR)/omega.hi.backup
95
96 clean:
•97 rm -f $(OBJ) $(CLROBJ) clrgen.h clrgen.c clrgen.o genclr.o genclr test omega
98 cd tools; $(MAKE) clean
99 cd tools/libsrc; $(MAKE) clean
100 cd lib; $(MAKE) clean
101
102 distclean:
•103 rm -f $(OBJ) $(CUROBJ) $(TOOLS) $(OLIBSTUFF) clrgen.h clrgen.c clrgen.o genclr.o genclr test omega
104 cp lib/omega.hi.backup lib/omega.hi
105 cp lib/omega.log.backup lib/omega.log
106
107 $(CUROBJ): ../opcurses/curses.h ../opcurses/cmacros.h ../opcurses/xcurses.h
108
•109 $(CLROBJ): clrgen.c
110
111 $(OBJ): defs.h extern.h glob.h iinit.h minit.h clrgen.h
112
•113 clrgen.c: clrgen.h
114
115 clrgen.h: genclr minit.h defs.h
116 $(CPP) $(OPDEF) -DOMEGA_CLRGEN *.[ch] | ./genclr clrgen.c clrgen.h
117
118 genclr: genclr.o
119 $(CC) $(LDFLAGS) genclr.o -o genclr