From: Guilhem Bonnefille Date: Fri, 30 Sep 2005 16:22:01 +0000 (+0000) Subject: Added ato-tools support for src/icons X-Git-Url: https://git.street.me.uk/andy/viking.git/commitdiff_plain/dad55b79c06c546aaf6ca88ef1d3631908691f19 Added ato-tools support for src/icons --- diff --git a/ChangeLog b/ChangeLog index 9ae467ec..1f9b1258 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2005-09-30 Guilhem BONNEFILLE + * configure.ac, src/Makefile.am (SUBDIRS): added auto-tools support for src/icons + 2005-09-29 Alex Foobarian : * Added support for waypoint symbols (changing, loading, saving), and a small number of icons. @@ -63,6 +66,11 @@ Alex Foobarian 's changes My (Evan's) changes: * Fix above v-vs-t patch to not crash on tracks without timestamp. * Not show v-vs-t graph and/or elevation map if the necessary data isn't there. +Guilhem BONNEFILLE 's changes + * bootstrap: new file to bootstrap auto-tools + * src/config.h (VIK_CONFIG_ALPHABETIZED_TRW): no more set via this file + * Makefile.am (bin_SCRIPTS): viking-remote added + * configure.ac: --enable-alphabetized-trw option added 2005-09-07 Autotools support by Guilhem Bonnefille. diff --git a/configure.ac b/configure.ac index 1c42bcd8..89cad9ff 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT(viking, 0.1.1pre1) +AC_INIT(viking, 0.1.1pre2) AM_INIT_AUTOMAKE() dnl AC_CONFIG_SRCDIR([src/main.c]) dnl AC_CONFIG_HEADERS([config.h]) @@ -11,6 +11,12 @@ dnl AC_CONFIG_HEADERS([config.h]) AC_PROG_CC AC_PROG_MAKE_SET +AC_CHECK_PROG([GDK_PIXBUF_CSOURCE],gdk-pixbuf-csource,[yes]) +if test $GDK_PIXBUF_CSOURCE != "yes" +then + AC_MSG_ERROR([gdk-pixbuf-csource is needed but not found]) +fi + # Checks for libraries. AM_PATH_GTK_2_0(2.2.0,,AC_MSG_ERROR(needs GTK+ 2.2.0),gthread) @@ -27,6 +33,8 @@ AC_FUNC_STAT AC_FUNC_STRTOD AC_CHECK_FUNCS([bzero floor gethostbyname memset mkdir pow realpath socket sqrt strcasecmp strchr strdup strncasecmp strtol strtoul]) +# Expat + # Options AC_ARG_ENABLE(alphabetized-trw, AC_HELP_STRING([--enable-alphabetized-trw], [enable alphabetized track & waypoints (default is enable)]), @@ -43,6 +51,7 @@ esac # Configuration AC_CONFIG_FILES([Makefile src/Makefile + src/icons/Makefile doc/Makefile doc/dev/Makefile]) AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am index 9f14dca0..5e876cc9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,8 +1,12 @@ # This is the Makefile for the viking gps viewer program. # This file is licensed through the GPL version 2 or newer. +SUBDIRS = icons + bin_PROGRAMS = viking viking_SOURCES = main.c \ + icons.h \ + menu.xml.h \ viking.h globals.h mapcoord.h config.h \ viktrack.c viktrack.h \ vikwaypoint.c vikwaypoint.h \ @@ -45,3 +49,9 @@ viking_SOURCES = main.c \ INCLUDES = @GTK_CFLAGS@ LDADD = @GTK_LIBS@ AM_CFLAGS = -Wall -g + +icons.h: icons/*_h + echo "/* Generated file */" > icons.h + for file in icons/*_h ; do echo "#include \"$$file\"" >> icons.h ; done + +CLEANFILES = icons.h \ No newline at end of file diff --git a/src/icons/Makefile.am b/src/icons/Makefile.am new file mode 100644 index 00000000..d03db796 --- /dev/null +++ b/src/icons/Makefile.am @@ -0,0 +1,31 @@ +WAYPOINT_ICONS = \ + wp_camp.png \ + wp_car.png \ + wp_deer.png \ + wp_flag.png \ + wp_geocache.png \ + wp_geocache_fnd.png \ + wp_house.png \ + wp_wpt_dot.png + +ICONS = \ + addtr_18.png \ + addwp_18.png \ + edtr_18.png \ + edwp_18.png \ + geomove_18.png \ + geozoom_18.png \ + mapdl_18.png \ + ruler_18.png \ + showpic_18.png \ + zoom_18.png + +EXTRA_DIST = $(ICONS) $(WAYPOINT_ICONS) + +BUILT_SOURCES = $(EXTRA_DIST:%.png=%.png_h) +CLEANFILES = $(BUILT_SOURCES) + +SUFFIXES = .png_h .png + +.png.png_h: + gdk-pixbuf-csource --name="`basename $< .png`" --struct $< > $@ \ No newline at end of file