perl: Move perl module to src/perl
[people/ms/libloc.git] / Makefile.am
CommitLineData
46aded9a
MT
1EXTRA_DIST =
2CLEANFILES =
3ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
4AM_MAKEFLAGS = --no-print-directory
5
2bb7d64e
MT
6SUBDIRS = . po
7
46aded9a
MT
8AM_CPPFLAGS = \
9 -include $(top_builddir)/config.h \
10 -DSYSCONFDIR=\""$(sysconfdir)"\" \
11 -I${top_srcdir}/src
12
13AM_CFLAGS = ${my_CFLAGS} \
46aded9a
MT
14 -ffunction-sections \
15 -fdata-sections
16
17AM_LDFLAGS = \
18 -Wl,--gc-sections \
19 -Wl,--as-needed
20
21LIBLOC_CURRENT=0
22LIBLOC_REVISION=0
23LIBLOC_AGE=0
24
25SED_PROCESS = \
26 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
27 -e 's,@VERSION\@,$(VERSION),g' \
28 -e 's,@prefix\@,$(prefix),g' \
29 -e 's,@exec_prefix\@,$(exec_prefix),g' \
30 -e 's,@libdir\@,$(libdir),g' \
31 -e 's,@includedir\@,$(includedir),g' \
73d1b258 32 -e 's,@databasedir\@,$(databasedir),g' \
46aded9a
MT
33 < $< > $@ || rm $@
34
73d1b258 35databasedir = $(datadir)/location
46aded9a
MT
36pkgconfigdir = $(libdir)/pkgconfig
37
73d1b258 38%: %.in Makefile
46aded9a
MT
39 $(SED_PROCESS)
40
2bb7d64e
MT
41@INTLTOOL_POLICY_RULE@
42
43.PHONY: update-po
44update-po:
45 $(MAKE) -C po update-po
46
e51e1dec
MT
47EXTRA_DIST += \
48 examples/python/create-database.py \
49 examples/python/read-database.py
50
46aded9a 51pkginclude_HEADERS = \
c182393f 52 src/loc/libloc.h \
9fc7f001
MT
53 src/loc/as.h \
54 src/loc/database.h \
55 src/loc/format.h \
56 src/loc/network.h \
57 src/loc/private.h \
58 src/loc/stringpool.h \
c182393f 59 src/loc/writer.h
46aded9a
MT
60
61lib_LTLIBRARIES = \
62 src/libloc.la
63
9fc7f001 64src_libloc_la_SOURCES = \
62b83e6d 65 src/libloc.c \
a5db3e49 66 src/as.c \
2601e83e 67 src/database.c \
3b5f4af2 68 src/network.c \
62b83e6d 69 src/stringpool.c \
c182393f 70 src/writer.c
46aded9a
MT
71
72EXTRA_DIST += src/libloc.sym
73
18e2b14c
MT
74src_libloc_la_CFLAGS = \
75 $(AM_CFLAGS) \
1a3cb1b4 76 -DLIBLOC_PRIVATE \
18e2b14c
MT
77 -fvisibility=hidden
78
46aded9a
MT
79src_libloc_la_LDFLAGS = \
80 $(AM_LDFLAGS) \
81 -version-info $(LIBLOC_CURRENT):$(LIBLOC_REVISION):$(LIBLOC_AGE) \
82 -Wl,--version-script=$(top_srcdir)/src/libloc.sym
83
84src_libloc_la_DEPENDENCIES = \
85 ${top_srcdir}/src/libloc.sym
86
87pkgconfig_DATA = \
88 src/libloc.pc
89
90EXTRA_DIST += \
91 src/libloc.pc.in
92
93CLEANFILES += \
94 src/libloc.pc
95
a2ab8ddf 96pyexec_LTLIBRARIES = \
18e2b14c
MT
97 src/python/location.la
98
99src_python_location_la_SOURCES = \
9cdf6c53 100 src/python/locationmodule.c \
62ffafdd 101 src/python/locationmodule.h \
fadebc89
MT
102 src/python/as.c \
103 src/python/as.h \
9cdf6c53 104 src/python/database.c \
d688e569 105 src/python/database.h \
39967361
MT
106 src/python/network.c \
107 src/python/network.h \
d688e569
MT
108 src/python/writer.c \
109 src/python/writer.h
18e2b14c
MT
110
111src_python_location_la_CFLAGS = \
112 $(AM_CFLAGS) \
113 $(PYTHON_CFLAGS)
114
115src_python_location_la_LDFLAGS = \
116 $(AM_LDFLAGS) \
117 -shared \
118 -module \
119 -avoid-version
120
121src_python_location_la_LIBADD = \
122 src/libloc.la \
123 $(PYTHON_LIBS)
124
5118a4b8
MT
125bin_SCRIPTS = \
126 src/python/location-query
127
73d1b258
MT
128EXTRA_DIST += \
129 src/python/location-query.in
130
131CLEANFILES += \
132 src/python/location-query
133
30ac38a1
MT
134TESTS_CFLAGS = \
135 $(AM_CFLAGS) \
136 -DLIBLOC_PRIVATE
137
46aded9a 138TESTS = \
62b83e6d 139 src/test-libloc \
2601e83e 140 src/test-stringpool \
a5db3e49 141 src/test-database \
3b5f4af2
MT
142 src/test-as \
143 src/test-network
46aded9a 144
f3bf970a
MT
145CLEANFILES += \
146 test.db
147
46aded9a 148check_PROGRAMS = \
62b83e6d 149 src/test-libloc \
2601e83e 150 src/test-stringpool \
a5db3e49 151 src/test-database \
3b5f4af2
MT
152 src/test-as \
153 src/test-network
46aded9a
MT
154
155src_test_libloc_SOURCES = \
156 src/test-libloc.c
157
30ac38a1
MT
158src_test_libloc_CFLAGS = \
159 $(TESTS_CFLAGS)
160
46aded9a
MT
161src_test_libloc_LDADD = \
162 src/libloc.la
62b83e6d 163
a5db3e49
MT
164src_test_as_SOURCES = \
165 src/test-as.c
166
30ac38a1
MT
167src_test_as_CFLAGS = \
168 $(TESTS_CFLAGS)
169
a5db3e49
MT
170src_test_as_LDADD = \
171 src/libloc.la
172
3b5f4af2
MT
173src_test_network_SOURCES = \
174 src/test-network.c
175
30ac38a1
MT
176src_test_network_CFLAGS = \
177 $(TESTS_CFLAGS)
178
3b5f4af2
MT
179src_test_network_LDADD = \
180 src/libloc.la
181
62b83e6d
MT
182src_test_stringpool_SOURCES = \
183 src/test-stringpool.c
184
30ac38a1
MT
185src_test_stringpool_CFLAGS = \
186 $(TESTS_CFLAGS)
187
62b83e6d
MT
188src_test_stringpool_LDADD = \
189 src/libloc.la
2601e83e
MT
190
191src_test_database_SOURCES = \
192 src/test-database.c
193
30ac38a1
MT
194src_test_database_CFLAGS = \
195 $(TESTS_CFLAGS)
196
2601e83e
MT
197src_test_database_LDADD = \
198 src/libloc.la