]> git.street.me.uk Git - andy/viking.git/blobdiff - src/icons/Makefile.am
Remove dependencies to gob2
[andy/viking.git] / src / icons / Makefile.am
index c6372e97f8b13c93d8a7e045b7a9861f52c9d1ae..f57194ed2b57382c84431214e46f72ea6aab2a53 100644 (file)
@@ -91,10 +91,19 @@ ICONS = \
   geozoom_18.png \
   mapdl_18.png \
   demdl_18.png \
   geozoom_18.png \
   mapdl_18.png \
   demdl_18.png \
+  mover_22.png \
   ruler_18.png \
   showpic_18.png \
   zoom_18.png \
   ruler_18.png \
   showpic_18.png \
   zoom_18.png \
-  iscissors_18.png
+  iscissors_18.png \
+  thumbnails.png \
+  vikaggregatelayer.png \
+  vikcoordlayer.png \
+  vikdemlayer.png \
+  vikgeoreflayer.png \
+  vikgpslayer.png \
+  vikmapslayer.png \
+  viktrwlayer.png
 
 CURSORS = \
   cursor_addtr.png \
 
 CURSORS = \
   cursor_addtr.png \
@@ -108,21 +117,37 @@ CURSORS = \
   cursor_showpic.png \
   cursor_demdl.png \
   cursor_geomove.png \
   cursor_showpic.png \
   cursor_demdl.png \
   cursor_geomove.png \
-  cursor_mapdl.png
+  cursor_mapdl.png \
+  cursor_zoom.png
 
 ALL_ICONS = $(ICONS) $(WAYPOINT_ICONS) $(CURSORS)
 EXTRA_DIST = $(ALL_ICONS)
 
 ALL_ICONS = $(ICONS) $(WAYPOINT_ICONS) $(CURSORS)
 EXTRA_DIST = $(ALL_ICONS)
+ALL_ICONS_HEADER = $(ALL_ICONS:%.png=%_pixmap.h)
 
 
-BUILT_SOURCES = $(EXTRA_DIST:%.png=%.png_h) icons.h
+BUILT_SOURCES = $(ALL_ICONS_HEADER) icons.c icons.h
 CLEANFILES = $(BUILT_SOURCES)
 
 CLEANFILES = $(BUILT_SOURCES)
 
-SUFFIXES = .png_h .png
+noinst_LIBRARIES = libicons.a
+libicons_a_SOURCES = icons.c icons.h
 
 
-icons.h: $(ALL_ICONS:%.png=%.png_h)
-       echo "/* Generated file */" > icons.h
-       for file in *_h ; do echo "#include \"icons/$$file\"" >> icons.h ; done
+icons.h: $(ALL_ICONS_HEADER)
+       echo "/* Generated file */" > $@
+       sed -n "s/^\(const.*\) = {/extern \1;/p" *_pixmap.h >> $@
 
 
-.png.png_h:
-       gdk-pixbuf-csource --name="`basename $< .png`" --struct $< > $@
+icons.c: $(ALL_ICONS_HEADER)
+       echo "/* Generated file */" > $@
+       echo "#include <gdk-pixbuf/gdk-pixdata.h>" >> $@
+       for file in *_pixmap.h ; do echo "#include \"$$file\"" >> $@ ; done
+
+%_pixmap.h: %.png
+       gdk-pixbuf-csource --name="`basename $< .png`_pixbuf" --struct --extern $< > $@
        cat $@ | sed -e 's/\(pixel_data: ..\)/\1 (unsigned char \*)/' > temp.h
        mv temp.h $@
        cat $@ | sed -e 's/\(pixel_data: ..\)/\1 (unsigned char \*)/' > temp.h
        mv temp.h $@
+
+$(BUILT_SOURCES): $(srcdir)/Makefile.am
+
+INCLUDES        = @GTK_CFLAGS@
+AM_CFLAGS       = -Wall -g -D_GNU_SOURCE
+
+iconsdir = $(datadir)/icons
+icons_DATA = viking_icon.png