]> Pileus Git - grits/blobdiff - src/Makefile.am
Add version info for Debian
[grits] / src / Makefile.am
index 1c006359c643e3c83564f39a633c4f77d3160912..210cfe05816b1c0d070a1801bb5b05558aa18b79 100644 (file)
-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-plugin.c aweather-plugin.h \
-       gis-opengl.c      gis-opengl.h      \
-       gis-view.c        gis-view.h        \
-       gis-world.c       gis-world.h       \
-       data.c            data.h            \
-       location.c        location.h        \
-       marching.c        marching.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 = data objects . plugins
+
+AM_CFLAGS   = -Wall --std=gnu99 -I$(top_srcdir)/src
+AM_CPPFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS) $(SOUP_CFLAGS)
+AM_LDADD    = $(GLIB_LIBS) $(GTK_LIBS) $(SOUP_LIBS)
+AM_LDFLAGS  = --as-needed -no-undefined
+
+BUILT_SOURCES = gis-marshal.c gis-marshal.h
+
+
+# Headers
+gis_includedir = $(includedir)/gis
+gis_include_HEADERS = \
+       gis.h         \
+       gis-viewer.h  \
+       gis-prefs.h   \
+       gis-opengl.h  \
+       gis-plugin.h  \
+       gis-util.h    \
+       gpqueue.h     \
+       roam.h
+
+# Pkg-config
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libgis.pc
+
+# Library
+lib_LTLIBRARIES = libgis.la
+
+libgis_la_SOURCES = gis.h \
+       gis-viewer.c  gis-viewer.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-util.c    gis-util.h    \
+       roam.c        roam.h        \
+       gpqueue.c     gpqueue.h
+libgis_la_CPPFLAGS = $(AM_CPPFLAGS) \
+       -DPKGDATADIR="\"$(dots)$(datadir)/$(GIS_SUBDIR)\"" \
+       -DPLUGINSDIR="\"$(dots)$(libdir)/$(GIS_SUBDIR)\""
+libgis_la_LIBADD  = $(AM_LDADD) \
+       objects/libgis-objects.la \
+       data/libgis-data.la
+libgis_la_LDFLAGS = $(AM_LDFLAGS) \
+       -version-info $(LIB_VERSION)
+
+# Demo program
+if WIN32
+AM_LDFLAGS += -mwindows
+dots        = ..
+else
+BINLDFLAGS  = -static
+endif
+
+bin_PROGRAMS = gis-demo
+
+gis_demo_SOURCES  = gis-demo.c
+gis_demo_LDADD    = $(AM_LDADD) libgis.la
+gis_demo_LDFLAGS  = $(BINLDFLAGS)
+
+# Test programs
+noinst_PROGRAMS = gis-test tile-test
+
+gis_test_SOURCES = gis-test.c
+gis_test_LDADD   = $(AM_LDADD) libgis.la
+gis_test_LDFLAGS  = $(BINLDFLAGS)
+
+tile_test_SOURCES = tile-test.c
+tile_test_LDADD   = $(AM_LDADD) libgis.la
+tile_test_LDFLAGS = $(BINLDFLAGS)
+
+
 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_SUBDIR)
+       ./gis-test
 
-test: all
-       ./aweather -o -d 7 -s KVNX
+gdb: all .libs/$(GIS_SUBDIR)
+       gdb ./gis-test
 
-gdb: all
-       gdb ./aweather
+ddd: all .libs/$(GIS_SUBDIR)
+       ddd ./gis-test
 
-ddd: all
-       ddd ./aweather
+.libs/$(GIS_SUBDIR): plugins/.libs
+       ln -sf ../plugins/.libs .libs/$(GIS_SUBDIR)
 
-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