X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/ba40c570dbeb8550194947245ffb6b1e05c71f8e..54abef2bc0bbe4a578a2533239ef88e256e0a8b1:/disobedience/Makefile.am?ds=sidebyside diff --git a/disobedience/Makefile.am b/disobedience/Makefile.am index 9b18ca9..99abd7f 100644 --- a/disobedience/Makefile.am +++ b/disobedience/Makefile.am @@ -22,6 +22,7 @@ bin_PROGRAMS=disobedience AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib AM_CFLAGS=$(GLIB_CFLAGS) $(GTK_CFLAGS) +PNGS:=$(wildcard ${top_srcdir}/images/*.png) disobedience_SOURCES=disobedience.h disobedience.c client.c queue.c \ choose.c misc.c style.h control.c properties.c menu.c \ @@ -53,6 +54,22 @@ manual.h: manual.html ${top_srcdir}/scripts/text2c ${top_srcdir}/scripts/text2c manual manual.html > $@.tmp mv $@.tmp $@ +misc.o: images.h + +images.h: $(PNGS) + exec > @$.new; \ + for png in $(PNGS); do \ + name=`echo $$png | sed 's,.*/,,;s,\.png,,;'`; \ + gdk-pixbuf-csource --raw --name=image_$$name $$png; \ + done; \ + echo "static const struct image images[] = {"; \ + for png in $(PNGS); do \ + name=`echo $$png | sed 's,.*/,,;s,\.png,,;'`; \ + echo " { \"$$name.png\", image_$$name },"; \ + done; \ + echo "};" + mv @$.new $@ + EXTRA_DIST=disobedience.rc # check everything has working --help