Win32 port
[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 # Demo program
47 if NOTWIN32
48 AM_LDFLAGS += -static
49 endif
50
51 bin_PROGRAMS = gis-demo
52
53 gis_demo_SOURCES  = gis-demo.c
54 gis_demo_LDADD    = $(AM_LDADD) libgis.la
55
56 # Test programs
57 noinst_PROGRAMS = gis-test tile-test
58
59 gis_test_SOURCES = gis-test.c
60 gis_test_LDADD   = $(AM_LDADD) libgis.la
61
62 tile_test_SOURCES = tile-test.c
63 tile_test_LDADD   = $(AM_LDADD) libgis.la
64
65
66 MAINTAINERCLEANFILES = Makefile.in
67
68 .list.c:
69         glib-genmarshal --prefix=gis_cclosure_marshal --body   $< > $@
70 .list.h:
71         glib-genmarshal --prefix=gis_cclosure_marshal --header $< > $@
72
73 test: all .libs/gis
74         ./gis-test
75
76 gdb: all .libs/gis
77         gdb ./gis-test
78
79 ddd: all .libs/gis
80         ddd ./gis-test
81
82 .libs/gis: plugins/.libs
83         ln -sf ../plugins/.libs .libs/gis
84
85 memcheck: all
86         G_SLICE=always-malloc                   \
87         G_DEBUG=gc-friendly,resident-modules    \
88         valgrind --track-origins=yes            \
89                  --leak-check=full              \
90                  --leak-resolution=high         \
91                  --num-callers=50               \
92                  --suppressions=gtk.suppression \
93                  ./gis-test                     \
94         2> valgrind.out