]> Pileus Git - grits/blobdiff - src/Makefile.am
Reorganize BMNG and SRTM into plugins
[grits] / src / Makefile.am
index 18976bc36dac8d84f8eb08932cbe2116f5459888..97ec6ba438d4c633dd5fbd05b57910cb08f2b9ab 100644 (file)
@@ -1,35 +1,76 @@
-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    \
+       gpqueue.h     \
+       roam.h        \
+       wms.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    \
+       roam.c        roam.h        \
+       wms.c         wms.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 wms.c wms.h
+wms_test_LDADD    = $(AM_LDADD)
 
-CLEANFILES = gmon.out valgrind.out
 MAINTAINERCLEANFILES = Makefile.in
 
+.list.c:
+       glib-genmarshal --prefix=gis_cclosure_marshal --body   $< > $@
+.list.h:
+       glib-genmarshal --prefix=gis_cclosure_marshal --header $< > $@
+
 test: all
-       ./aweather -o -d 7 -s KVNX
+       ./gis_test
 
 gdb: all
-       gdb ./aweather
+       gdb ./gis_test
 
 ddd: all
-       ddd ./aweather
-
-memcheck:
-       G_SLICE=always-malloc                   \
-       G_DEBUG=gc-friendly,resident-modules    \
-       valgrind --leak-check=full              \
-                --leak-resolution=high         \
-                --num-callers=100              \
-                --suppressions=gtk.suppression \
-                ./aweather                     \
+       ddd ./gis_test
+
+memcheck: all
+       LD_LIBRARY_PATH=.libs                      \
+       G_SLICE=always-malloc                      \
+       G_DEBUG=gc-friendly,resident-modules       \
+       valgrind --track-origins=yes               \
+                --leak-check=full                 \
+                --leak-resolution=high            \
+                --num-callers=100                 \
+                --suppressions=../gtk.suppression \
+                .libs/gis_test                    \
        2> valgrind.out