Fix clipping of menu texts after sizing
[xboard.git] / Makefile.am
index 3cb4956..a3051ba 100644 (file)
@@ -9,20 +9,29 @@ else
 endif
 
 ### define sources for the front-end and backend
+GTKsources = gtk/xboard.c    gtk/xboard.h \
+             gtk/xoptions.c  gtk/xtimer.c \
+             gtk/xengineoutput.c
 
-GTKsources = xboard.c  xtimer.c xgamelist.c \
-             xhistory.c  xoptions.c  xboard.h  \
-             xengineoutput.c  xgamelist.h \
-             xhistory.h
-
-Xsources   = xaw/xboard.c xaw/xboard.h \
-             xaw/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
-             
+             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
 
-backendsources = backend.c backend.h backendz.h \
+xboard_SOURCES = backend.c backend.h backendz.h \
                 book.c \
                 childio.c childio.h \
                 common.h \
@@ -43,33 +52,25 @@ backendsources = backend.c backend.h backendz.h \
                 history.c nhistory.c \
                 menus.c menus.h \
                 usounds.c usystem.c usystem.h \
-                $(ZPY)
-
-### combine sources depending on front-end
-
-if withGTK
-  xboard_SOURCES = $(backendsources) $(GTKsources)
-endif
-if withXaw
-  xboard_SOURCES = $(backendsources) $(Xsources)
-  headers = -I xaw -DX11
-endif
+                $(ZPY) $(FRONTENDsources)
 
 ###
 
 SUBDIRS = po
-xboard_LDADD = -lm @X_LIBS@ @LIBINTL@ @FRONTEND_LIBS@ @CAIRO_LIBS@
+xboard_LDADD = -ldl -lm @FRONTEND_LIBS@ @X_LIBS@ @LIBINTL@ @CAIRO_LIBS@
 
-EXTRA_DIST = pixmaps shogi png sounds winboard \
-       xboard.texi gpl.texinfo texi2man texinfo.tex xboard.man xboard.desktop \
+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 SHORTLOG DIFFSTAT history.c ABOUT-NLS $(FRONTENDextras)
 
 DISTCLEANFILES = stamp-h
 
-AM_CPPFLAGS=-DINFODIR='"$(infodir)"' @CAIRO_CFLAGS@ @FRONTEND_CFLAGS@  -DSYSCONFDIR='"$(sysconfdir)"' \
-           -DLOCALEDIR='"$(localedir)"' -DSVGDIR='"$(svgdir)"' $(headers)
+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)"' \
+            -DCONFIGURE_OPTIONS='"@CONFIGURE_OPTIONS@"' -DDATADIR='"$(datadir)/games/xboard"' -DMANDIR='"$(mandir)"' $(headers)
 
 ACLOCAL_AMFLAGS = -I m4
 
@@ -84,26 +85,27 @@ sysconf_DATA = xboard.conf
 
 ### icon files
 
-icondir = $(datadir)/icons/hicolor/48x48/apps
+icondir = @ICONSDIR@
 dist_icon_DATA = xboard.png
-svgicondir = $(datadir)/icons/hicolor/scalable/apps
+svgicondir = @SVGICONSDIR@
 dist_svgicon_DATA = xboard.svg
 
 
 ### desktop files for KDE and gnome
 
-Applicationsdir = $(datadir)/applications
-Applications_DATA = xboard.desktop xboard-fen-viewer.desktop  xboard-pgn-viewer.desktop  xboard-tourney.desktop
+Applicationsdir = @DESKTOPDIR@
+Applications_DATA = xboard.desktop xboard-fen-viewer.desktop  xboard-pgn-viewer.desktop  xboard-tourney.desktop  xboard-config.desktop
 
 ### mime file
-mimedir = $(datadir)/mime/packages
+mimedir = @MIMEDIR@
 mime_DATA = xboard.xml
 
+gamedatadir = @GAMEDATADIR@
+
 ### directory and files for svgs
 
-svgdir = $(datadir)/games/xboard/themes/default
+svgdir = $(gamedatadir)/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      \
@@ -130,51 +132,92 @@ dist_svg_DATA = svg/icon_white.svg         svg/icon_black.svg      \
            svg/BlackQueen.svg      svg/WhiteQueen.svg        \
            svg/BlackRook.svg       svg/WhiteRook.svg         \
            svg/BlackUnicorn.svg            svg/WhiteUnicorn.svg      \
+           svg/BlackSword.svg      svg/WhiteSword.svg        \
+           svg/BlackHSword.svg     svg/WhiteHSword.svg       \
+           svg/BlackLeopard.svg            svg/WhiteLeopard.svg      \
+           svg/BlackLion.svg       svg/WhiteLion.svg         \
+           svg/BlackPromoBishop.svg svg/WhitePromoBishop.svg  \
+           svg/BlackPromoRook.svg   svg/WhitePromoRook.svg    \
+           svg/BlackPromoHorse.svg  svg/WhitePromoHorse.svg   \
+           svg/BlackPromoDragon.svg svg/WhitePromoDragon.svg  \
+           svg/BlackPromoSword.svg  svg/WhitePromoSword.svg   \
+           svg/BlackPromoHSword.svg svg/WhitePromoHSword.svg  \
+           svg/BlackHCrown.svg     svg/WhiteHCrown.svg       \
+           svg/BlackDolphin.svg            svg/WhiteDolphin.svg      \
+           svg/BlackClaw.svg       svg/WhiteClaw.svg         \
+           svg/BlackWolf.svg       svg/WhiteWolf.svg         \
+           svg/BlackCamel.svg      svg/WhiteCamel.svg        \
+           svg/BlackZebra.svg      svg/WhiteZebra.svg        \
+           svg/BlackGnu.svg        svg/WhiteGnu.svg          \
+           svg/BlackWizard.svg     svg/WhiteWizard.svg       \
+           svg/BlackViking.svg     svg/WhiteViking.svg       \
+           svg/BlackIron.svg       svg/WhiteIron.svg         \
+           svg/BlackCopper.svg     svg/WhiteCopper.svg       \
+           svg/BlackTower.svg      svg/WhiteTower.svg        \
+           svg/BlackDragon.svg     svg/WhiteDragon.svg       \
+           svg/BlackCub.svg        svg/WhiteCub.svg          \
+           svg/BlackButterfly.svg   svg/WhiteButterfly.svg    \
+           svg/BlackLeft.svg       svg/WhiteLeft.svg         \
+           svg/BlackRight.svg      svg/WhiteRight.svg        \
+           svg/BlackHat.svg        svg/WhiteHat.svg          \
+           svg/BlackRShield.svg            svg/WhiteRShield.svg      \
+           svg/BlackLShield.svg            svg/WhiteLShield.svg      \
+           svg/BlackAxe.svg        svg/WhiteAxe.svg          \
+           svg/BlackFlag.svg       svg/WhiteFlag.svg         \
+           svg/BlackDuck.svg       svg/WhiteDuck.svg         \
+           svg/BlackPegasus.svg            svg/WhitePegasus.svg      \
            svg/eo_Analyzing.svg     svg/eo_Black.svg          \
            svg/eo_Clear.svg         svg/eo_Ponder.svg         \
            svg/eo_Thinking.svg      svg/eo_Unknown.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
+shogidir = $(gamedatadir)/themes/shogi
+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 = $(gamedatadir)/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 themes (and other) configuration files
+
+themesdir = $(datadir)/games/xboard/themes/conf
+dist_themes_DATA = conf/shogi conf/xq conf/ics conf/mini conf/mini.fen conf/sho conf/sho.fen
 
 ### 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
+pixmapsdir = $(gamedatadir)/pixmaps/textures
+dist_pixmaps_DATA = pixmaps/cross32.png pixmaps/cross48.png pixmaps/board32.png pixmaps/board48.png pixmaps/ini32.png pixmaps/ini48.png
 
 ### 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 png/xqboard.png
+pngdir = $(gamedatadir)/themes/textures
+dist_png_DATA = png/hatch.png png/wood_d.png png/wood_l.png png/xqboard-9x10.png
 
 ### directory and files for sound files
 
-soundsdir = $(datadir)/games/xboard/sounds
+soundsdir = $(gamedatadir)/sounds
 dist_sounds_DATA = \
   sounds/cymbal.wav     sounds/pop2.wav   sounds/slap.wav     sounds/ding1.wav      sounds/laser.wav \
-  sounds/woodthunk.wav  sounds/gong.wav   sounds/penalty.wav  sounds/honkhonk.wav   sounds/phone.wav
-
-
-### set correct dir in xboard.conf
-
-edit = sed -e 's|@pngdir[@]|$(pngdir)|g' \
-           -e 's|@soundsdir[@]|$(soundsdir)|g'
-
-xboard.conf: Makefile $(srcdir)/xboard.conf.in
-       @echo '  'GEN '  ' $@;
-       @rm -f $@ $@.tmp
-       @$(edit) $(srcdir)/$@.in >$@.tmp
-       @mv $@.tmp $@
-
-distclean-local:
-       -rm -f xboard.conf
+  sounds/woodthunk.wav  sounds/gong.wav   sounds/penalty.wav  sounds/honkhonk.wav   sounds/phone.wav  sounds/roar.wav
 
 ### the man page depends on several files, so we add a special rule
 
@@ -194,12 +237,12 @@ if ENABLE_UPDATE_MIMEDB
                $(XDG_DESKTOP_MENU) install --mode system --novendor xboard-fen-viewer.desktop;\
                $(XDG_DESKTOP_MENU) install --mode system --novendor xboard-tourney.desktop;\
                $(XDG_DESKTOP_MENU) install --mode system --novendor xboard-config.desktop;\
-               $(XDG_ICON_RESOURCE) install --context mimetypes --size 32 pixmaps/board32.xpm application-x-chess-pgn;\
-               $(XDG_ICON_RESOURCE) install --context mimetypes --size 32 pixmaps/cross32.xpm application-x-xboard-trn;\
-               $(XDG_ICON_RESOURCE) install --context mimetypes --size 32 pixmaps/ini32.xpm application-x-xboard-opt;\
-               $(XDG_ICON_RESOURCE) install --context mimetypes --size 48 pixmaps/board48.xpm application-x-chess-pgn;\
-               $(XDG_ICON_RESOURCE) install --context mimetypes --size 48 pixmaps/cross48.xpm application-x-xboard-trn;\
-               $(XDG_ICON_RESOURCE) install --context mimetypes --size 48 pixmaps/ini48.xpm application-x-xboard-opt;\
+               $(XDG_ICON_RESOURCE) install --context mimetypes --size 32 pixmaps/board32.png application-x-chess-pgn;\
+               $(XDG_ICON_RESOURCE) install --context mimetypes --size 32 pixmaps/cross32.png application-x-xboard-trn;\
+               $(XDG_ICON_RESOURCE) install --context mimetypes --size 32 pixmaps/ini32.png application-x-xboard-opt;\
+               $(XDG_ICON_RESOURCE) install --context mimetypes --size 48 pixmaps/board48.png application-x-chess-pgn;\
+               $(XDG_ICON_RESOURCE) install --context mimetypes --size 48 pixmaps/cross48.png application-x-xboard-trn;\
+               $(XDG_ICON_RESOURCE) install --context mimetypes --size 48 pixmaps/ini48.png application-x-xboard-opt;\
        fi
 endif
 
@@ -211,11 +254,94 @@ if ENABLE_UPDATE_MIMEDB
                $(XDG_DESKTOP_MENU) uninstall --mode system --novendor xboard-fen-viewer.desktop;\
                $(XDG_DESKTOP_MENU) uninstall --mode system --novendor xboard-tourney.desktop;\
                $(XDG_DESKTOP_MENU) uninstall --mode system --novendor xboard-config.desktop;\
-               $(XDG_ICON_RESOURCE) uninstall --context mimetypes --size 32 board32.xpm application-x-chess-pgn;\
-               $(XDG_ICON_RESOURCE) uninstall --context mimetypes --size 32 cross32.xpm application-x-xboard-trn;\
-               $(XDG_ICON_RESOURCE) uninstall --context mimetypes --size 32 ini32.xpm application-x-xboard-opt;\
-               $(XDG_ICON_RESOURCE) uninstall --context mimetypes --size 48 board48.xpm application-x-chess-pgn;\
-               $(XDG_ICON_RESOURCE) uninstall --context mimetypes --size 48 cross48.xpm application-x-xboard-trn;\
-               $(XDG_ICON_RESOURCE) uninstall --context mimetypes --size 48 ini48.xpm application-x-xboard-opt;\
+               $(XDG_ICON_RESOURCE) uninstall --context mimetypes --size 32 board32.png application-x-chess-pgn;\
+               $(XDG_ICON_RESOURCE) uninstall --context mimetypes --size 32 cross32.png application-x-xboard-trn;\
+               $(XDG_ICON_RESOURCE) uninstall --context mimetypes --size 32 ini32.png application-x-xboard-opt;\
+               $(XDG_ICON_RESOURCE) uninstall --context mimetypes --size 48 board48.png application-x-chess-pgn;\
+               $(XDG_ICON_RESOURCE) uninstall --context mimetypes --size 48 cross48.png application-x-xboard-trn;\
+               $(XDG_ICON_RESOURCE) uninstall --context mimetypes --size 48 ini48.png application-x-xboard-opt;\
        fi
 endif
+
+if OSX_APP
+osxapp: all-recursive install install-recursive
+macportsprefix = $(shell which port | sed s/[/]bin[/]port//)
+       $(MKDIR_P) $(datarootdir)/bin
+       $(MKDIR_P) $(datarootdir)/lib
+       $(MKDIR_P) $(sysconfdir)/gtk-2.0
+       $(MKDIR_P) $(datadir)/themes
+       $(MKDIR_P) $(datadir)/gtk-engines
+       $(MKDIR_P) $(gamedatadir)/themes
+       $(INSTALL) ./osxapp/Info.plist $(prefix)
+       $(INSTALL) ./osxapp/PkgInfo $(prefix)
+       $(INSTALL) ./osxapp/XBoard.gtklauncher $(bindir)/XBoard
+       $(INSTALL) ./xboard $(bindir)/xboard-bin
+       cp -R ./osxapp/icons/. $(datarootdir)
+       sed -e 's?-soundProgram "aplay -q"?-soundProgram "afplay"?'\
+            -e 's?-firstChessProgram fairymax?-firstChessProgram "./fairymax"?'\
+           -e 's?-firstChessProgramNames {fairymax?-firstChessProgramNames {"fairymax" -fcp "./fairymax" -fd "~~/../../bin/fairymax"?'\
+           -e 's?"Fruit 2.1" -fcp fruit -fUCI?"fruit" -fcp "./fruit" -fd "~~/../../bin/fruit" -fUCI?'\
+           -e '/"Crafty" -fcp crafty/d'\
+           -e '/"GNU Chess" -fcp gnuchess/d'\
+           -e 's?"icc" -icshost chessclub.com -icshelper timestamp?"icc" -icshost 207.99.83.228 -icshelper timestamp?'\
+           -e 's?"kc" -icshost alanimus.com -icshelper timeseal?"vics" -icshost winboard.nl -icshelper timeseal?'\
+           -e '/; Save user settings./d'\
+           -e '/; Must be last in file to make user options prevail over system-wide settings!/d'\
+           -e '/-saveSettingsOnExit true/d'\
+           -e '/-saveSettingsFile "~\/.xboardrc"/d'\
+           -e '/-settingsFile "~\/.xboardrc"/d'<./xboard.conf >$(sysconfdir)/xboard.conf
+       echo '; OSX' >>$(sysconfdir)/xboard.conf
+       echo ';'>>$(sysconfdir)/xboard.conf
+       echo '-clockFont "Sans Bold 26" '>>$(sysconfdir)/xboard.conf
+       echo '-pieceImageDirectory "~~/themes/default"' >>$(sysconfdir)/xboard.conf
+       echo '-autoLogo true' >>$(sysconfdir)/xboard.conf
+       echo '-logoDir "~~/logos"' >>$(sysconfdir)/xboard.conf
+       echo '-logoSize 100' >>$(sysconfdir)/xboard.conf
+       echo '-openCommand "open"' >>$(sysconfdir)/xboard.conf
+       echo '-firstDirectory "~~/../../bin/fairymax"' >>$(sysconfdir)/xboard.conf
+       echo '-secondDirectory "~~/../../bin/fairymax"' >>$(sysconfdir)/xboard.conf
+       echo '-secondChessProgram "./fairymax"' >>$(sysconfdir)/xboard.conf
+       echo '-uxiAdapter "uci2wb -%variant %fcp %fd"' >>$(sysconfdir)/xboard.conf
+       echo ';' >>$(sysconfdir)/xboard.conf
+       echo '; Save user settings.' >>$(sysconfdir)/xboard.conf
+       echo '; Must be last in file to make user options prevail over system-wide settings!' >>$(sysconfdir)/xboard.conf
+       echo ';' >>$(sysconfdir)/xboard.conf
+       echo '-saveSettingsOnExit true' >>$(sysconfdir)/xboard.conf
+       echo '-saveSettingsFile "~/Library/Preferences/XBoard.conf"' >>$(sysconfdir)/xboard.conf
+       echo '-settingsFile "~/Library/Preferences/XBoard.conf"' >>$(sysconfdir)/xboard.conf
+
+       sed 's?$(macportsprefix)/lib?/tmp/skl/XBoard.app/Contents/Resources/lib?' <$(macportsprefix)/etc/gtk-2.0/gdk-pixbuf.loaders >$(sysconfdir)/gtk-2.0/gdk-pixbuf.loaders
+       sed -e 's?$(macportsprefix)/lib?/tmp/skl/XBoard.app/Contents/Resources/lib?' -e 's?$(macportsprefix)/share/locale?/tmp/skl/XBoard.app/Contents/Resources/share/locale?' <$(macportsprefix)/etc/gtk-2.0/gtk.immodules >$(sysconfdir)/gtk-2.0/gtk.immodules
+       $(INSTALL) ./osxapp/launcher_rc $(datarootdir)/
+       $(INSTALL) $(macportsprefix)/etc/gtk-2.0/im-multipress.conf $(sysconfdir)/gtk-2.0
+       $(INSTALL) ./osxapp/gtkrc $(sysconfdir)/gtk-2.0/gtkrc
+       cp -R $(macportsprefix)/lib/gtk-2.0 $(datarootdir)/lib
+       cp -R $(macportsprefix)/lib/gdk-pixbuf-2.0 $(datarootdir)/lib
+       cp -R $(macportsprefix)/share/themes/Mac $(datadir)/themes
+       cp -R ./osxapp/gtk2-themes/Mac/gtk-2.0 $(datadir)/themes/Mac
+       cp -R ./osxapp/themes/default/. $(gamedatadir)/themes/default
+       cp $(macportsprefix)/share/gtk-engines/murrine.xml $(datadir)/gtk-engines/murrine.xml
+       $(INSTALL) ./png/marble_d.png $(gamedatadir)/themes/textures
+       $(INSTALL) ./png/marble_l.png $(gamedatadir)/themes/textures
+       $(INSTALL) ./png/xqwood-9x10.png $(gamedatadir)/themes/textures
+       cp -R ./osxapp/logos $(gamedatadir)/
+if NLS_ENABLED
+       cp -R $(macportsprefix)/share/strings/. $(datarootdir)/
+       for i in po/*gmo; do lang=`basename $$i .gmo`; $(INSTALL) $(macportsprefix)/share/locale/$$lang/LC_MESSAGES/gtk20.mo $(localedir)/$$lang/LC_MESSAGES/; done
+endif
+       dylibbundler -of -b -x $(bindir)/xboard-bin -d $(datarootdir)/lib -p @executable_path/../Resources/lib
+       dylibbundler -of -b -x $(datarootdir)/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so -d $(datarootdir)/lib -p @executable_path/../Resources/lib
+       dylibbundler -of -b -x $(datarootdir)/lib/gtk-2.0/2.10.0/immodules/im-quartz.so -d $(datarootdir)/lib -p @executable_path/../Resources/lib
+       dylibbundler -of -b -x $(datarootdir)/lib/gtk-2.0/2.10.0/engines/libpixmap.so -d $(datarootdir)/lib -p @executable_path/../Resources/lib
+       dylibbundler -of -b -x $(datarootdir)/lib/gtk-2.0/2.10.0/engines/libmurrine.so -d $(datarootdir)/lib -p @executable_path/../Resources/lib
+       find ./XBoard.app -name '*.a' -print0 | xargs -0 rm
+       rm -r $(datarootdir)/lib/gtk-2.0/include
+       rm -r $(datarootdir)/share/applications
+       rm $(datarootdir)/share/info/dir
+       rm -r $(datarootdir)/share/icons
+       rm -r $(datarootdir)/share/mime
+       mv $(datarootdir)/share/games/xboard/themes/conf $(datarootdir)/share/xboard/conf
+       rm -r $(datarootdir)/share/xboard/pixmaps
+       rm -r $(datarootdir)/share/games
+endif
+