chiark / gitweb /
remove redundant color
[disorder] / disobedience / Makefile.am
index 561f8bb..eb257d6 100644 (file)
@@ -22,11 +22,12 @@ 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 \
+                 choose.c misc.c control.c properties.c menu.c \
                  log.c progress.c login.c rtp.c help.c \
-                 ../lib/memgc.c
+                 ../lib/memgc.c appearance.c
 disobedience_LDADD=../lib/libdisorder.a $(LIBPCRE) $(LIBGC) $(LIBGCRYPT)
 disobedience_LDFLAGS=$(GTK_LIBS)
 
@@ -35,11 +36,7 @@ install-exec-hook:
 
 check: check-help
 
-disobedience.o: style.h
-
-style.h: ${srcdir}/disobedience.rc ${top_srcdir}/scripts/text2c
-       ${top_srcdir}/scripts/text2c style ${srcdir}/disobedience.rc > $@.tmp
-       mv $@.tmp $@
+help.o: manual.h
 
 manual.html: ../doc/disobedience.1 $(top_srcdir)/scripts/htmlman
        rm -f $@.new
@@ -51,7 +48,21 @@ manual.h: manual.html ${top_srcdir}/scripts/text2c
        ${top_srcdir}/scripts/text2c manual manual.html > $@.tmp
        mv $@.tmp $@
 
-EXTRA_DIST=disobedience.rc
+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 $@
 
 # check everything has working --help
 check-help: all