+bin_PROGRAMS = xboard
+
### if we are compiling with ZIPPY we need some extra source files
if ZIPPY
ZPY =
endif
-bin_PROGRAMS = xboard
+### define sources for the front-end and backend
+GTKsources = gtk/xboard.c gtk/xboard.h \
+ gtk/xoptions.c gtk/xtimer.c \
+ gtk/xengineoutput.c
+
+Xsources = xaw/xboard.c xaw/xboard.h \
+ xaw/xengineoutput.c \
+ xaw/xgamelist.c xaw/xgamelist.h \
+ xaw/xhistory.c xaw/xhistory.h \
+ xaw/xoptions.c \
+ bitmaps/checkmark.bm bitmaps/icon_black.bm bitmaps/icon_white.bm
+
+if withGTK
+ FRONTENDsources = $(GTKsources)
+ FRONTENDextras = $(Xsources)
+ headers = -I gtk
+endif
+if withXaw
+ FRONTENDsources = $(Xsources)
+ FRONTENDextras = $(GTKsources)
+ headers = -I xaw -DX11
+endif
+
xboard_SOURCES = backend.c backend.h backendz.h \
book.c \
childio.c childio.h \
parser.c parser.h \
pgntags.c \
uci.c \
- xboard.c xboard.h args.h menus.c menus.h \
+ args.h xboard2.h \
+ board.c board.h \
draw.c draw.h \
+ dialogs.c dialogs.h \
+ engineoutput.c nengineoutput.c engineoutput.h \
+ evalgraph.c nevalgraph.c evalgraph.h \
+ history.c nhistory.c \
+ menus.c menus.h \
usounds.c usystem.c usystem.h \
- board.c board.h \
- xedittags.c xedittags.h \
- engineoutput.c engineoutput.h \
- nengineoutput.c xengineoutput.c \
- evalgraph.c evalgraph.h xevalgraph.c xevalgraph.h\
- xgamelist.c xgamelist.h\
- history.c xhistory.c xhistory.h \
- xoptions.c dialogs.c dialogs.h \
- $(ZPY)
+ $(ZPY) $(FRONTENDsources)
+
+###
+
SUBDIRS = po
-xboard_LDADD = -lm @XAW_LIBS@ @X_LIBS@ @LIBINTL@ @CAIRO_LIBS@
-EXTRA_DIST = pixmaps shogi sounds winboard \
- xboard.texi gpl.texinfo texi2man texinfo.tex xboard.man xboard.desktop \
+xboard_LDADD = -lm @FRONTEND_LIBS@ @X_LIBS@ @LIBINTL@ @CAIRO_LIBS@
+
+EXTRA_DIST = pixmaps themes png sounds winboard \
+ xboard.texi gpl.texinfo texi2man texinfo.tex xboard.man xboard.desktop xboard-config.desktop \
xboard-fen-viewer.desktop xboard-pgn-viewer.desktop xboard-tourney.desktop xboard.xml \
COPYRIGHT FAQ.html engine-intf.html ics-parsing.txt readme.htm zippy.README \
- xboard.conf.in SHORTLOG DIFFSTAT history.c ABOUT-NLS
+ xboard.conf.in SHORTLOG DIFFSTAT history.c ABOUT-NLS $(FRONTENDextras)
DISTCLEANFILES = stamp-h
-AM_CPPFLAGS=-DINFODIR='"$(infodir)"' @CAIRO_CFLAGS@ @X_CFLAGS@ -DSYSCONFDIR='"$(sysconfdir)"' \
- -DLOCALEDIR='"$(localedir)"' -DSVGDIR='"$(svgdir)"'
+GITVERSION=$(shell sh -c 'git describe --dirty --always 2>/dev/null')
+AM_CPPFLAGS=-DINFODIR='"$(infodir)"' @X_CFLAGS@ @CAIRO_CFLAGS@ @FRONTEND_CFLAGS@ -DSYSCONFDIR='"$(sysconfdir)"' \
+ -DLOCALEDIR='"$(localedir)"' -DSVGDIR='"$(svgdir)"' -D__GIT_VERSION='"$(GITVERSION)"' $(headers)
ACLOCAL_AMFLAGS = -I m4
sysconf_DATA = xboard.conf
-
### icon files
icondir = $(datadir)/icons/hicolor/48x48/apps
### desktop files for KDE and gnome
Applicationsdir = $(datadir)/applications
-Applications_DATA = xboard.desktop xboard-fen-viewer.desktop xboard-pgn-viewer.desktop xboard-tourney.desktop
+Applications_DATA = xboard.desktop xboard-fen-viewer.desktop xboard-pgn-viewer.desktop xboard-tourney.desktop xboard-config.desktop
### mime file
mimedir = $(datadir)/mime/packages
svgdir = $(datadir)/games/xboard/themes/default
dist_svg_DATA = svg/icon_white.svg svg/icon_black.svg \
- svg/DarkSquare.svg svg/LightSquare.svg svg/NeutralSquare.svg \
svg/BlackAdvisor.svg svg/WhiteAdvisor.svg \
svg/BlackArchbishop.svg svg/WhiteArchbishop.svg \
svg/BlackBishop.svg svg/WhiteBishop.svg \
svg/eo_White.svg
shogidir = $(datadir)/games/xboard/themes/shogi
-dist_shogi_DATA = shogi/WhiteGold.svg shogi/WhiteCrownedBishop.svg\
- shogi/WhiteBishop.svg shogi/WhiteKing.svg\
- shogi/WhiteKnight.svg shogi/WhiteGoldKnight.svg\
- shogi/WhiteLance.svg shogi/WhiteGoldLance.svg\
- shogi/WhitePawn.svg shogi/WhiteGoldPawn.svg\
- shogi/WhiteRook.svg shogi/WhiteCrownedRook.svg\
- shogi/WhiteAdvisor.svg shogi/WhiteGoldSilver.svg
+dist_shogi_DATA = \
+ themes/shogi/WhiteGold.svg themes/shogi/WhiteCrownedBishop.svg\
+ themes/shogi/WhiteBishop.svg themes/shogi/WhiteKing.svg\
+ themes/shogi/WhiteKnight.svg themes/shogi/WhiteGoldKnight.svg\
+ themes/shogi/WhiteLance.svg themes/shogi/WhiteGoldLance.svg\
+ themes/shogi/WhitePawn.svg themes/shogi/WhiteGoldPawn.svg\
+ themes/shogi/WhiteRook.svg themes/shogi/WhiteCrownedRook.svg\
+ themes/shogi/WhiteAdvisor.svg themes/shogi/WhiteGoldSilver.svg\
+ themes/shogi/BlackGold.svg themes/shogi/BlackCrownedBishop.svg\
+ themes/shogi/BlackBishop.svg themes/shogi/BlackKing.svg\
+ themes/shogi/BlackKnight.svg themes/shogi/BlackGoldKnight.svg\
+ themes/shogi/BlackLance.svg themes/shogi/BlackGoldLance.svg\
+ themes/shogi/BlackPawn.svg themes/shogi/BlackGoldPawn.svg\
+ themes/shogi/BlackRook.svg themes/shogi/BlackCrownedRook.svg\
+ themes/shogi/BlackAdvisor.svg themes/shogi/BlackGoldSilver.svg
+
+xiangqidir = $(datadir)/games/xboard/themes/xiangqi
+dist_xiangqi_DATA = themes/xiangqi/BlackAdvisor.svg themes/xiangqi/WhiteAdvisor.svg \
+ themes/xiangqi/BlackCanon.svg themes/xiangqi/WhiteCanon.svg \
+ themes/xiangqi/BlackElephant.svg themes/xiangqi/WhiteElephant.svg \
+ themes/xiangqi/BlackKnight.svg themes/xiangqi/WhiteKnight.svg \
+ themes/xiangqi/BlackGold.svg themes/xiangqi/WhiteGold.svg \
+ themes/xiangqi/BlackPawn.svg themes/xiangqi/WhitePawn.svg \
+ themes/xiangqi/BlackRook.svg themes/xiangqi/WhiteRook.svg
### directory and files for pixmaps
pixmapsdir = $(datadir)/games/xboard/pixmaps/textures
-dist_pixmaps_DATA = pixmaps/cross32.xpm pixmaps/cross48.xpm pixmaps/board32.xpm pixmaps/board48.xpm
+dist_pixmaps_DATA = pixmaps/cross32.xpm pixmaps/cross48.xpm pixmaps/board32.xpm pixmaps/board48.xpm pixmaps/ini32.xpm pixmaps/ini48.xpm
### directory and files for pngs
pngdir = $(datadir)/games/xboard/themes/textures
-dist_png_DATA = png/hatch.png png/wood_d.png png/wood_l.png
+dist_png_DATA = png/hatch.png png/wood_d.png png/wood_l.png png/xqboard.png
### directory and files for sound files