]> Pileus Git - grits/blobdiff - src/Makefile.am
Fix misc bugs and bump version to 0.3
[grits] / src / Makefile.am
index 645fbed0a6dff86e771f8ff4b96a167197bacaa7..70ebf3c8c05e5630e291d4fd4e238e5b6b8181bc 100644 (file)
@@ -1,49 +1,80 @@
-AM_CFLAGS     = -Wall -Werror -Wno-unused --std=gnu99 
-bin_PROGRAMS  = aweather wsr88ddec
-
-BUILT_SOURCES = marshal.c marshal.h
-
-aweather_SOURCES  = main.c \
-       marshal.c         marshal.h         \
-       aweather-gui.c    aweather-gui.h    \
-       aweather-view.c   aweather-view.h   \
-       aweather-plugin.c aweather-plugin.h \
-       data.c            data.h            \
-       location.c        location.h        \
-       plugin-radar.c    plugin-radar.h    \
-       plugin-radar-colormap.c             \
-       plugin-ridge.c    plugin-ridge.h    \
-       plugin-example.c  plugin-example.h
-aweather_CPPFLAGS = -DDATADIR="\"$(datadir)\"" \
-       $(RSL_CFLAGS) $(SOUP_CFLAGS) $(GLIB_CFLAGS) $(GTK_CFLAGS)
-aweather_LDADD    = $(RSL_LIBS) $(SOUP_LIBS) $(GLIB_LIBS) $(GTK_LIBS)
-
-wsr88ddec         = wsr88ddec.c
-wsr88ddec_LDADD   = -lbz2
-
-CLEANFILES = gmon.out valgrind.out
+SUBDIRS = . plugins
+
+AM_CFLAGS   = -Wall --std=gnu99 
+AM_CPPFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS) $(SOUP_CFLAGS)
+AM_LDADD    = $(GLIB_LIBS) $(GTK_LIBS) $(SOUP_LIBS)
+
+# Library
+BUILT_SOURCES = gis-marshal.c gis-marshal.h
+lib_LTLIBRARIES  = libgis.la
+gis_includedir = $(includedir)/gis
+gis_include_HEADERS = \
+       gis.h         \
+       gis-world.h   \
+       gis-view.h    \
+       gis-prefs.h   \
+       gis-opengl.h  \
+       gis-plugin.h  \
+       gis-data.h    \
+       gis-tile.h    \
+       gis-wms.h     \
+       gpqueue.h     \
+       roam.h
+libgis_la_SOURCES = \
+       gis-world.c   gis-world.h   \
+       gis-view.c    gis-view.h    \
+       gis-prefs.c   gis-prefs.h   \
+       gis-opengl.c  gis-opengl.h  \
+       gis-plugin.c  gis-plugin.h  \
+       gis-marshal.c gis-marshal.h \
+       gis-data.c    gis-data.h    \
+       gis-tile.c    gis-tile.h    \
+       gis-wms.c     gis-wms.h     \
+       roam.c        roam.h        \
+       gpqueue.c     gpqueue.h
+libgis_la_CPPFLAGS = $(AM_CPPFLAGS) \
+       -DPKGDATADIR="\"$(datadir)/gis\"" -DPLUGINSDIR="\"$(libdir)/gis\""
+libgis_la_LIBADD = $(AM_LDADD)
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libgis.pc
+
+# Test programs
+bin_PROGRAMS = gis_test wms_test
+
+gis_test_SOURCES  = gis_test.c gis.h
+gis_test_LDFLAGS  = -static
+gis_test_LDADD    = $(AM_LDADD) libgis.la
+
+wms_test_SOURCES  = wms_test.c gis-world.c gis-world.h gis-wms.c gis-wms.h gis-tile.c gis-tile.h
+wms_test_LDADD    = $(AM_LDADD)
+
 MAINTAINERCLEANFILES = Makefile.in
 
 .list.c:
-       glib-genmarshal --prefix=aweather_cclosure_marshal --body   $< > $@
+       glib-genmarshal --prefix=gis_cclosure_marshal --body   $< > $@
 .list.h:
-       glib-genmarshal --prefix=aweather_cclosure_marshal --header $< > $@
+       glib-genmarshal --prefix=gis_cclosure_marshal --header $< > $@
+
+test: all .libs/gis
+       ./gis_test
 
-test: all
-       ./aweather -d 7
+gdb: all .libs/gis
+       gdb ./gis_test
 
-gdb: all
-       gdb ./aweather
+ddd: all .libs/gis
+       ddd ./gis_test
 
-ddd: all
-       ddd ./aweather
+.libs/gis: plugins/.libs
+       ln -sf ../plugins/.libs .libs/gis
 
-memcheck:
+memcheck: all
        G_SLICE=always-malloc                   \
        G_DEBUG=gc-friendly,resident-modules    \
-       valgrind --leak-check=full              \
+       valgrind --track-origins=yes            \
+                --leak-check=full              \
                 --leak-resolution=high         \
-                --num-callers=100              \
+                --num-callers=50               \
                 --suppressions=gtk.suppression \
-                ./aweather                     \
+                ./gis_test                     \
        2> valgrind.out