Initial checkin. I created this by combining the XBoard 4.2.6 and
[xboard.git] / Makefile.in
1 #
2 # Run ./configure to generate a Makefile from Makefile.in
3 # See INSTALL for more information
4 # $Id$
5 #
6
7 PRODUCT = @PRODUCT@
8 VERSION = @VERSION@
9 PATCHLEVEL = @PATCHLEVEL@
10
11 SHELL = /bin/sh
12 srcdir = @srcdir@
13 VPATH = @srcdir@
14
15 prefix = @prefix@
16 exec_prefix = @exec_prefix@
17 bindir = @bindir@
18 mandir = @mandir@
19 man6dir = $(mandir)/man6
20 man6ext = .6
21 # Yuck; the autoconf generated configure script sets an infodir variable
22 # and provides a command-line flag to change it, but the default is 
23 # /usr/info instead of /usr/share/info.
24 infodir = $(prefix)/share/info
25
26 CC = @CC@
27 CFLAGS = @CFLAGS@ @CPPFLAGS@ -DINFODIR=\"$(infodir)\"
28 ALL_CFLAGS = -I. -I$(srcdir) @X_CFLAGS@ @CONF_CFLAGS@ $(CFLAGS)
29 DEFINES = @DEFS@
30 INSTALL = @INSTALL@
31 INSTALL_DATA = @INSTALL_DATA@
32 INSTALL_PROGRAM = @INSTALL_PROGRAM@
33 LDFLAGS = @LDFLAGS@
34 ALL_LDFLAGS = @CONF_LDFLAGS@ $(LDFLAGS)
35 LEX = @LEX@
36 LEXFLAGS = 
37 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
38 LIBS = @X_LIBS@ @XAW_LIBS@ @PRE_XMULIB@ -lXmu @POST_XMULIB@ -lXt -lXext \
39         @X_PRE_LIBS@ -lX11 @X_EXTRA_LIBS@ @LIBS@ -lm
40 NROFF = @NROFF@
41 NROFFFLAGS = @NROFFFLAGS@
42
43 DISTSOURCE = COPYING COPYRIGHT ChangeLog ChangeLog.2 FAQ FAQ.html \
44         INSTALL Makefile.in READ_ME ToDo backend.c backend.h \
45         backendz.h bitmaps bitmaps.xchess childio.c childio.h cmail.in \
46         cmail.man comment.in common.h config.guess config.sub \
47         configure configure.in engine-intf.html frontend.h gamelist.c \
48         ics-parsing.txt install-sh kk13.pgn lists.c \
49         lists.h mkinstalldirs moves.c moves.h parser.h parser.l pgntags.c \
50         pxboard xboard.c xboard.h xboard.man xedittags.c xedittags.h \
51         xgamelist.c xgamelist.h xhistory.c xhistory.h acconfig.h config.h.in \
52         xboard.texinfo.in xboard.texi gpl.texinfo zic2xpm.c zic2xpm.man \
53         pixmaps sounds xboard.ps
54
55 ZIPPYSOURCE = zippy.README zippy.c zippy.h zippy.lines
56
57 DISTDIR = @PRODUCT@-@VERSION@.@PATCHLEVEL@
58
59 XBOARDOBJ = parser.o xboard.o backend.o moves.o childio.o gamelist.o \
60         lists.o pgntags.o xgamelist.o xedittags.o xhistory.o @ZIPPY_O@
61
62 ### Targets required by GNU standards #######################################
63
64 all: xboard zic2xpm xboard.doc cmail.doc zic2xpm.doc
65
66 more: all pseudo-source info FAQ html dvi ps
67
68 install: installdirs xboard zic2xpm cmail pxboard xboard.man cmail.man \
69                 zic2xpm.man
70         $(INSTALL_PROGRAM) -s xboard $(bindir)/xboard
71         $(INSTALL_PROGRAM) -s zic2xpm $(bindir)/zic2xpm
72         $(INSTALL_PROGRAM) cmail $(bindir)/cmail
73         $(INSTALL_PROGRAM) $(srcdir)/pxboard $(bindir)/pxboard
74         $(INSTALL_DATA) $(srcdir)/xboard.man $(man6dir)/xboard$(man6ext)
75         $(INSTALL_DATA) $(srcdir)/cmail.man $(man6dir)/cmail$(man6ext)
76         $(INSTALL_DATA) $(srcdir)/zic2xpm.man $(man6dir)/zic2xpm$(man6ext)
77         $(INSTALL_DATA) xboard.info $(infodir)/xboard.info
78         -PATH=$$PATH:/sbin:/usr/sbin install-info \
79                 $(infodir)/xboard.info $(infodir)/dir
80
81 installdirs: mkinstalldirs
82         $(srcdir)/mkinstalldirs $(bindir) $(mandir) $(man6dir) $(infodir)
83
84 uninstall:
85         rm -f $(bindir)/xboard $(bindir)/cmail $(bindir)/pxboard
86         rm -f $(bindir)/zic2xpm
87         rm -f $(man6dir)/xboard$(man6ext) $(man6dir)/cmail$(man6ext)
88         rm -f $(man6dir)/zic2xpm$(man6ext)
89         rm -f $(infodir)/xboard.info
90         -PATH=$$PATH:/sbin:/usr/sbin install-info --delete \
91                 $(infodir)/xboard.info $(infodir)/dir
92
93 clean:
94         rm -f xboard zic2xpm *.o *.doc $(LEX_OUTPUT_ROOT).c
95         rm -f xboard_*.html xboard.aux* xboard.cp* xboard.dvi xboard.fn*
96         rm -f xboard.ky* xboard.log xboard.pg* xboard.toc xboard.tp*
97         rm -f xboard.vr* xboard.ps
98
99 distclean: clean tidy
100         rm -f config.cache config.log config.status Makefile 
101         rm -f config.h stamp-h xboard.texinfo cmail comment.awk
102
103 mostlyclean: clean
104
105 maintainer-clean: distclean
106         @echo "This command is intended for maintainers to use;"
107         @echo "it deletes files that may require special tools to rebuild."
108         rm -f parser.c xboard.info FAQ
109
110 TAGS:
111         etags *.c *.h
112
113 info: xboard.info
114
115 xboard.info: xboard.texinfo xboard.texi gpl.texinfo configure.in
116         makeinfo --no-split -I $(srcdir) xboard.texinfo
117
118 ps: xboard.ps
119
120 xboard.ps: xboard.dvi   
121         dvips -o xboard.ps xboard.dvi
122
123 dvi: xboard.dvi
124
125 xboard.dvi: xboard.texinfo xboard.texi gpl.texinfo configure.in
126         TEXINPUTS=.:$(srcdir): texi2dvi xboard.texinfo
127
128 html: xboard_toc.html
129
130 xboard_toc.html: xboard.texinfo xboard.texi gpl.texinfo configure.in
131         texi2html -split_chapter -I $(srcdir) xboard.texinfo
132
133 FAQ: FAQ.html
134         lynx -dump -nolist $(srcdir)/FAQ.html > FAQ
135
136 nothinglocked:
137         @echo -n Testing that no RCS files are locked...
138         @test `rlog -L -R RCS/*,v | tee .locked | wc -l` = 0 || \
139                 ( echo 'ERROR - the following are locked: ' 2>&1 ;\
140                   cat .locked 2>&1 ;\
141                   false )
142         @echo OK
143
144 pseudo-source: parser.c xboard.info FAQ
145
146 dist: nothinglocked
147         mkdir $(DISTDIR)
148         rlog -h RCS/*,v | egrep '^RCS file:|head:' > RCS/$(DISTDIR).rcs
149         cp -r $(DISTSOURCE) $(ZIPPYSOURCE) $(DISTDIR)/
150         if echo $(DISTDIR) | grep -i beta ; then \
151             cp -r READ_ME_FIRST $(DISTDIR)/ ; \
152         fi
153         cp parser.c xboard.info FAQ $(DISTDIR)/
154         tar cvf - $(DISTDIR) | gzip > $(DISTDIR).tar.gz
155
156 check: all
157
158 ### End targets required by GNU standards ###################################
159
160 .SUFFIXES:
161 .SUFFIXES: .c .o .man .doc
162
163 .c.o:
164         $(CC) $(DEFINES) $(ALL_CFLAGS) -c $<
165
166 .man.doc:
167         $(NROFF) $(NROFFFLAGS) $< > $*.doc
168
169 xboard: $(XBOARDOBJ)
170         $(CC) -o xboard $(ALL_LDFLAGS) $(XBOARDOBJ) $(LIBS)
171
172 zic2xpm: zic2xpm.o
173         $(CC) -o zic2xpm zic2xpm.o
174
175 parser.c: parser.l
176         $(LEX) $(LEXFLAGS) $(srcdir)/parser.l
177         mv $(LEX_OUTPUT_ROOT).c parser.c
178
179 parser.o: parser.c
180
181
182 tidy:
183         rm -f ,* .,* .emacs_[0-9]* core a.out *~ *.BAK *.CKP .nfs*
184
185 backend.o: backendz.h
186 backend.o: config.h
187 backend.o: common.h
188 backend.o: frontend.h
189 backend.o: backend.h lists.h
190 backend.o: parser.h
191 backend.o: moves.h
192 backend.o: @ZIPPY_H@
193 childio.o: config.h
194 childio.o: common.h
195 childio.o: frontend.h
196 gamelist.o: config.h
197 gamelist.o: common.h
198 gamelist.o: frontend.h
199 gamelist.o: backend.h lists.h
200 gamelist.o: parser.h
201 lists.o: config.h
202 lists.o: common.h
203 lists.o: lists.h
204 moves.o: config.h
205 moves.o: common.h
206 moves.o: backend.h lists.h
207 moves.o: moves.h
208 moves.o: parser.h
209 parser.o: config.h
210 parser.o: common.h
211 parser.o: backend.h
212 parser.o: frontend.h
213 parser.o: parser.h
214 parser.o: moves.h
215 pgntags.o: config.h
216 pgntags.o: common.h
217 pgntags.o: frontend.h
218 pgntags.o: backend.h lists.h
219 pgntags.o: parser.h
220 xboard.o: config.h
221 xboard.o: common.h
222 xboard.o: frontend.h
223 xboard.o: backend.h lists.h
224 xboard.o: moves.h
225 xboard.o: xboard.h
226 xboard.o: childio.h
227 xboard.o: $(srcdir)/bitmaps/bitmaps.h
228 xboard.o: xgamelist.h
229 xboard.o: xedittags.h
230 xboard.o: xhistory.h
231 xedittags.o: config.h
232 xedittags.o: common.h
233 xedittags.o: frontend.h
234 xedittags.o: backend.h lists.h
235 xedittags.o: xboard.h
236 xedittags.o: xedittags.h
237 xgamelist.o: config.h
238 xgamelist.o: common.h
239 xgamelist.o: frontend.h
240 xgamelist.o: backend.h lists.h
241 xgamelist.o: xboard.h
242 xgamelist.o: xgamelist.h
243 xhistory.o: config.h
244 xhistory.o: common.h
245 xhistory.o: frontend.h
246 xhistory.o: backend.h
247 xhistory.o: xboard.h
248 xhistory.o: xhistory.h
249 xhistory.o: lists.h
250 zippy.o: backend.h
251 zippy.o: backendz.h
252 zippy.o: config.h
253 zippy.o: common.h
254 zippy.o: zippy.h
255 zippy.o: frontend.h
256