forked from muspellsson/omega-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.old
112 lines (85 loc) · 3.59 KB
/
Makefile.old
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
### These two definitions are used if you 'make install'
### the value of LIBDIR should be the same as OMEGALIB in defs.h
BINDIR = ./omega/
LIBDIR = ./lib/
### choose your optimization level
OFLAGS = -O2
### 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
#CFLAGS = -ggdb -std=c11 -ansi -pedantic -Wall $(OFLAGS) -DBSD -I$(CURSES)
#CFLAGS = -DSYSV $(OFLAGS)
CFLAGS = -DMSDOS $(OFLAGS) -std=c11 -ansi -pedantic -Wall -I$(CURSES)
#CFLAGS = -DAMIGA $(OFLAGS)
### CPP should contain the command to run the C preprocessor.
#CPP = cc -E
#CPP = /lib/cpp
CPP = gcc -E -I$(CURSES)
### 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
LIBS = -lncurses
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 date.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
omega: $(CLROBJ) $(OBJ)
$(CC) $(LDFLAGS) $(OFLAGS) $(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 $(BINDIR) $(LIBDIR)
cp omega $(BINDIR)
chmod 4711 $(BINDIR)/omega
- 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 0600 $(LIBDIR)/abyss.txt $(LIBDIR)/scroll[1234].txt $(LIBDIR)/maps.dat
chmod 0600 $(LIBDIR)/omega.hi $(LIBDIR)/omega.log $(LIBDIR)/omegahi.bak
install_not_suid: omega maps.dat $(BINDIR) $(LIBDIR)
cp omega $(BINDIR)
chmod 0711 $(BINDIR)/omega
- 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)/omegahi.bak
clean:
rm -f $(OBJ) clrgen.h clrgen.c genclr.o genclr omega
distclean:
rm -f $(OBJ) $(CUROBJ) $(TOOLS) $(OLIBSTUFF) clrgen.h clrgen.c genclr.o genclr 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.h
$(OBJ): defs.h extern.h glob.h iinit.h minit.h clrgen.h
clrgen.h clrgen.c: genclr.c minit.h defs.h
$(MAKE) genclr
$(CPP) $(OPDEF) -DOMEGA_CLRGEN *.[ch] | ./genclr clrgen.c clrgen.h
genclr: genclr.o
$(CC) $(LDFLAGS) genclr.o -o genclr