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