-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
112 lines (85 loc) · 2.19 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
# %W% %G% %U% - (c) Copyright 1987, 1988 Chuck Simmons
#
# Copyright (C) 1987, 1988 Chuck Simmons
#
# See the file COPYING, distributed with empire, for restriction
# and warranty information.
# Note: When the version changes, you also have to change
# the RPM spec file and the LSM.
VERS=1.2
# Change the line below for your system. If you are on a Sun or Vax,
# you may want BSD.
#SYS = BSD
SYS = SYSV
# Use -g to compile the program for debugging.
DEBUG = -g -DDEBUG
#DEBUG = -O
# Use -p to profile the program.
#PROFILE = -p -DPROFILE
PROFILE =
# Define all necessary libraries. 'curses' is necessary. 'termcap'
# is needed on BSD systems.
LIBS = -lncurses
#LIBS = -lcurses -ltermcap
# You shouldn't have to modify anything below this line.
CFLAGS = $(DEBUG) $(PROFILE) -D$(SYS)
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)
TAGS: $(HEADERS) $(FILES)
etags $(HEADERS) $(FILES)
lint: $(FILES)
lint -u -D$(SYS) $(FILES) -lcurses
clean:
rm -f *.o TAGS
clobber: clean
rm -f vms-empire vms-empire-*.tar*
SOURCES = READ.ME vms-empire.6 COPYING Makefile BUGS $(FILES) $(HEADERS) MANIFEST vms-empire.lsm vms-empire.spec
vms-empire-$(VERS).tar.gz: $(SOURCES)
@ls $(SOURCES) | sed s:^:vms-empire-$(VERS)/: >MANIFEST
@(cd ..; ln -s vms-empire vms-empire-$(VERS))
(cd ..; tar -czvf vms-empire/vms-empire-$(VERS).tar.gz `cat vms-empire/MANIFEST`)
@(cd ..; rm vms-empire-$(VERS))
vms-empire-$(VERS).shar:
shar $(SOURCES) >vms-empire-$(VERS).shar
dist: vms-empire-$(VERS).tar.gz
RPMROOT=/usr/src/redhat
RPM = rpm
RPMFLAGS = -ba
rpm: dist
cp vms-empire-$(VERS).tar.gz $(RPMROOT)/SOURCES;
cp vms-empire.spec $(RPMROOT)/SPECS
cd $(RPMROOT)/SPECS; $(RPM) $(RPMFLAGS) vms-empire.spec
cp $(RPMROOT)/RPMS/`arch|sed 's/i[4-9]86/i386/'`/vms-empire-$(VERS)*.rpm .
cp $(RPMROOT)/SRPMS/vms-empire-$(VERS)*.src.rpm .