2 # Run ./configure to generate a Makefile from Makefile.in
3 # See INSTALL for more information
9 PATCHLEVEL = @PATCHLEVEL@
16 exec_prefix = @exec_prefix@
19 man6dir = $(mandir)/man6
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
27 CFLAGS = @CFLAGS@ @CPPFLAGS@ -DINFODIR=\"$(infodir)\"
28 ALL_CFLAGS = -I. -I$(srcdir) @X_CFLAGS@ @CONF_CFLAGS@ $(CFLAGS)
31 INSTALL_DATA = @INSTALL_DATA@
32 INSTALL_PROGRAM = @INSTALL_PROGRAM@
34 ALL_LDFLAGS = @CONF_LDFLAGS@ $(LDFLAGS)
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
41 NROFFFLAGS = @NROFFFLAGS@
43 DISTSOURCE = acconfig.h AUTHORS backend.c backend.h backendz.h bitmaps \
44 ChangeLog ChangeLog.2 childio.c childio.h cmail.in common.h \
45 config.guess config.h.in config.sub configure configure.in COPYING \
46 COPYRIGHT copyright.texi engine-intf.html FAQ.html frontend.h \
47 gamelist.c gpl.texinfo ics-parsing.txt INSTALL install-sh lists.c \
48 lists.h Makefile.in mkinstalldirs moves.c moves.h NEWS parser.h \
49 parser.l pgntags.c pixmaps pxboard READ_ME shiphtml sounds texi2man \
50 ToDo winboard xboard.c xboard.h xboard.texi xboard.texinfo.in \
51 xedittags.c xedittags.h xgamelist.c xgamelist.h xhistory.c xhistory.h \
52 zic2xpm.c zic2xpm.man zippy.c zippy.h zippy.lines zippy.README
54 PSEUDOSOURCE = parser.c xboard.man xboard.info xboard.txt zic2xpm.txt FAQ
56 DISTDIR = @PRODUCT@-@VERSION@.@PATCHLEVEL@
58 XBOARDOBJ = parser.o xboard.o backend.o moves.o childio.o gamelist.o \
59 lists.o pgntags.o xgamelist.o xedittags.o xhistory.o @ZIPPY_O@
61 default: xboard zic2xpm
63 all: default pseudosource info FAQ html dvi ps
65 install: installdirs default
66 $(INSTALL_PROGRAM) -s xboard $(bindir)/xboard
67 $(INSTALL_PROGRAM) -s zic2xpm $(bindir)/zic2xpm
68 $(INSTALL_PROGRAM) cmail $(bindir)/cmail
69 $(INSTALL_PROGRAM) $(srcdir)/pxboard $(bindir)/pxboard
70 $(INSTALL_DATA) $(srcdir)/xboard.man $(man6dir)/xboard$(man6ext)
71 $(INSTALL_DATA) $(srcdir)/zic2xpm.man $(man6dir)/zic2xpm$(man6ext)
72 $(INSTALL_DATA) xboard.info $(infodir)/xboard.info
73 -PATH=$$PATH:/sbin:/usr/sbin install-info \
74 $(infodir)/xboard.info $(infodir)/dir
76 installdirs: mkinstalldirs
77 $(srcdir)/mkinstalldirs $(bindir) $(mandir) $(man6dir) $(infodir)
80 rm -f $(bindir)/xboard $(bindir)/cmail $(bindir)/pxboard
81 rm -f $(bindir)/zic2xpm
82 rm -f $(man6dir)/xboard$(man6ext) $(man6dir)/cmail$(man6ext)
83 rm -f $(man6dir)/zic2xpm$(man6ext)
84 rm -f $(infodir)/xboard.info
85 -PATH=$$PATH:/sbin:/usr/sbin install-info --delete \
86 $(infodir)/xboard.info $(infodir)/dir
89 rm -f xboard zic2xpm *.o xboard.txt zic2xpm.txt $(LEX_OUTPUT_ROOT).c
90 rm -f xboard*.html xboard.aux* xboard.cp* xboard.dvi xboard.fn*
91 rm -f xboard.ky* xboard.log xboard.pg* xboard.toc xboard.tp*
92 rm -f xboard.vr* xboard.ps
95 rm -f config.cache config.log config.status Makefile
96 rm -f config.h stamp-h xboard.texinfo cmail
97 -cd winboard ; make -f cygwin.mak clean
101 maintainer-clean: distclean
102 @echo "This command is intended for maintainers to use;"
103 @echo "it deletes files that may require special tools to rebuild."
104 rm -f $(PSEUDOSOURCE)
105 -cd winboard ; make -f cygwin.mak maintainer-clean
112 xboard.info: xboard.texinfo xboard.texi gpl.texinfo configure.in
113 makeinfo --no-split -I $(srcdir) xboard.texinfo
117 xboard.ps: xboard.dvi
118 dvips -o xboard.ps xboard.dvi
122 xboard.dvi: xboard.texinfo xboard.texi gpl.texinfo configure.in
123 TEXINPUTS=.:$(srcdir): texi2dvi xboard.texinfo
127 xboard.html: xboard.texinfo xboard.texi gpl.texinfo configure.in
128 texi2html -split_chapter -I $(srcdir) xboard.texinfo
131 lynx -dump -nolist $(srcdir)/FAQ.html > FAQ
133 pseudosource: $(PSEUDOSOURCE)
136 if [ -f winboard/WINBOARD.HLP ] ; then mv winboard/WINBOARD.HLP winboard/winboard.hlp ; fi
139 cp -a $(DISTSOURCE) $(DISTDIR)/
140 (cd linux && make pseudosource && \
141 cp $(PSEUDOSOURCE) -a ../$(DISTDIR)/) || \
142 cp -a $(PSEUDOSOURCE) $(DISTDIR)/
143 tar cvf - $(DISTDIR) | gzip > $(DISTDIR).tar.gz
149 .SUFFIXES: .c .o .man .txt
152 $(CC) $(DEFINES) $(ALL_CFLAGS) -c $<
155 $(NROFF) $(NROFFFLAGS) $< | cat -s > $*.txt \
156 || (rm -f $*.txt ; false)
159 $(CC) -o xboard $(ALL_LDFLAGS) $(XBOARDOBJ) $(LIBS)
162 $(CC) -o zic2xpm zic2xpm.o
165 $(LEX) $(LEXFLAGS) $(srcdir)/parser.l
166 mv $(LEX_OUTPUT_ROOT).c parser.c
170 xboard.man: xboard.texinfo xboard.texi copyright.texi gpl.texinfo
171 $(srcdir)/texi2man xboard.texinfo > xboard.man \
172 || (rm -f xboard.man ; false)
175 rm -f ,* .,* .emacs_[0-9]* core a.out *~ *.BAK *.CKP .nfs*
177 backend.o: backendz.h
180 backend.o: frontend.h
181 backend.o: backend.h lists.h
187 childio.o: frontend.h
190 gamelist.o: frontend.h
191 gamelist.o: backend.h lists.h
198 moves.o: backend.h lists.h
209 pgntags.o: frontend.h
210 pgntags.o: backend.h lists.h
215 xboard.o: backend.h lists.h
219 xboard.o: $(srcdir)/bitmaps/bitmaps.h
220 xboard.o: xgamelist.h
221 xboard.o: xedittags.h
223 xedittags.o: config.h
224 xedittags.o: common.h
225 xedittags.o: frontend.h
226 xedittags.o: backend.h lists.h
227 xedittags.o: xboard.h
228 xedittags.o: xedittags.h
229 xgamelist.o: config.h
230 xgamelist.o: common.h
231 xgamelist.o: frontend.h
232 xgamelist.o: backend.h lists.h
233 xgamelist.o: xboard.h
234 xgamelist.o: xgamelist.h
237 xhistory.o: frontend.h
238 xhistory.o: backend.h
240 xhistory.o: xhistory.h