replace hard coded paths with path from configure script
[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
40 DISTCLEANFILES = stamp-h
41
42 AM_CPPFLAGS=-DINFODIR='"$(infodir)"' @X_CFLAGS@  -DSYSCONFDIR='"$(sysconfdir)"' -DBITMAPDIR='"$(datadir)/games/xboard/bitmaps/"'
43
44 info_TEXINFOS =  xboard.texi
45 xboard_TEXINFOS =  copyright.texi 
46 man6_MANS = xboard.man
47
48
49 ### config file
50
51 dist_sysconf_DATA = xboard.conf
52
53
54 ### icon files
55
56 icondir = $(datadir)/icons/hicolor/48x48/apps
57 dist_icon_DATA = xboard.png
58 svgicondir = $(datadir)/icons/hicolor/scalable/apps
59 dist_svgicon_DATA = xboard.svg
60
61
62 ### desktop files for KDE and gnome
63
64 Applicationsdir = $(datadir)/applications
65 Applications_DATA = xboard.desktop
66
67
68 ### directory and files to be used as bitmaps
69
70 bitmapdir = $(datadir)/games/xboard/
71 dist_bitmap_DATA = pixmaps/wood_d.xpm pixmaps/wood_l.xpm
72
73
74 ### set correct dir in xboard.conf
75
76 edit = sed -e 's|@bitmapdir[@]|$(bitmapdir)|g'
77
78 xboard.conf: Makefile $(srcdir)/xboard.conf.in
79         rm -f $@ $@.tmp
80         srcdir=''
81         test -f ./$@.in || srcdir=$(srcdir)/;
82         $(edit) $${srcdir}$@.in >$@.tmp
83         mv $@.tmp $@
84
85
86 ### the man page depends on several files, so we add a special rule
87
88 xboard.man: xboard.texi copyright.texi gpl.texinfo version.texi
89         $(srcdir)/texi2man $(srcdir)/xboard.texi > xboard.man || (rm -f xboard.man ; false)