+check_PROGRAMS = t/boardmove t/boardbit t/ewmhicon t/rng-test
+EXTRA_DIST += t/xos256ss.c
+
+t_boardmove_SOURCES = t/boardmove.c src/game.c
+t_boardmove_LDADD = libgnu.a $(LIB_CLOCK_GETTIME) $(LIB_GETHRXTIME)
+$(t_boardmove_OBJECTS): $(gnulib_headers)
+
+t_boardbit_SOURCES = t/boardbit.c
+t_boardbit_LDADD = libgnu.a
+$(t_boardbit_OBJECTS): $(gnulib_headers)
+
+t_ewmhicon_SOURCES = t/ewmhicon.c src/ewmhicon.c common/src/help.c
+t_ewmhicon_LDADD = libgnu.a $(MOTIF_LIBS)
+$(t_ewmhicon_OBJECTS): $(gnulib_headers)
+
+t_rng_test_LDADD = libgnu.a
+$(t_rng_test_OBJECTS): $(gnulib_headers)
+
+GENPNG_V = $(GENPNG_V_@AM_V@)
+GENPNG_V_ = $(GENPNG_V_@AM_DEFAULT_V@)
+GENPNG_V_0 = @printf ' %$(DX_ALIGN_V)s %s\n' 'GEN ' $*.png;
+
+$(GENICONS:.png=.gen):
+ $(GENPNG_V) $(MKDIR_P) $(@D)
+ $(AM_V_at) s=`expr $(@F) : '[^0-9]*\([^.]*\)'`; \
+ t/ewmhicon$(EXEEXT) -c yrwyogbbg "$$s" >$*.xpm
+if USE_NETPBM
+ $(AM_V_at) $(XPMTOPPM) $*.xpm | $(PNMTOPNG) >$*-t.png
+else
+if USE_CONVERT
+ $(AM_V_at) $(CONVERT) $*.xpm $*-t.png
+endif
+endif
+ $(AM_V_at) $(OPTIPNG) -o7 -quiet $*-t.png
+ $(AM_V_at) mv -f $*-t.png $*.png
+MOSTLYCLEANFILES += $(GENICONS:.png=-t.png)
+DISTCLEANFILES += $(GENICONS:.png=.xpm)
+MAINTAINERCLEANFILES += $(GENICONS)
+SUFFIXES = .gen
+
+GENICONS = data/rr48x48.png data/rr32x32.png data/rr24x24.png data/rr16x16.png
+$(GENICONS): ;
+
+build-icons: t/ewmhicon$(EXEEXT) $(GENICONS)
+ $(AM_V_at) set x $(GENICONS:.png=); shift; for f; do shift; \
+ test -f "$$f.png" || test -f "$(srcdir)/$$f.png" || \
+ { set x "$$@" "$$f.gen"; shift; }; \
+ done; $(MAKE) $(AM_MAKEFLAGS) "$$@"
+.PHONY: build-icons
+
+dist-hook: dist-icons
+dist-icons: build-icons
+ $(MKDIR_P) $(distdir)/data
+ for f in $(GENICONS); do \
+ if test -f "$$f"; \
+ then cp "$$f" "$(distdir)/data" || exit; \
+ else cp "$(srcdir)/$$f" "$(distdir)/data" || exit; \
+ fi; done
+.PHONY: dist-icons
+
+iconsdir = $(datarootdir)/icons/hicolor
+
+install-data-local: install-icons
+install-icons: build-icons
+ for f in $(GENICONS); do \
+ s=`expr "$$f" : '[^0-9]*\([^.]*\)'`; \
+ od="$(DESTDIR)$(iconsdir)/$$s/apps"; \
+ $(MKDIR_P) "$$od"; if test -f "$$f"; \
+ then $(INSTALL_DATA) "$$f" "$$od/$(PACKAGE_TARNAME).png"; \
+ else $(INSTALL_DATA) "$(srcdir)/$$f" "$$od/$(PACKAGE_TARNAME).png";\
+ fi; done
+.PHONY: install-icons