database: Unmap all mapped sections when freeing database
[people/ms/libloc.git] / Makefile.am
CommitLineData
46aded9a
MT
1EXTRA_DIST =
2CLEANFILES =
3ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
4AM_MAKEFLAGS = --no-print-directory
5
6AM_CPPFLAGS = \
7 -include $(top_builddir)/config.h \
8 -DSYSCONFDIR=\""$(sysconfdir)"\" \
9 -I${top_srcdir}/src
10
11AM_CFLAGS = ${my_CFLAGS} \
46aded9a
MT
12 -ffunction-sections \
13 -fdata-sections
14
15AM_LDFLAGS = \
16 -Wl,--gc-sections \
17 -Wl,--as-needed
18
19LIBLOC_CURRENT=0
20LIBLOC_REVISION=0
21LIBLOC_AGE=0
22
23SED_PROCESS = \
24 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
25 -e 's,@VERSION\@,$(VERSION),g' \
26 -e 's,@prefix\@,$(prefix),g' \
27 -e 's,@exec_prefix\@,$(exec_prefix),g' \
28 -e 's,@libdir\@,$(libdir),g' \
29 -e 's,@includedir\@,$(includedir),g' \
30 < $< > $@ || rm $@
31
18e2b14c 32pythondir = $(pyexecdir)
46aded9a
MT
33pkgconfigdir = $(libdir)/pkgconfig
34
35%.pc: %.pc.in Makefile
36 $(SED_PROCESS)
37
38pkginclude_HEADERS = \
c182393f 39 src/loc/libloc.h \
9fc7f001
MT
40 src/loc/as.h \
41 src/loc/database.h \
42 src/loc/format.h \
43 src/loc/network.h \
44 src/loc/private.h \
45 src/loc/stringpool.h \
c182393f 46 src/loc/writer.h
46aded9a
MT
47
48lib_LTLIBRARIES = \
49 src/libloc.la
50
9fc7f001 51src_libloc_la_SOURCES = \
62b83e6d 52 src/libloc.c \
a5db3e49 53 src/as.c \
2601e83e 54 src/database.c \
3b5f4af2 55 src/network.c \
62b83e6d 56 src/stringpool.c \
c182393f 57 src/writer.c
46aded9a
MT
58
59EXTRA_DIST += src/libloc.sym
60
18e2b14c
MT
61src_libloc_la_CFLAGS = \
62 $(AM_CFLAGS) \
1a3cb1b4 63 -DLIBLOC_PRIVATE \
18e2b14c
MT
64 -fvisibility=hidden
65
46aded9a
MT
66src_libloc_la_LDFLAGS = \
67 $(AM_LDFLAGS) \
68 -version-info $(LIBLOC_CURRENT):$(LIBLOC_REVISION):$(LIBLOC_AGE) \
69 -Wl,--version-script=$(top_srcdir)/src/libloc.sym
70
71src_libloc_la_DEPENDENCIES = \
72 ${top_srcdir}/src/libloc.sym
73
74pkgconfig_DATA = \
75 src/libloc.pc
76
77EXTRA_DIST += \
78 src/libloc.pc.in
79
80CLEANFILES += \
81 src/libloc.pc
82
18e2b14c
MT
83pkgpyexec_LTLIBRARIES = \
84 src/python/location.la
85
86src_python_location_la_SOURCES = \
9cdf6c53 87 src/python/locationmodule.c \
62ffafdd 88 src/python/locationmodule.h \
fadebc89
MT
89 src/python/as.c \
90 src/python/as.h \
9cdf6c53 91 src/python/database.c \
d688e569 92 src/python/database.h \
39967361
MT
93 src/python/network.c \
94 src/python/network.h \
d688e569
MT
95 src/python/writer.c \
96 src/python/writer.h
18e2b14c
MT
97
98src_python_location_la_CFLAGS = \
99 $(AM_CFLAGS) \
100 $(PYTHON_CFLAGS)
101
102src_python_location_la_LDFLAGS = \
103 $(AM_LDFLAGS) \
104 -shared \
105 -module \
106 -avoid-version
107
108src_python_location_la_LIBADD = \
109 src/libloc.la \
110 $(PYTHON_LIBS)
111
46aded9a 112TESTS = \
62b83e6d 113 src/test-libloc \
2601e83e 114 src/test-stringpool \
a5db3e49 115 src/test-database \
3b5f4af2
MT
116 src/test-as \
117 src/test-network
46aded9a
MT
118
119check_PROGRAMS = \
62b83e6d 120 src/test-libloc \
2601e83e 121 src/test-stringpool \
a5db3e49 122 src/test-database \
3b5f4af2
MT
123 src/test-as \
124 src/test-network
46aded9a
MT
125
126src_test_libloc_SOURCES = \
127 src/test-libloc.c
128
129src_test_libloc_LDADD = \
130 src/libloc.la
62b83e6d 131
a5db3e49
MT
132src_test_as_SOURCES = \
133 src/test-as.c
134
135src_test_as_LDADD = \
136 src/libloc.la
137
3b5f4af2
MT
138src_test_network_SOURCES = \
139 src/test-network.c
140
141src_test_network_LDADD = \
142 src/libloc.la
143
62b83e6d
MT
144src_test_stringpool_SOURCES = \
145 src/test-stringpool.c
146
147src_test_stringpool_LDADD = \
148 src/libloc.la
2601e83e
MT
149
150src_test_database_SOURCES = \
151 src/test-database.c
152
153src_test_database_LDADD = \
154 src/libloc.la