Fix Alfil bug
[xboard.git] / Makefile.am
1 ### if we are compiling with ZIPPY we need some extra source files
2
3 if ZIPPY
4   ZPY = zippy.c zippy.h
5 else
6   ZPY =
7 endif
8
9 bin_PROGRAMS = xboard
10 xboard_SOURCES = backend.c backend.h backendz.h \
11                  book.c \
12                  childio.c childio.h \
13                  common.h \
14                  frontend.h \
15                  gamelist.c \
16                  gettext.h  \
17                  lists.c lists.h \
18                  moves.c moves.h \
19                  parser.l parser.h \
20                  pgntags.c \
21                  uci.c \
22                  xboard.c xboard.h args.h \
23                  xedittags.c xedittags.h \
24                  engineoutput.c engineoutput.h \
25                  xengineoutput.c \
26                  evalgraph.c evalgraph.h xevalgraph.c xevalgraph.h\
27                  xgamelist.c xgamelist.h\
28                  xhistory.c  xhistory.h \
29                  xoptions.c \
30                  filebrowser/selfile.c filebrowser/selfile.h \
31                  filebrowser/draw.c filebrowser/path.c \
32                  filebrowser/dir.c filebrowser/xstat.h \
33                  $(ZPY)
34 xboard_LDADD = -lm @XAW_LIBS@ @X_LIBS@
35
36 EXTRA_DIST = pixmaps bitmaps winboard sounds filebrowser/README \
37         xboard.texi gpl.texinfo texi2man texinfo.tex xboard.man xboard.desktop \
38         COPYRIGHT FAQ.html engine-intf.html ics-parsing.txt readme.htm zippy.README \
39         xboard.conf.in SHORTLOG DIFFSTAT history.c
40
41 DISTCLEANFILES = stamp-h
42
43 AM_CPPFLAGS=-DINFODIR='"$(infodir)"' @X_CFLAGS@  -DSYSCONFDIR='"$(sysconfdir)"' -DBITMAPDIR='"$(datadir)/games/xboard/bitmaps/"'
44
45 info_TEXINFOS =  xboard.texi
46 xboard_TEXINFOS =  copyright.texi 
47 man6_MANS = xboard.man
48
49
50 ### config file
51
52 sysconf_DATA = xboard.conf
53
54
55 ### icon files
56
57 icondir = $(datadir)/icons/hicolor/48x48/apps
58 dist_icon_DATA = xboard.png
59 svgicondir = $(datadir)/icons/hicolor/scalable/apps
60 dist_svgicon_DATA = xboard.svg
61
62
63 ### desktop files for KDE and gnome
64
65 Applicationsdir = $(datadir)/applications
66 Applications_DATA = xboard.desktop
67
68
69 ### directory and files to be used as bitmaps
70
71 bitmapdir = $(datadir)/games/xboard/
72 dist_bitmap_DATA = pixmaps/wood_d.xpm pixmaps/wood_l.xpm
73
74
75 ### set correct dir in xboard.conf
76
77 edit = sed -e 's|@bitmapdir[@]|$(bitmapdir)|g'
78
79 xboard.conf: Makefile $(srcdir)/xboard.conf.in
80         @echo '  'GEN '  ' $@;
81         @rm -f $@ $@.tmp
82         @$(edit) $(srcdir)/$@.in >$@.tmp
83         @mv $@.tmp $@
84
85 distclean-local:
86         -rm -f xboard.conf
87
88 ### the man page depends on several files, so we add a special rule
89
90 xboard.man: xboard.texi copyright.texi gpl.texinfo version.texi
91         $(srcdir)/texi2man $(srcdir)/xboard.texi > xboard.man || (rm -f xboard.man ; false)