forked from slacy/empire
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
130 lines (105 loc) · 3.14 KB
/
Makefile
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#
# Copyright (C) 1987, 1988 Chuck Simmons
#
# See the file COPYING, distributed with empire, for restriction
# and warranty information.
VERS=1.13
# Use -g to compile the program for debugging.
#DEBUG = -g -DDEBUG
DEBUG = -O3
# Use -p to profile the program.
#PROFILE = -p -DPROFILE
PROFILE =
LIBS = -lncurses
# You shouldn't have to modify anything below this line.
# There's a dynamic format in the object-display routines; suppress the warning
CFLAGS = $(DEBUG) $(PROFILE) -fcommon -Wall -Wno-format-security
FILES = \
attack.c \
compmove.c \
data.c \
display.c \
edit.c \
empire.c \
game.c \
main.c \
map.c \
math.c \
object.c \
term.c \
usermove.c \
util.c
HEADERS = empire.h extern.h
OFILES = \
attack.o \
compmove.o \
data.o \
display.o \
edit.o \
empire.o \
game.o \
main.o \
map.o \
math.o \
object.o \
term.o \
usermove.o \
util.o
all: vms-empire
vms-empire: $(OFILES)
$(CC) $(PROFILE) -o vms-empire $(OFILES) $(LIBS)
attack.o:: extern.h empire.h
compmove.o:: extern.h empire.h
data.o:: empire.h
display.o:: extern.h empire.h
edit.o:: extern.h empire.h
empire.o:: extern.h empire.h
game.o:: extern.h empire.h
main.o:: extern.h empire.h
map.o:: extern.h empire.h
math.o:: extern.h empire.h
object.o:: extern.h empire.h
term.o:: extern.h empire.h
usermove.o:: extern.h empire.h
util.o:: extern.h empire.h
empire.6: vms-empire.xml
xmlto man vms-empire.xml
vms-empire.html: vms-empire.xml
xmlto html-nochunks vms-empire.xml
TAGS: $(HEADERS) $(FILES)
etags $(HEADERS) $(FILES)
lint: $(FILES)
lint -u -D$(SYS) $(FILES) -lcurses
# cppcheck should run clean
cppcheck:
cppcheck --inline-suppr --suppress=unusedStructMember --suppress=unusedFunction --template gcc --enable=all --force *.[ch]
install: empire.6 uninstall
install -m 0755 -d $(DESTDIR)/usr/bin
install -m 0755 -d $(DESTDIR)/usr/share/man/man6
install -m 0755 -d $(DESTDIR)/usr/share/applications/
install -m 0755 -d $(DESTDIR)/usr/share/icons/hicolor/48x48/apps/
install -m 0755 -d $(DESTDIR)/usr/share/appdata
install -m 0755 vms-empire $(DESTDIR)/usr/bin/
install -m 0644 empire.6 $(DESTDIR)/usr/share/man/man6/vms-empire.6
install -m 0644 vms-empire.desktop $(DESTDIR)/usr/share/applications/
install -m 0644 vms-empire.png $(DESTDIR)/usr/share/icons/hicolor/48x48/apps/
install -m 0644 vms-empire.xml $(DESTDIR)/usr/share/appdata/
uninstall:
rm -f /usr/bin/vms-empire /usr/share/man/man6/vms-empire.6
rm -f /usr/share/applications/vms-empire.desktop
rm -f /usr/share/icons/hicolor/48x48/apps/vms-empire.png
rm -f /usr/share/appdata/vms-empire.xml
clean:
rm -f *.o TAGS vms-empire
rm -f *.6 *.html
clobber: clean
rm -f vms-empire vms-empire-*.tar*
SOURCES = README HACKING NEWS control empire.6 vms-empire.xml COPYING Makefile BUGS AUTHORS $(FILES) $(HEADERS) vms-empire.png vms-empire.desktop
vms-empire-$(VERS).tar.gz: $(SOURCES)
@ls $(SOURCES) | sed s:^:vms-empire-$(VERS)/: >MANIFEST
@(cd ..; ln -s vms-empire vms-empire-$(VERS))
(cd ..; tar -czf vms-empire/vms-empire-$(VERS).tar.gz `cat vms-empire/MANIFEST`)
@(cd ..; rm vms-empire-$(VERS))
dist: vms-empire-$(VERS).tar.gz
release: vms-empire-$(VERS).tar.gz vms-empire.html
shipper version=$(VERS) | sh -e -x