python: Add Database class
[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 = \
a5db3e49 39 src/loc/format.h \
c182393f
MT
40 src/loc/libloc.h \
41 src/loc/writer.h
46aded9a
MT
42
43lib_LTLIBRARIES = \
44 src/libloc.la
45
46src_libloc_la_SOURCES =\
47 src/libloc-private.h \
62b83e6d 48 src/libloc.c \
a5db3e49
MT
49 src/as.c \
50 src/as.h \
2601e83e
MT
51 src/database.c \
52 src/database.h \
3b5f4af2 53 src/network.c \
62b83e6d 54 src/stringpool.c \
c182393f
MT
55 src/stringpool.h \
56 src/writer.c
46aded9a
MT
57
58EXTRA_DIST += src/libloc.sym
59
18e2b14c
MT
60src_libloc_la_CFLAGS = \
61 $(AM_CFLAGS) \
62 -fvisibility=hidden
63
46aded9a
MT
64src_libloc_la_LDFLAGS = \
65 $(AM_LDFLAGS) \
66 -version-info $(LIBLOC_CURRENT):$(LIBLOC_REVISION):$(LIBLOC_AGE) \
67 -Wl,--version-script=$(top_srcdir)/src/libloc.sym
68
69src_libloc_la_DEPENDENCIES = \
70 ${top_srcdir}/src/libloc.sym
71
72pkgconfig_DATA = \
73 src/libloc.pc
74
75EXTRA_DIST += \
76 src/libloc.pc.in
77
78CLEANFILES += \
79 src/libloc.pc
80
18e2b14c
MT
81pkgpyexec_LTLIBRARIES = \
82 src/python/location.la
83
84src_python_location_la_SOURCES = \
9cdf6c53
MT
85 src/python/locationmodule.c \
86 src/python/database.c \
87 src/python/database.h
18e2b14c
MT
88
89src_python_location_la_CFLAGS = \
90 $(AM_CFLAGS) \
91 $(PYTHON_CFLAGS)
92
93src_python_location_la_LDFLAGS = \
94 $(AM_LDFLAGS) \
95 -shared \
96 -module \
97 -avoid-version
98
99src_python_location_la_LIBADD = \
100 src/libloc.la \
101 $(PYTHON_LIBS)
102
46aded9a 103TESTS = \
62b83e6d 104 src/test-libloc \
2601e83e 105 src/test-stringpool \
a5db3e49 106 src/test-database \
3b5f4af2
MT
107 src/test-as \
108 src/test-network
46aded9a
MT
109
110check_PROGRAMS = \
62b83e6d 111 src/test-libloc \
2601e83e 112 src/test-stringpool \
a5db3e49 113 src/test-database \
3b5f4af2
MT
114 src/test-as \
115 src/test-network
46aded9a
MT
116
117src_test_libloc_SOURCES = \
118 src/test-libloc.c
119
120src_test_libloc_LDADD = \
121 src/libloc.la
62b83e6d 122
a5db3e49
MT
123src_test_as_SOURCES = \
124 src/test-as.c
125
126src_test_as_LDADD = \
127 src/libloc.la
128
3b5f4af2
MT
129src_test_network_SOURCES = \
130 src/test-network.c
131
132src_test_network_LDADD = \
133 src/libloc.la
134
62b83e6d
MT
135src_test_stringpool_SOURCES = \
136 src/test-stringpool.c
137
138src_test_stringpool_LDADD = \
139 src/libloc.la
2601e83e
MT
140
141src_test_database_SOURCES = \
142 src/test-database.c
143
144src_test_database_LDADD = \
145 src/libloc.la