-
-
Notifications
You must be signed in to change notification settings - Fork 82
/
Makefile.am
329 lines (289 loc) · 12.3 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = -I$(top_srcdir)/include
SUBDIRS = \
include \
src \
utils \
tapset \
tests \
$(NULL)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libosmocore.pc libosmocodec.pc libosmovty.pc libosmogsm.pc \
libosmogb.pc libosmoctrl.pc libosmocoding.pc libosmosim.pc \
libosmousb.pc libosmoisdn.pc
aclocaldir = $(datadir)/aclocal
dist_aclocal_DATA = m4/osmo_ac_code_coverage.m4 \
m4/osmo_ax_code_coverage.m4
@RELMAKE@
@CODE_COVERAGE_RULES@
relengdir = $(includedir)
releng_DATA = osmo-release.mk
dist_bin_SCRIPTS = osmo-release.sh
osmo-release.mk: git-version-gen
BUILT_SOURCES = $(top_srcdir)/.version
$(top_srcdir)/.version:
echo $(VERSION) > $@-t && mv $@-t $@
dist-hook:
echo $(VERSION) > $(distdir)/.tarball-version
EXTRA_DIST = \
.version \
README.md \
contrib/libosmocore.spec.in \
debian \
git-version-gen \
osmo-release.mk \
osmo-release.sh \
$(NULL)
HTML = \
$(top_builddir)/doc/core/html/index.html \
$(top_builddir)/doc/gsm/html/index.html \
$(top_builddir)/doc/isdn/html/index.html \
$(top_builddir)/doc/vty/html/index.html \
$(top_builddir)/doc/codec/html/index.html \
$(top_builddir)/doc/coding/html/index.html \
$(top_builddir)/doc/ctrl/html/index.html \
$(top_builddir)/doc/gb/html/index.html
if HAVE_DOXYGEN
html_DATA = $(top_builddir)/doc/html.tar
doc: $(html_DATA)
$(html_DATA): apidoc
else
DOXYGEN=doxygen
endif
.PHONY: apidoc
apidoc: $(HTML)
cd $(top_builddir)/doc && tar cf html.tar */html
# Support doxygen cross references from each library to each other library:
# First generate the docs to make sure all .tag files are in place.
# In a second run, generate the content with proper referencing.
# For example, libosmocore references tags from libosmovty and vice versa,
# so both need to generate tag files first, and then do another run.
#
# Generate each docs tree, and touch a libosmofoo.tag.prep file when done.
# It means that a libosmofoo.tag file is up-to-date.
# Touch a separate "*.prep" target: libosmofoo.tag as target would create
# circular dependency: we would rebuild all every time 'make' is invoked.
# The .prep file also depends on all the source files for that library.
$(top_builddir)/doc/libosmocore.tag.prep: $(top_builddir)/Doxyfile.core \
$(top_srcdir)/include/osmocom/core/*.h \
$(top_srcdir)/src/core/*.[hc] \
$(top_srcdir)/src/core/crcXXgen.c.tpl \
$(top_srcdir)/src/pseudotalloc/*.[hc]
rm -rf $(top_builddir)/doc/core; mkdir -p $(top_builddir)/doc/core
rm -rf $(top_builddir)/doc/libosmocore.map
-$(DOXYGEN) $(top_builddir)/Doxyfile.core
touch "$@"
$(top_builddir)/doc/libosmogsm.tag.prep: $(top_builddir)/Doxyfile.gsm \
$(top_srcdir)/include/osmocom/gsm/*.h \
$(top_srcdir)/include/osmocom/gsm/protocol/*.h \
$(top_srcdir)/include/osmocom/crypt/*.h \
$(top_srcdir)/src/gsm/*.c \
$(top_srcdir)/src/gsm/milenage/*.[hc]
rm -rf $(top_builddir)/doc/gsm; mkdir -p $(top_builddir)/doc/gsm
rm -rf $(top_builddir)/doc/libosmogsm.map
-$(DOXYGEN) $(top_builddir)/Doxyfile.gsm
touch "$@"
$(top_builddir)/doc/libosmoisdn.tag.prep: $(top_builddir)/Doxyfile.isdn \
$(top_srcdir)/include/osmocom/isdn/*.h \
$(top_srcdir)/src/isdn/*.c
rm -rf $(top_builddir)/doc/isdn; mkdir -p $(top_builddir)/doc/isdn
rm -rf $(top_builddir)/doc/libosmoisdn.map
-$(DOXYGEN) $(top_builddir)/Doxyfile.isdn
touch "$@"
# Don't delete the entire doc/vty, it contains example.xml and vtydoc.xsd (OS#3986)
$(top_builddir)/doc/libosmovty.tag.prep: $(top_builddir)/Doxyfile.vty \
$(top_srcdir)/include/osmocom/vty/*.h \
$(top_srcdir)/src/vty/*.c
rm -rf $(top_builddir)/doc/vty/html $(top_builddir)/doc/vty/latex
rm -rf $(top_builddir)/doc/libosmovty.map
-$(DOXYGEN) $(top_builddir)/Doxyfile.vty
touch "$@"
$(top_builddir)/doc/libosmocodec.tag.prep: $(top_builddir)/Doxyfile.codec \
$(top_srcdir)/include/osmocom/codec/*.h \
$(top_srcdir)/src/codec/*.c
rm -rf $(top_builddir)/doc/codec; mkdir -p $(top_builddir)/doc/codec
rm -rf $(top_builddir)/doc/libosmocodec.map
-$(DOXYGEN) $(top_builddir)/Doxyfile.codec
touch "$@"
$(top_builddir)/doc/libosmocoding.tag.prep: $(top_builddir)/Doxyfile.coding \
$(top_srcdir)/include/osmocom/coding/*.h \
$(top_srcdir)/src/coding/*.c
rm -rf $(top_builddir)/doc/coding; mkdir -p $(top_builddir)/doc/coding
rm -rf $(top_builddir)/doc/libosmocoding.map
-$(DOXYGEN) $(top_builddir)/Doxyfile.coding
touch "$@"
$(top_builddir)/doc/libosmoctrl.tag.prep: $(top_builddir)/Doxyfile.ctrl \
$(top_srcdir)/include/osmocom/ctrl/*.h \
$(top_srcdir)/src/ctrl/*.c
rm -rf $(top_builddir)/doc/ctrl; mkdir -p $(top_builddir)/doc/ctrl
rm -rf $(top_builddir)/doc/libosmoctrl.map
-$(DOXYGEN) $(top_builddir)/Doxyfile.ctrl
touch "$@"
$(top_builddir)/doc/libosmogb.tag.prep: $(top_builddir)/Doxyfile.gb \
$(top_srcdir)/include/osmocom/gprs/*.h \
$(top_srcdir)/src/gb/*.[hc]
rm -rf $(top_builddir)/doc/gb; mkdir -p $(top_builddir)/doc/gb
rm -rf $(top_builddir)/doc/libosmogb.map
-$(DOXYGEN) $(top_builddir)/Doxyfile.gb
touch "$@"
$(top_builddir)/doc/libosmosim.tag.prep: $(top_builddir)/Doxyfile.sim \
$(top_srcdir)/include/osmocom/sim/*.h \
$(top_srcdir)/src/sim/*.[hc]
rm -rf $(top_builddir)/doc/sim; mkdir -p $(top_builddir)/doc/sim
rm -rf $(top_builddir)/doc/libosmosim.map
-$(DOXYGEN) $(top_builddir)/Doxyfile.sim
touch "$@"
$(top_builddir)/doc/libosmousb.tag.prep: $(top_builddir)/Doxyfile.usb \
$(top_srcdir)/include/osmocom/usb/*.h \
$(top_srcdir)/src/usb/*.[hc]
rm -rf $(top_builddir)/doc/usb; mkdir -p $(top_builddir)/doc/usb
rm -rf $(top_builddir)/doc/libosmousb.map
-$(DOXYGEN) $(top_builddir)/Doxyfile.usb
touch "$@"
# Build for real once all depending .tag files are in place.
# Depend on the own .tag.prep file to avoid concurrent builds of the same doc
# tree, and to also depend on all the source files listed above.
#
# Each library should depend on all the tag.prep files of which it lists .tag
# files in Doxyfile under TAGFILES.
#
# In turn, include all .tag files in TAGFILES of libraries to which "\ref"
# references point.
#
# Easiest is to just depend on all tag.prep files all across everywhere.
$(top_builddir)/doc/core/html/index.html: $(top_builddir)/doc/libosmocore.tag.prep \
$(top_builddir)/doc/libosmogsm.tag.prep \
$(top_builddir)/doc/libosmoisdn.tag.prep \
$(top_builddir)/doc/libosmovty.tag.prep \
$(top_builddir)/doc/libosmocodec.tag.prep \
$(top_builddir)/doc/libosmocoding.tag.prep \
$(top_builddir)/doc/libosmoctrl.tag.prep \
$(top_builddir)/doc/libosmogb.tag.prep \
$(top_builddir)/doc/libosmosim.tag.prep \
$(top_builddir)/doc/libosmousb.tag.prep
rm -rf $(top_builddir)/doc/core; mkdir -p $(top_builddir)/doc/core
$(DOXYGEN) Doxyfile.core
$(top_builddir)/doc/gsm/html/index.html: $(top_builddir)/doc/libosmogsm.tag.prep \
$(top_builddir)/doc/libosmocore.tag.prep \
$(top_builddir)/doc/libosmoisdn.tag.prep \
$(top_builddir)/doc/libosmovty.tag.prep \
$(top_builddir)/doc/libosmocodec.tag.prep \
$(top_builddir)/doc/libosmocoding.tag.prep \
$(top_builddir)/doc/libosmoctrl.tag.prep \
$(top_builddir)/doc/libosmogb.tag.prep \
$(top_builddir)/doc/libosmosim.tag.prep \
$(top_builddir)/doc/libosmousb.tag.prep
rm -rf $(top_builddir)/doc/gsm; mkdir -p $(top_builddir)/doc/gsm
$(DOXYGEN) Doxyfile.gsm
$(top_builddir)/doc/isdn/html/index.html: $(top_builddir)/doc/libosmoisdn.tag.prep \
$(top_builddir)/doc/libosmocore.tag.prep \
$(top_builddir)/doc/libosmogsm.tag.prep \
$(top_builddir)/doc/libosmovty.tag.prep \
$(top_builddir)/doc/libosmocodec.tag.prep \
$(top_builddir)/doc/libosmocoding.tag.prep \
$(top_builddir)/doc/libosmoctrl.tag.prep \
$(top_builddir)/doc/libosmogb.tag.prep \
$(top_builddir)/doc/libosmosim.tag.prep \
$(top_builddir)/doc/libosmousb.tag.prep
rm -rf $(top_builddir)/doc/isdn; mkdir -p $(top_builddir)/doc/isdn
$(DOXYGEN) Doxyfile.isdn
# Don't delete the entire doc/vty, it contains example.xml and vtydoc.xsd (OS#3986)
$(top_builddir)/doc/vty/html/index.html: $(top_builddir)/doc/libosmovty.tag.prep \
$(top_builddir)/doc/libosmocore.tag.prep \
$(top_builddir)/doc/libosmogsm.tag.prep \
$(top_builddir)/doc/libosmoisdn.tag.prep \
$(top_builddir)/doc/libosmocodec.tag.prep \
$(top_builddir)/doc/libosmocoding.tag.prep \
$(top_builddir)/doc/libosmoctrl.tag.prep \
$(top_builddir)/doc/libosmogb.tag.prep \
$(top_builddir)/doc/libosmosim.tag.prep \
$(top_builddir)/doc/libosmousb.tag.prep
rm -rf $(top_builddir)/doc/vty/html $(top_builddir)/doc/vty/latex
$(DOXYGEN) Doxyfile.vty
$(top_builddir)/doc/codec/html/index.html: $(top_builddir)/doc/libosmocodec.tag.prep \
$(top_builddir)/doc/libosmocore.tag.prep \
$(top_builddir)/doc/libosmogsm.tag.prep \
$(top_builddir)/doc/libosmoisdn.tag.prep \
$(top_builddir)/doc/libosmovty.tag.prep \
$(top_builddir)/doc/libosmocoding.tag.prep \
$(top_builddir)/doc/libosmoctrl.tag.prep \
$(top_builddir)/doc/libosmogb.tag.prep \
$(top_builddir)/doc/libosmosim.tag.prep \
$(top_builddir)/doc/libosmousb.tag.prep
rm -rf $(top_builddir)/doc/codec; mkdir -p $(top_builddir)/doc/codec
$(DOXYGEN) Doxyfile.codec
$(top_builddir)/doc/coding/html/index.html: $(top_builddir)/doc/libosmocoding.tag.prep \
$(top_builddir)/doc/libosmocore.tag.prep \
$(top_builddir)/doc/libosmogsm.tag.prep \
$(top_builddir)/doc/libosmoisdn.tag.prep \
$(top_builddir)/doc/libosmovty.tag.prep \
$(top_builddir)/doc/libosmocodec.tag.prep \
$(top_builddir)/doc/libosmoctrl.tag.prep \
$(top_builddir)/doc/libosmogb.tag.prep \
$(top_builddir)/doc/libosmosim.tag.prep \
$(top_builddir)/doc/libosmousb.tag.prep
rm -rf $(top_builddir)/doc/coding; mkdir -p $(top_builddir)/doc/coding
$(DOXYGEN) Doxyfile.coding
$(top_builddir)/doc/ctrl/html/index.html: $(top_builddir)/doc/libosmoctrl.tag.prep \
$(top_builddir)/doc/libosmocore.tag.prep \
$(top_builddir)/doc/libosmogsm.tag.prep \
$(top_builddir)/doc/libosmoisdn.tag.prep \
$(top_builddir)/doc/libosmovty.tag.prep \
$(top_builddir)/doc/libosmocodec.tag.prep \
$(top_builddir)/doc/libosmocoding.tag.prep \
$(top_builddir)/doc/libosmogb.tag.prep \
$(top_builddir)/doc/libosmosim.tag.prep \
$(top_builddir)/doc/libosmousb.tag.prep
rm -rf $(top_builddir)/doc/ctrl; mkdir -p $(top_builddir)/doc/ctrl
$(DOXYGEN) Doxyfile.ctrl
$(top_builddir)/doc/gb/html/index.html: $(top_builddir)/doc/libosmogb.tag.prep \
$(top_builddir)/doc/libosmocore.tag.prep \
$(top_builddir)/doc/libosmogsm.tag.prep \
$(top_builddir)/doc/libosmoisdn.tag.prep \
$(top_builddir)/doc/libosmovty.tag.prep \
$(top_builddir)/doc/libosmocodec.tag.prep \
$(top_builddir)/doc/libosmocoding.tag.prep \
$(top_builddir)/doc/libosmoctrl.tag.prep \
$(top_builddir)/doc/libosmosim.tag.prep \
$(top_builddir)/doc/libosmousb.tag.prep
rm -rf $(top_builddir)/doc/gb; mkdir -p $(top_builddir)/doc/gb
$(DOXYGEN) Doxyfile.gb
$(top_builddir)/doc/sim/html/index.html: $(top_builddir)/doc/libosmosim.tag.prep \
$(top_builddir)/doc/libosmocore.tag.prep \
$(top_builddir)/doc/libosmogsm.tag.prep \
$(top_builddir)/doc/libosmoisdn.tag.prep \
$(top_builddir)/doc/libosmovty.tag.prep \
$(top_builddir)/doc/libosmocodec.tag.prep \
$(top_builddir)/doc/libosmocoding.tag.prep \
$(top_builddir)/doc/libosmoctrl.tag.prep \
$(top_builddir)/doc/libosmogb.tag.prep \
$(top_builddir)/doc/libosmousb.tag.prep
rm -rf $(top_builddir)/doc/sim; mkdir -p $(top_builddir)/doc/sim
$(DOXYGEN) Doxyfile.sim
$(top_builddir)/doc/usb/html/index.html: $(top_builddir)/doc/libosmousb.tag.prep \
$(top_builddir)/doc/libosmocore.tag.prep \
$(top_builddir)/doc/libosmogsm.tag.prep \
$(top_builddir)/doc/libosmoisdn.tag.prep \
$(top_builddir)/doc/libosmovty.tag.prep \
$(top_builddir)/doc/libosmocodec.tag.prep \
$(top_builddir)/doc/libosmocoding.tag.prep \
$(top_builddir)/doc/libosmoctrl.tag.prep \
$(top_builddir)/doc/libosmogb.tag.prep \
$(top_builddir)/doc/libosmosim.tag.prep
rm -rf $(top_builddir)/doc/usb; mkdir -p $(top_builddir)/doc/usb
$(DOXYGEN) Doxyfile.usb
if HAVE_DOXYGEN
install-data-hook:
cd $(DESTDIR)$(htmldir) && tar xf html.tar && rm -f html.tar
uninstall-hook:
cd $(DESTDIR)$(htmldir) && rm -rf {core,gsm,isdn,vty,codec,coding,ctrl,gb,sim,usb}
DX_CLEAN = \
doc/{core,gsm,isdn,vty,codec,coding,ctrl,gb,sim,usb}/html/search/* \
doc/{core,gsm,isdn,vty,codec,coding,ctrl,gb,sim,usb}/{html,latex}/* \
doc/{core,gsm,isdn,vty,codec,coding,ctrl,gb,sim,usb}/doxygen_sqlite3.db \
doc/*.tag.prep \
doc/*.tag \
doc/html.tar \
$(NULL)
endif
MOSTLYCLEANFILES = $(DX_CLEAN)