forked from brentjohnson/xconq
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.in
363 lines (303 loc) · 8.25 KB
/
Makefile.in
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
# Top-level makefile for Xconq kernel and interfaces.
# Copyright (C) 1991-1995, 1998-2000 Stanley T. Shebs.
# Copyright (C) 2003-2005 Eric A. McDonald.
# Xconq is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
datadir = @xconq_data_dir@
mandir = @mandir@
man6dir = $(mandir)/man6
infodir = @infodir@
docdir = $(datadir)/doc
gamelibdir = $(datadir)/lib
imagesdir = $(datadir)/images
tcltkdir = $(datadir)/tcltk
BWidgetdir = $(datadir)/tcltk/BWidget
BWidgetimagesdir = $(datadir)/tcltk/BWidget/images
BWidgetlangdir = $(datadir)/tcltk/BWidget/lang
scoresdir = @scoresdir@
srcdir = @srcdir@
VPATH = @srcdir@
GAMEUID = @gameuser@
GAMEGRP = @gamegrp@
GAMEPERM = 04755
DIRPERM = 0755
FILEPERM = 0644
SHELL = /bin/sh
INSTALL = install -c
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL) -m 644
SUBDIRS = kernel \
x11 \
curses \
tcltk \
sdl \
lib \
images \
doc \
test \
misc
CC = @CXX@
CXX = @CXX@
CFLAGS = @CXXFLAGS@
CXXFLAGS = @CXXFLAGS@
RANLIB = ranlib
AR = ar
AR_FLAGS = rcu
ALLTARGET = all-@CONFIGTARGET@
INSTALLTARGET = install-@CONFIGTARGET@
# Host and target-dependent makefile fragments come in here.
####
# End of host and target-dependent makefile fragments
FLAGS_TO_PASS = \
"prefix=$(prefix)" \
"exec_prefix=$(exec_prefix)" \
"bindir=$(bindir)" \
"datadir=$(datadir)" \
"scoresdir=$(scoresdir)" \
"AR=$(AR)" \
"AR_FLAGS=$(AR_FLAGS)" \
"CC=$(CC)" \
"CFLAGS=$(CFLAGS)" \
"REQD_CFLAGS=$(REQD_CFLAGS)" \
"CXX=$(CXX)" \
"CXXFLAGS=$(CXXFLAGS)" \
"RANLIB=$(RANLIB)" \
"MAKEINFO=$(MAKEINFO)" \
"INSTALL=$(INSTALL)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"INSTALL_DATA=$(INSTALL_DATA)"
UI_TARGET = @UI_TARGET@
all: all-$(UI_TARGET)
all-xconq: all-$(UI_TARGET)
all-tkconq all-sdlconq all-cconq all-tcltk all-SelFile all-kernel:
# Target for building Tcl/Tk Xconq.
all-tkconq: all-tcltk all-tcl all-tk
@dir=tcltk; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) all-xconq); \
else \
true; \
fi
# Target for building SDL Xconq.
all-sdlconq: all-sdl
@dir=sdl; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) all-xconq); \
else \
true; \
fi
# Target for building Curses Xconq
all-cconq:
@dir=curses; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) all); \
else \
true; \
fi
all-tcltk:
@dir=`echo $@ | sed -e 's/all-//'`; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) all-libs); \
else \
true; \
fi
all-sdl:
@dir=`echo $@ | sed -e 's/all-//'`; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) all-libs); \
else \
true; \
fi
all-kernel:
@dir=`echo $@ | sed -e 's/all-//'`; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) all); \
else \
true; \
fi
all-SelFile:
@dir=`echo $@ | sed -e 's/all-//'`; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) all); \
else \
true; \
fi
all-tcl:
@dir=`echo $@ | sed -e 's/all-//'`; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) all); \
else \
true; \
fi
all-tk:
@dir=`echo $@ | sed -e 's/all-//'`; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) all); \
else \
true; \
fi
installcheck:
check: force
cd kernel && make skelconq
@if [ -f test/Makefile ]; then \
rootme=`pwd`; export rootme; \
cd test; \
$(MAKE) $(TARGET_FLAGS_TO_PASS) check; \
else true; fi
info dvi html install-info clean-info clean-dvi clean-html: force
@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=doc" subdir_do
install: all install-$(UI_TARGET)
install-only: install-$(UI_TARGET)
install-xconq: all install-$(UI_TARGET)
install-tkconq: all-tkconq install-lib install-images install-dirs
@dir=tcltk; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) install-xconq); \
else \
true; \
fi
install-sdlconq: all-sdlconq install-lib install-images install-dirs
@dir=sdl; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) install-xconq); \
else \
true; \
fi
install-cconq: all-cconq install-lib install-dirs
@dir=curses; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) install-cconq); \
else \
true; \
fi
install-lib: install-dirs
@dir=lib; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) install-only); \
else \
true; \
fi
install-images: install-dirs
@dir=images; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) install-only); \
else \
true; \
fi
MAKEDIRS= \
$(prefix) \
$(exec_prefix) \
$(bindir) \
$(datadir) \
$(gamelibdir) \
$(imagesdir) \
$(scoresdir) \
$(mandir) \
$(man6dir) \
$(infodir) \
$(tcltkdir) \
$(BWidgetdir) \
$(BWidgetimagesdir) \
$(BWidgetlangdir)
.PHONY: install-dirs
install-dirs:
@for i in $(MAKEDIRS) ; do \
echo Making $$i... ; \
parent=`echo $$i | sed -e 's@/[^/]*$$@@' | sed -e 's@^$$@/@'`; \
if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
if [ ! -d $$i ] ; then \
if mkdir $$i ; then \
true ; \
else \
exit 1 ; \
fi ; \
else \
true ; \
fi ; \
done
chown $(GAMEUID) $(scoresdir)
chgrp $(GAMEGRP) $(scoresdir)
chmod $(DIRPERM) $(scoresdir)
# Build a source distribution.
DIST_VERSION=@XCONQ_VERSION_FULL@
DIST_NAME=xconq-$(DIST_VERSION)
dist: info html check-cvs
(cd .. && \
cvs -z3 -d`cat xconq/CVS/Root` export -d $(DIST_NAME) -r HEAD xconq && \
cp xconq/doc/*.info xconq/doc/*.html $(DIST_NAME)/doc && \
tar czvf $(DIST_NAME).tar.gz $(DIST_NAME) && \
rm -rf $(DIST_NAME))
bz2dist: info html check-cvs
(cd .. && \
cvs -z3 -d`cat xconq/CVS/Root` export -d $(DIST_NAME) -r HEAD xconq && \
cp xconq/doc/*.info xconq/doc/*.html $(DIST_NAME)/doc && \
tar cjvf $(DIST_NAME).tar.bz2 $(DIST_NAME) && \
rm -rf $(DIST_NAME))
lzmadist: info html check-cvs
(cd .. && \
cvs -z3 -d`cat xconq/CVS/Root` export -d $(DIST_NAME) -r HEAD xconq && \
cp xconq/doc/*.info xconq/doc/*.html $(DIST_NAME)/doc && \
7z a $(DIST_NAME).7z -r $(DIST_NAME) && \
rm -rf $(DIST_NAME))
check-cvs:
@if [ ! -d CVS ]; then exit 1; fi; \
if [ ! -f CVS/Root ]; then exit 1; fi; \
true
clean:
@$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do
distclean: clean
@$(MAKE) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(SUBDIRS)" subdir_do
rm -f Makefile config.status config.cache
extraclean: distclean
rm -f *~* .*~* #* %*
rm -f */*~* */.*~* */#* */%*
rm -f Makefile config.status
realclean: distclean
@$(MAKE) $(FLAGS_TO_PASS) DO=realclean "DODIRS=$(SUBDIRS)" subdir_do
rm -f Makefile
subdir_do: force
@srcroot=`cd $(srcdir); pwd`; export srcroot; \
for i in $(DODIRS); do \
if [ -f ./$$i/Makefile ] ; then \
if (cd ./$$i && \
$(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
else exit 1 ; fi ; \
else true ; fi ; \
done
Makefile: Makefile.in $(host_makefile_frag) $(target_makefile_frag)
$(SHELL) ./config.status
force: