X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;ds=sidebyside;f=src%2FMakefile.am;h=70ebf3c8c05e5630e291d4fd4e238e5b6b8181bc;hb=becee285e152746e64b6d3984e2a7229f664062d;hp=9f317e6cf113f04eced9b1deefc37b18a2d058f4;hpb=d180b4f206c4fc1d41cfa36d8a2c44a5dc04cc63;p=grits diff --git a/src/Makefile.am b/src/Makefile.am index 9f317e6..70ebf3c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,36 +1,80 @@ -SUBDIRS = gis plugins +SUBDIRS = . plugins -AM_CFLAGS = -Wall -Werror -Wno-unused --std=gnu99 +AM_CFLAGS = -Wall --std=gnu99 +AM_CPPFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS) $(SOUP_CFLAGS) +AM_LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(SOUP_LIBS) -bin_PROGRAMS = aweather wsr88ddec -aweather_SOURCES = main.c \ - aweather-gui.c aweather-gui.h \ - aweather-location.c aweather-location.h -aweather_CPPFLAGS = -DDATADIR="\"$(datadir)\"" $(SOUP_CFLAGS) $(GLIB_CFLAGS) $(GTK_CFLAGS) -aweather_LDADD = gis/libgis.la $(SOUP_LIBS) $(GLIB_LIBS) $(GTK_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) -wsr88ddec = wsr88ddec.c -wsr88ddec_LDFLAGS = -lbz2 +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) -CLEANFILES = gmon.out valgrind.out MAINTAINERCLEANFILES = Makefile.in -test: all - LD_LIBRARY_PATH=gis/.libs .libs/aweather -o -d 7 -s KVNX +.list.c: + glib-genmarshal --prefix=gis_cclosure_marshal --body $< > $@ +.list.h: + glib-genmarshal --prefix=gis_cclosure_marshal --header $< > $@ + +test: all .libs/gis + ./gis_test + +gdb: all .libs/gis + gdb ./gis_test -gdb: all - LD_LIBRARY_PATH=gis/.libs gdb .libs/aweather +ddd: all .libs/gis + ddd ./gis_test -ddd: all - LD_LIBRARY_PATH=gis/.libs ddd .libs/aweather +.libs/gis: plugins/.libs + ln -sf ../plugins/.libs .libs/gis -memcheck: - LD_LIBRARY_PATH=gis/.libs/ \ +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 \ - .libs/aweather \ + ./gis_test \ 2> valgrind.out