File: Makefile.in

package info (click to toggle)
xbl 1.0i-2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 620 kB
  • ctags: 714
  • sloc: ansic: 7,395; makefile: 285; sh: 2
file content (339 lines) | stat: -rwxr-xr-x 10,971 bytes parent folder | download
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
# ---------------
# XBL Makefile.in
# ---------------
# In the following program, text within @ is substitute
# by ``configure'' script.
# YOU MUST RUN "configure" TO CREATE THE Makefile from Makefile.in

###########################################################################
# You must verify the 2 next values
###########################################################################

# If xbl must NOT run with SGID bit (for protect scores files) then
# comment next line
USE_SETGID=-DUSE_SETGID

# group owner of games file
GROUP_GID=60

###########################################################################
# You don't need to read below if you have xmkmf or imake
# and want to use them.
###########################################################################

# Comment next line if you don't want to use "xmkmf" informations.
USE_XMKMF=YES
# Comment next line if you don't want to use "imake" informations.
IMAKE_OPTIONS=-DTOP=/ -DUseInstalled

# Directory who contain X Resource Database
# The default value if overrided by configure if xmkmf or imake exists.
#
RESOURCEDIR=/usr/lib/X11/app-defaults
@XAPPLOADDIR@

# Directory where install binary
# The default value if overrided by configure if xmkmf or imake exists.
#
BINDIR=/usr/local/bin
@BINDIR@

# Directory who contain score
# Put your HOME if you have a private use of the game
# The default value if overrided by configure if xmkmf or imake exists.
#
SCOREDIR=/usr/local/lib/xbl
@SCOREDIR@
SCOREDIR=/var/lib/games/xbl

# Directory where put man pages.
# The default value if overrided by configure if xmkmf or imake exists.
#
MANPATH=/usr/local/man
@MANPATH@

###########################################################################
# Some values defined in imakefiles
###########################################################################

# For compile
CC=@CC@
# For copy
CP=cp
@CP@
# For remove
RM=rm -f
@RM@
# For symbolic link
LN=ln -s
@LN@
# for file compression
COMPRESS=compress
@COMPRESS@
# Linker
LINT=lint
@LINT@
# Link specifics options
LINTFLAGS=-Zf1000 -Zn4096 -Zt10000
@LINTFLAGS@

###########################################################################
# YOU DON'T NEED TO READ BELOW
###########################################################################

# For linking (configure script will modify this line)
# xmkmf et imake informations are take into account.
LIBS = @LIBS@ -lm -L/usr/X11R6/lib -lX11

all:demo

XBLVERSION=1.0i
XBL=xbl-$(XBLVERSION)

CFLAGS = -DSCOREDIR=\"$(SCOREDIR)\" \
	 -DRESOURCEDIR=\"$(RESOURCEDIR)\" \
	 -DXBLVERSION=\"$(XBLVERSION)\" \
	 -DGROUP_GID=$(GROUP_GID) \
	  $(USE_SETGID) @DEFS@ -g
# For link edit options
LDOPTIONS=$(CFLAGS)
LDOPTIONS=@LDOPTIONS@

SRC=bl.c initdisp.c initgc.c initwin.c options.c \
	 bloc.c transfo.c initbuffer.c help.c demo.c \
	 movingbloc.c loop.c draw.c opbloc.c realtime.c initbloc.c menu.c \
	 initmenu.c score.c sound.c buttons.c movingbutton.c zoo.c gameevent.c

OBJ=$(SRC:.c=.o)

demo:bl
	@echo "You can test the play by typing : 'bl'"
	@echo "Scores will not be memorize"
	@echo "***----------------------------------------***"
	@echo "*** You must find the best buffering mode  ***"
	@echo "*** on your host/display.                  ***"
	@echo "*** Same for the button height; on slow    ***"
	@echo "*** screens, limit yourself to 2 or 1      ***"
	@echo "*** You must specify these defaults in the ***"
	@echo "*** Xbl.ad file, before typing:            ***"
	@echo "***               make install             ***"
	@echo "***----------------------------------------***"
#	XBLOPTIONS="-shownext" ; export XBLOPTIONS ; bl -smooth keyboard=1

install:bl
	@echo "Executable go in $(BINDIR)"
	@echo "Scores     go in $(SCOREDIR)"
	@echo "Defaults   go in $(RESOURCEDIR)/Xbl"
	@echo "Man pages  go in $(MANPATH)/mann or man1"
	@-if [ "" != "$(USE_SETGID)" ] ; then \
		echo "You use GID=$(GROUP_GID) protection" ; \
		fi
	@echo "Type <Return> to continue installation"
	@echo "Type NO       to stop installation"
	@read LINE && test "" = "$$LINE"
	#
	# Remove old score file
	#
	@-if [ -d "$(SCOREDIR)" ] ; \
		then \
		echo "The scoring method and speeds of Xbl had change" ; \
		echo "If your version is older than 0.2e, destroy score." ; \
		echo "Type <Return> to destroy old score files" ; \
		echo "Type NO       to hold old score files" ; \
		read LINE && test "" = "$$LINE" && rm $(SCOREDIR)/[1-9]* ; \
		exit 0 ; \
		fi
	#
	# Install executable
	#
	$(CP) bl $(BINDIR)/xbl	
	-if [ "" = "$(USE_SETGID)" ] ; then \
	     chmod 755  $(BINDIR)/xbl ;\
	   else \
	     chmod 2755  $(BINDIR)/xbl ;\
	     chown root $(BINDIR)/xbl ;\
	     chgrp $(GROUP_GID) $(BINDIR)/xbl ;\
	   fi
	#
	# Install executable
	#
	-mkdir $(SCOREDIR) 2>/dev/null
	$(CP) Xbl.ad  $(RESOURCEDIR)/Xbl ;	chmod 644 $(RESOURCEDIR)/Xbl
	$(CP) Xbl.ad  $(SCOREDIR)/Xbl ;		chmod 644 $(SCOREDIR)/Xbl
	$(CP) COPYING  $(SCOREDIR) ;		chmod 444 $(SCOREDIR)/COPYING
	-if [ "" = "$(USE_SETGID)" ] ; then \
	     chmod 777 $(SCOREDIR) ;\
	     chmod 666 $(SCOREDIR)/[1-9]* ;\
	   else \
	     chmod 775 $(SCOREDIR) ;\
	     chmod 664 $(SCOREDIR)/[1-9]* ;\
	     chown root $(SCOREDIR) $(SCOREDIR)/[1-9]* ;\
	     chgrp $(GROUP_GID) $(SCOREDIR) $(SCOREDIR)/[1-9]* ;\
	fi
	#
	# Install manual pages
	#
	-if [ -d $(MANPATH)/mann ] ; \
		then \
		$(CP) xbl.man $(MANPATH)/mann/xbl.n ;\
		chmod 444 $(MANPATH)/mann/xbl.n ; \
	   else \
		$(CP) xbl.man $(MANPATH)/man1/xbl.1 ;\
		chmod 444 $(MANPATH)/man1/xbl.1 ; \
		fi
	cp *.gif *.html $(SCOREDIR)
	#
	-ls -lsa $(SCOREDIR) $(BINDIR)/xbl $(MANPATH)/man[1n]/xbl.[1n]
	@echo "Type xbl to play"

bl:$(OBJ)
	$(CC) $(LDOPTIONS) $(OBJ) $(LIBS) -o $@

LINT:$(SRC)
	$(LINT) $(LINTFLAGS) $(CFLAGS) $(LIBS) $(SRC) | \
		fgrep -v _XrmHashBucketRec | fgrep -v XKeytrans  >$@ 2>&1

ftp:tar
	echo   "exco\n\
		umask 022\n\
		cd /vol/ftp/xbl\n\
		bin\n\
		prompt no\n\
		hash\n\
		mdel *\n\
		mput xbl-$(XBLVERSION).tar.Z *.gif *.html \
			xbl-README\n\
		quit" | \
	ftp ftp710.univ-lyon1.fr

shar:tar
	echo "# Delete headers & execute with /bin/sh" >xbl-$(XBLVERSION).shar
	echo "#!/bin/sh" >>xbl-$(XBLVERSION).shar
	echo "atob >xbl-$(XBLVERSION).tar.Z <<'END OF FILE PATTERN'" \
					     >>xbl-$(XBLVERSION).shar
	btoa <xbl-$(XBLVERSION).tar.Z >>xbl-$(XBLVERSION).shar
	echo "END OF FILE PATTERN" >>xbl-$(XBLVERSION).shar
	echo "exit" >>xbl-$(XBLVERSION).shar

tar:xbl-$(XBLVERSION).tar.Z

TO_SAVE = README       INSTALL     COPYING \
	  Xbl.ad       Makefile.in \
	  configure.in configure   \
	  xbl-README   xbl.man xbl.html xbl-man.html   Xbl.iafa   Xbl.lsm \
	  *.gif *.h *.c *.bm

xbl-$(XBLVERSION).tar.Z:$(TO_SAVE)
	$(LN) . $(XBL)
	tar -cvf -   `for I in $(TO_SAVE); do echo $(XBL)/$$I ; done`   | \
		$(COMPRESS) >$@
	$(RM) $(XBL)

speedtest:bl
	@echo "THIS TEST WILL TAKE SOME TIME"
	@echo "DON'T TOUCH YOUR SCREEN....."
	@echo "DON'T USE YOUR CPU...."
	@echo "HOSTNAME=`hostname` DISPLAY=$$DISPLAY"
	@echo "PS: It's normal that buffermode=0,4,5 aren't nice"
	@echo -e "\n\
+-----------------------+-------------------+-----------------------+\n\
|            drawmode=0 (wireframe)         | drawmode=2 (faces)    |\n\
+-----------------------+-------------------+-----------------------+\n\
|     clearline=0       |   clearline=1     |                       |\n\
+-----------------------+-------------------+-----------------------+\n\
| 0   1   2   3   4   5 | 1   2   3   4   5 | 0   1   2   3   4   5 |\n\
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+\n\
|\c"
	@sleep 5
	@if [ -f bl ] ; then BL=bl ; else BL=xbl ; fi ; \
	XBLOPTIONS="-geometry 512x512+0+0 -linewidth 0 -speedtest" \
	export XBLOPTIONS ; \
	for J in 0 2 ; \
	   do K=0 ; \
	   if [ $$J = 0 ] ; then K="0 1" ; fi ; \
	   for L in $$K ; \
	      do for I in 0 1 2 3 4 5 ; \
		do if [ $$J != 0 -o $$L != 1 -o $$I != 0 ] ; \
			then $$BL -buffer $$I -draw $$J -clearline $$L \
			2>/dev/null | \
			( cut -c1-3 | tr -cs "[0-9] " "[|*]" ) ; \
		   fi ; \
	      done ; \
	   done ; \
	done

configure:configure.in
	# It's only for me
	PATH=/usr/local/bin:$$PATH;export PATH;autoconf
	echo "At the line where config.status is create"
	echo "Revert the << and > of the cat <<EOF >config.status"
	vi configure
clean:
	-$(RM) *.o *~ *.bak *.ln bl LINT mon.out core config.status

# Makefile:config.status Makefile.in
# 	config.status
# 
# config.status:configure.in
# 	configure

#
# :.,$ !sed 's/ [^ ]*\/include\/[^ ]*//g' | grep -v ":$"
#
# DO NOT DELETE
bl.o: ansi.h bl.h bloc.h
bl.o: buttons.h define.h draw.h icone.h keyid.h menu.h movingbloc.h
bl.o: movingbutton.h opt.h options.h realtime.h score.h transfo.h view.h x.h
bloc.o: ansi.h bloc.h
bloc.o: define.h transfo.h view.h
buttons.o: ansi.h bl.h
buttons.o: bloc.h buttons.h define.h draw.h keyid.h menu.h movingbloc.h
buttons.o: movingbutton.h opt.h realtime.h score.h transfo.h view.h x.h
demo.o: ansi.h bl.h bloc.h
demo.o: define.h draw.h keyid.h menu.h movingbloc.h movingbutton.h opt.h
demo.o: realtime.h transfo.h view.h x.h
draw.o: ansi.h bloc.h
draw.o: define.h draw.h movingbloc.h opt.h transfo.h view.h x.h
gameevent.o: ansi.h bl.h
gameevent.o: bloc.h define.h draw.h keyid.h menu.h movingbloc.h movingbutton.h
gameevent.o: opt.h realtime.h transfo.h view.h x.h
help.o: keyid.h
initbloc.o: ansi.h bloc.h
initbloc.o: movingbloc.h transfo.h view.h
initbuffer.o: ansi.h opt.h
initbuffer.o: x.h
initdisp.o: ansi.h opt.h
initdisp.o: x.h
initgc.o: ansi.h define.h
initgc.o: opt.h p0.h p1.h p2.h p3.h p4.h p5.h transp.h x.h
initmenu.o: ansi.h bl.h
initmenu.o: bloc.h buttons.h define.h draw.h keyid.h menu.h movingbloc.h
initmenu.o: movingbutton.h opt.h realtime.h transfo.h view.h x.h
initwin.o: ansi.h bl.h
initwin.o: bloc.h define.h draw.h icone.h keyid.h menu.h movingbloc.h
initwin.o: movingbutton.h opt.h realtime.h transfo.h view.h x.h
loop.o: ansi.h bl.h bloc.h
loop.o: buttons.h define.h draw.h keyid.h menu.h movingbloc.h movingbutton.h
loop.o: opt.h realtime.h score.h transfo.h view.h x.h
menu.o: ansi.h bl.h bloc.h
menu.o: buttons.h define.h draw.h keyid.h menu.h movingbloc.h movingbutton.h
menu.o: opt.h realtime.h transfo.h view.h x.h
movingbloc.o: ansi.h bloc.h
movingbloc.o: define.h movingbloc.h transfo.h view.h
movingbutton.o: ansi.h
movingbutton.o: movingbutton.h til0.bm til1.bm til10.bm til11.bm til12.bm
movingbutton.o: til13.bm til14.bm til15.bm til16.bm til2.bm til3.bm til4.bm
movingbutton.o: til5.bm til6.bm til7.bm til8.bm til9.bm
opbloc.o: ansi.h bloc.h
opbloc.o: define.h movingbloc.h transfo.h view.h
options.o: ansi.h options.h
realtime.o: ansi.h bl.h
realtime.o: bloc.h define.h draw.h keyid.h menu.h movingbloc.h movingbutton.h
realtime.o: opt.h realtime.h transfo.h view.h x.h
score.o: ansi.h bl.h bloc.h
score.o: define.h draw.h keyid.h menu.h movingbloc.h movingbutton.h opt.h
score.o: realtime.h score.h transfo.h view.h x.h
transfo.o: ansi.h transfo.h
zoo.o: ansi.h bl.h bloc.h
zoo.o: define.h draw.h keyid.h menu.h movingbloc.h movingbutton.h opt.h
zoo.o: realtime.h transfo.h view.h x.h