Start a Python module
[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 = \
85 src/python/locationmodule.c
86
87src_python_location_la_CFLAGS = \
88 $(AM_CFLAGS) \
89 $(PYTHON_CFLAGS)
90
91src_python_location_la_LDFLAGS = \
92 $(AM_LDFLAGS) \
93 -shared \
94 -module \
95 -avoid-version
96
97src_python_location_la_LIBADD = \
98 src/libloc.la \
99 $(PYTHON_LIBS)
100
46aded9a 101TESTS = \
62b83e6d 102 src/test-libloc \
2601e83e 103 src/test-stringpool \
a5db3e49 104 src/test-database \
3b5f4af2
MT
105 src/test-as \
106 src/test-network
46aded9a
MT
107
108check_PROGRAMS = \
62b83e6d 109 src/test-libloc \
2601e83e 110 src/test-stringpool \
a5db3e49 111 src/test-database \
3b5f4af2
MT
112 src/test-as \
113 src/test-network
46aded9a
MT
114
115src_test_libloc_SOURCES = \
116 src/test-libloc.c
117
118src_test_libloc_LDADD = \
119 src/libloc.la
62b83e6d 120
a5db3e49
MT
121src_test_as_SOURCES = \
122 src/test-as.c
123
124src_test_as_LDADD = \
125 src/libloc.la
126
3b5f4af2
MT
127src_test_network_SOURCES = \
128 src/test-network.c
129
130src_test_network_LDADD = \
131 src/libloc.la
132
62b83e6d
MT
133src_test_stringpool_SOURCES = \
134 src/test-stringpool.c
135
136src_test_stringpool_LDADD = \
137 src/libloc.la
2601e83e
MT
138
139src_test_database_SOURCES = \
140 src/test-database.c
141
142src_test_database_LDADD = \
143 src/libloc.la