python: Implement adding an AS to the writer
[people/ms/libloc.git] / Makefile.am
1 EXTRA_DIST =
2 CLEANFILES =
3 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
4 AM_MAKEFLAGS = --no-print-directory
5
6 AM_CPPFLAGS = \
7         -include $(top_builddir)/config.h \
8         -DSYSCONFDIR=\""$(sysconfdir)"\" \
9         -I${top_srcdir}/src
10
11 AM_CFLAGS = ${my_CFLAGS} \
12         -ffunction-sections \
13         -fdata-sections
14
15 AM_LDFLAGS = \
16         -Wl,--gc-sections \
17         -Wl,--as-needed
18
19 LIBLOC_CURRENT=0
20 LIBLOC_REVISION=0
21 LIBLOC_AGE=0
22
23 SED_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
32 pythondir    = $(pyexecdir)
33 pkgconfigdir = $(libdir)/pkgconfig
34
35 %.pc: %.pc.in Makefile
36         $(SED_PROCESS)
37
38 pkginclude_HEADERS = \
39         src/loc/libloc.h \
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 \
46         src/loc/writer.h
47
48 lib_LTLIBRARIES = \
49         src/libloc.la
50
51 src_libloc_la_SOURCES = \
52         src/libloc.c \
53         src/as.c \
54         src/database.c \
55         src/network.c \
56         src/stringpool.c \
57         src/writer.c
58
59 EXTRA_DIST += src/libloc.sym
60
61 src_libloc_la_CFLAGS = \
62         $(AM_CFLAGS) \
63         -DLIBLOC_PRIVATE \
64         -fvisibility=hidden
65
66 src_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
71 src_libloc_la_DEPENDENCIES = \
72         ${top_srcdir}/src/libloc.sym
73
74 pkgconfig_DATA = \
75         src/libloc.pc
76
77 EXTRA_DIST += \
78         src/libloc.pc.in
79
80 CLEANFILES += \
81         src/libloc.pc
82
83 pkgpyexec_LTLIBRARIES = \
84         src/python/location.la
85
86 src_python_location_la_SOURCES = \
87         src/python/locationmodule.c \
88         src/python/locationmodule.h \
89         src/python/as.c \
90         src/python/as.h \
91         src/python/database.c \
92         src/python/database.h \
93         src/python/writer.c \
94         src/python/writer.h
95
96 src_python_location_la_CFLAGS = \
97         $(AM_CFLAGS) \
98         $(PYTHON_CFLAGS)
99
100 src_python_location_la_LDFLAGS = \
101         $(AM_LDFLAGS) \
102         -shared \
103         -module \
104         -avoid-version
105
106 src_python_location_la_LIBADD = \
107         src/libloc.la \
108         $(PYTHON_LIBS)
109
110 TESTS = \
111         src/test-libloc \
112         src/test-stringpool \
113         src/test-database \
114         src/test-as \
115         src/test-network
116
117 check_PROGRAMS = \
118         src/test-libloc \
119         src/test-stringpool \
120         src/test-database \
121         src/test-as \
122         src/test-network
123
124 src_test_libloc_SOURCES = \
125         src/test-libloc.c
126
127 src_test_libloc_LDADD = \
128         src/libloc.la
129
130 src_test_as_SOURCES = \
131         src/test-as.c
132
133 src_test_as_LDADD = \
134         src/libloc.la
135
136 src_test_network_SOURCES = \
137         src/test-network.c
138
139 src_test_network_LDADD = \
140         src/libloc.la
141
142 src_test_stringpool_SOURCES = \
143         src/test-stringpool.c
144
145 src_test_stringpool_LDADD = \
146         src/libloc.la
147
148 src_test_database_SOURCES = \
149         src/test-database.c
150
151 src_test_database_LDADD = \
152         src/libloc.la