File: xpuzzles.Makefile

package info (click to toggle)
xpuzzles 7.4-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 13,708 kB
  • ctags: 11,321
  • sloc: ansic: 84,528; makefile: 7,268; sh: 2,730
file content (577 lines) | stat: -rw-r--r-- 11,686 bytes parent folder | download | duplicates (2)
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
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
# @(#)Makefile
#
# Copyright 1994 - 2008  David A. Bagley, bagleyd@tux.org
#
# All Rights Reserved
#
# Permission to use, copy, modify, and distribute this software and
# its documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and
# that both that copyright notice and this permission notice appear in
# supporting documentation, and that the name of the author not be
# used in advertising or publicity pertaining to distribution of the
# software without specific, written prior permission.
#
# This program is distributed in the hope that it will be "useful",
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# Master Makefile for X and Windows

# If this fails to build one may have to edit the individual Imakefiles.
# Also install the appropriate .ad file in $HOME or where ever you
# normally  put these preferences.
# To configure, build, and install in /usr/local/bin
#	make configure
#	make         # Motif version built by default
#	make run     # this cycles through all programs
#	make install # if you like them
# Any problems please consult the individual README's and let the author know.
# xdial and xthreed are more or less demos and are not built by default.

#SHELL=/bin/sh

#STUFF=abacus dial threed
STUFF=dial threed
ROTATIONAL=rubik skewb dino pyraminx oct mball
SLIDING=cubes triangles hexagons mlink barrel panex
ALTRIS=tetris tertris hextris welltris

#XT=${STUFF} ${ROTATIONAL} ${SLIDING} ${ALTRIS}
# Swap this next line in and the next line out to build xdial and xthreed
#XT=${STUFF} ${ROTATIONAL} ${SLIDING}
XT=${ROTATIONAL} ${SLIDING}
#XT=${ALTRIS}

#VER=-7.3.3

PRE=
NAME=xt.
#NAME=xpuzzles.
#NAME=xabacus.
#NAME=altris.

PROGRAMS=${XT}

# Used by me to zip and write and read from my floppy drive
UNIXDIR=./net
DOSDIR=win

all :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make;\
			cd ..;\
		fi;\
	done

win :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}/win32; then\
			cd ${PRE}$${i}${VER}/win32;\
			make;\
			cd ../..;\
		fi;\
	done

autoconf :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make -f Makefile.in distclean;\
			autoconf;\
			rm -rf autom4te.cache;\
			cd ..;\
		fi;\
	done

configure :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make -f Makefile.in distclean;\
			./configure;\
			cd ..;\
		fi;\
	done

# Use this in conjunction with the next one
configure-x :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make -f Makefile.in distclean;\
			./configure --without-motif ;\
			cd ..;\
		fi;\
	done

configure-xm :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make -f Makefile.in distclean;\
			./configure --enable-xm-prefix ;\
			cd ..;\
		fi;\
	done

configure-sound :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make -f Makefile.in distclean;\
			./configure --without-nas --without-esound --without-nas --enable-def-play="play.sh" ;\
			cd ..;\
		fi;\
	done

xmkmf :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			xmkmf -a;\
			cd ..;\
		fi;\
	done

# add in all extra features
pre-xmkmf :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			cp -p Imakefile Imakefile.orig;\
			sed -e "s/^XCOMM #define/#define/" Imakefile.orig > Imakefile;\
			cd ..;\
		fi;\
	done

post-xmkmf :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			mv Imakefile.orig Imakefile;\
			cd ..;\
		fi;\
	done

antic :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make -f Makefile.in antic;\
			cd ..;\
		fi;\
	done

lint :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make lint;\
			cd ..;\
		fi;\
	done

lint-win :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}/win32; then\
			cd ${PRE}$${i}${VER}/win32;\
			make lint;\
			cd ../..;\
		fi;\
	done

indent :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make indent;\
			cd ..;\
		fi;\
	done

indentcheck :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			ls -al *.c *.c~ *.h *.h~;\
			cd ..;\
		fi;\
	done

dbx :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make -f Makefile.in gdb;\
			cd ..;\
		fi;\
	done

gdb :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make -f Makefile.in gdb;\
			cd ..;\
		fi;\
	done

run :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make -f Makefile.in run;\
			cd ..;\
		fi;\
	done

run-scores :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make -f Makefile.in run.scores;\
			cd ..;\
		fi;\
	done

run-version :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make -f Makefile.in run.version;\
			cd ..;\
		fi;\
	done

run-win :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}/win32; then\
			cd ${PRE}$${i}${VER}/win32;\
			make -f Makefile run;\
			cd ../..;\
		fi;\
	done

dist-win :
	mkdir -p $(DOSDIR);\
	for i in *README; do\
		cp $${i} $(DOSDIR)/$${i};\
		cp $${i} $(DOSDIR)/$${i}.old;\
		unix2dos $(DOSDIR)/$${i}.old $(DOSDIR)/$${i};\
		rm $(DOSDIR)/$${i}.old;\
	done;\
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}/win32; then\
			cd ${PRE}$${i}${VER}/win32;\
			make -f Makefile dist;\
			cd ../..;\
		fi;\
	done

clean :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make -f Makefile.in clean;\
			cd ..;\
		fi;\
	done

distclean :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make -f Makefile.in distclean;\
			cd ..;\
		fi;\
	done

clean.all :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make -f Makefile.in clean.all;\
			cd ..;\
		fi;\
	done

pack :
	rm -rf xt xt.tar.bz2;\
	mkdir ${UNIXDIR};\
	make bzip2;\
	mv ${UNIXDIR} xt ;\
	tar cvjf xt.tar.bz2 xt;\
	sftp gwyn.tux.org

tar :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make -f Makefile.in tar;\
			cd ..;\
		fi;\
	done

compress :
	if test -d ${UNIXDIR}; then\
		cp -p ${NAME}Makefile ${UNIXDIR}/${NAME}Makefile;\
		cp -p *.README ${UNIXDIR};\
		cp -p *.lsm ${UNIXDIR};\
		for i in ${PROGRAMS}; do\
			if test -d ${PRE}$${i}${VER}; then\
				cd ${PRE}$${i}${VER};\
				make -f Makefile.in compress;\
				cd ..;\
			fi;\
		done;\
	else echo "${UNIXDIR} not a directory";\
	fi

gzip :
	if test -d ${UNIXDIR}; then\
		cp -p ${NAME}Makefile ${UNIXDIR}/${NAME}Makefile;\
		cp -p *.README ${UNIXDIR};\
		cp -p *.lsm ${UNIXDIR};\
		for i in ${PROGRAMS}; do\
			if test -d ${PRE}$${i}${VER}; then\
				cd ${PRE}$${i}${VER};\
				make -f Makefile.in gzip;\
				cd ..;\
				mv ${PRE}$${i}${VER}.tar.gz ${UNIXDIR};\
			fi;\
		done;\
	else echo "${UNIXDIR} not a directory";\
	fi

bzip2 :
	if test -d ${UNIXDIR}; then\
		cp -p ${NAME}Makefile ${UNIXDIR}/${NAME}Makefile;\
		cp -p *.README ${UNIXDIR};\
		cp -p *.lsm ${UNIXDIR};\
		for i in ${PROGRAMS}; do\
			if test -d ${PRE}$${i}${VER}; then\
				cd ${PRE}$${i}${VER};\
				make -f Makefile.in bzip2;\
				cd ..;\
				mv ${PRE}$${i}${VER}.tar.bz2 ${UNIXDIR};\
			fi;\
		done;\
	else echo "${UNIXDIR} not a directory";\
	fi

untar :
	for i in ${PROGRAMS}; do\
		if test -r ${PRE}$${i}${VER}.tar; then\
			tar xvf ${PRE}$${i}${VER}.tar;\
			rm -f ${PRE}$${i}${VER}.tar;\
		else echo "no ${PRE}$${i}${VER}.tar";\
		fi;\
	done

uncompress :
	for i in ${PROGRAMS}; do\
		if test -r ${PRE}$${i}${VER}.tar.Z; then\
			zcat ${PRE}$${i}${VER}.tar.Z | tar xvf -;\
			rm -f ${PRE}$${i}${VER}.tar.Z;\
		else echo "no ${PRE}$${i}${VER}.tar.Z";\
		fi;\
	done

gunzip :
	for i in ${PROGRAMS}; do\
		if test -r ${PRE}$${i}${VER}.tar.gz; then\
			gzcat ${PRE}$${i}${VER}.tar.gz | tar xvf -;\
			rm -f ${PRE}$${i}${VER}.tar.gz;\
		else echo "no ${PRE}$${i}${VER}.tar.gz";\
		fi;\
	done

bunzip2 :
	for i in ${PROGRAMS}; do\
		if test -r ${PRE}$${i}${VER}.tar.bz2; then\
			bzcat ${PRE}$${i}${VER}.tar.bz2 | tar xvf -;\
			rm -f ${PRE}$${i}${VER}.tar.bz2;\
		else echo "no ${PRE}$${i}${VER}.tar.bz2";\
		fi;\
	done

read :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			more README;\
			cd ..;\
		fi;\
	done

man :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make -f Makefile.in man;\
			cd ..;\
		fi;\
	done

dist.man :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make -f Makefile.in dist.man;\
			cd ..;\
		fi;\
	done

html :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make -f Makefile.in html;\
			cd ..;\
		fi;\
	done

hlp :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make -f Makefile.in hlp;\
			cd ..;\
		fi;\
	done

#print :

small :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make small;\
			cd ..;\
		fi;\
	done

small-win :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}/win32; then\
			cd ${PRE}$${i}${VER}/win32;\
			make small;\
			cd ../..;\
		fi;\
	done

install :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make install;\
			cd ..;\
		fi;\
	done

install-win :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}/win32; then\
			cd ${PRE}$${i}${VER}/win32;\
			make install;\
			cd ../..;\
		fi;\
	done

uninstall :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make uninstall;\
			cd ..;\
		fi;\
	done

install-games :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make install-games;\
			cd ..;\
		fi;\
	done

uninstall-games :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make uninstall-games;\
			cd ..;\
		fi;\
	done

install-png :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make install-png;\
			cd ..;\
		fi;\
	done

uninstall-png :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make uninstall-png;\
			cd ..;\
		fi;\
	done

install-xpm :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make install-xpm;\
			cd ..;\
		fi;\
	done

uninstall-xpm :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make uninstall-xpm;\
			cd ..;\
		fi;\
	done

install-xpm-home :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make install-xpm-home;\
			cd ..;\
		fi;\
	done

uninstall-xpm-home :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make uninstall-xpm-home;\
			cd ..;\
		fi;\
	done

vi :
	for i in ${PROGRAMS}; do\
		vi ${PRE}$${i}${VER}/?`echo $${i} | cut -c2-`.c;\
	done

icon :
	for i in ${PROGRAMS}; do\
		if test -d ${PRE}$${i}${VER}; then\
			cd ${PRE}$${i}${VER};\
			make icon;\
			cd ..;\
		fi;\
	done