]> Pileus Git - grits/blob - src/Makefile.am
Move data access to a subdirectory
[grits] / src / Makefile.am
1 SUBDIRS = data objects . plugins
2
3 AM_CFLAGS   = -Wall --std=gnu99 -I$(top_srcdir)/src
4 AM_CPPFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS) $(SOUP_CFLAGS)
5 AM_LDADD    = $(GLIB_LIBS) $(GTK_LIBS) $(SOUP_LIBS)
6 AM_LDFLAGS  = --as-needed -no-undefined
7
8 BUILT_SOURCES = gis-marshal.c gis-marshal.h
9
10
11 # Headers
12 gis_includedir = $(includedir)/gis
13 gis_include_HEADERS = \
14         gis.h         \
15         gis-viewer.h  \
16         gis-prefs.h   \
17         gis-opengl.h  \
18         gis-plugin.h  \
19         gis-util.h    \
20         gpqueue.h     \
21         roam.h
22
23 # Pkg-config
24 pkgconfigdir = $(libdir)/pkgconfig
25 pkgconfig_DATA = libgis.pc
26
27 # Library
28 lib_LTLIBRARIES = libgis.la
29
30 libgis_la_SOURCES = gis.h \
31         gis-viewer.c  gis-viewer.h  \
32         gis-prefs.c   gis-prefs.h   \
33         gis-opengl.c  gis-opengl.h  \
34         gis-plugin.c  gis-plugin.h  \
35         gis-marshal.c gis-marshal.h \
36         gis-util.c    gis-util.h    \
37         roam.c        roam.h        \
38         gpqueue.c     gpqueue.h
39 libgis_la_CPPFLAGS = $(AM_CPPFLAGS) \
40         -DPKGDATADIR="\"$(datadir)/gis\"" \
41         -DPLUGINSDIR="\"$(libdir)/gis\""
42 libgis_la_LIBADD  = $(AM_LDADD) \
43         objects/libgis-objects.la \
44         data/libgis-data.la
45
46 # Test programs
47 bin_PROGRAMS = gis-demo tile-test
48
49 gis_demo_SOURCES  = gis-demo.c
50 gis_demo_LDADD    = $(AM_LDADD) libgis.la
51 gis_demo_LDFLAGS  = $(AM_LDFLAGS) -static
52
53 tile_test_SOURCES = tile-test.c
54 tile_test_LDADD   = $(AM_LDADD) libgis.la
55 tile_test_LDFLAGS = $(AM_LDFLAGS) -static
56
57
58 MAINTAINERCLEANFILES = Makefile.in
59
60 .list.c:
61         glib-genmarshal --prefix=gis_cclosure_marshal --body   $< > $@
62 .list.h:
63         glib-genmarshal --prefix=gis_cclosure_marshal --header $< > $@
64
65 test: all .libs/gis
66         ./gis-demo
67
68 gdb: all .libs/gis
69         gdb ./gis-demo
70
71 ddd: all .libs/gis
72         ddd ./gis-demo
73
74 .libs/gis: plugins/.libs
75         ln -sf ../plugins/.libs .libs/gis
76
77 memcheck: all
78         G_SLICE=always-malloc                   \
79         G_DEBUG=gc-friendly,resident-modules    \
80         valgrind --track-origins=yes            \
81                  --leak-check=full              \
82                  --leak-resolution=high         \
83                  --num-callers=50               \
84                  --suppressions=gtk.suppression \
85                  ./gis-demo                     \
86         2> valgrind.out