Harald Welte | 4cd3d8a | 2010-03-23 00:30:19 +0800 | [diff] [blame] | 1 | ACLOCAL_AMFLAGS = -I m4 |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 2 | |
Harald Welte | d54c2ee | 2012-01-17 18:25:50 +0100 | [diff] [blame] | 3 | AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include |
Harald Welte | 433005c | 2020-09-26 11:51:32 +0200 | [diff] [blame] | 4 | SUBDIRS = include src src/vty src/codec src/gsm src/coding src/gb src/ctrl src/sim src/pseudotalloc src/usb utils tapset tests |
Harald Welte | 3cae039 | 2010-02-20 21:09:24 +0100 | [diff] [blame] | 5 | |
| 6 | pkgconfigdir = $(libdir)/pkgconfig |
Harald Welte | 641f7ce | 2012-06-17 23:05:26 +0800 | [diff] [blame] | 7 | pkgconfig_DATA = libosmocore.pc libosmocodec.pc libosmovty.pc libosmogsm.pc \ |
Harald Welte | da432cd | 2019-12-15 19:13:26 +0100 | [diff] [blame] | 8 | libosmogb.pc libosmoctrl.pc libosmocoding.pc libosmosim.pc \ |
| 9 | libosmousb.pc |
Harald Welte | 4cd3d8a | 2010-03-23 00:30:19 +0800 | [diff] [blame] | 10 | |
Vasil Velichkov | 499510b | 2019-04-03 02:32:37 +0300 | [diff] [blame] | 11 | aclocaldir = $(datadir)/aclocal |
| 12 | dist_aclocal_DATA = m4/osmo_ac_code_coverage.m4 \ |
| 13 | m4/osmo_ax_code_coverage.m4 |
| 14 | |
Max | ff932bb | 2017-07-04 18:19:38 +0200 | [diff] [blame] | 15 | @RELMAKE@ |
Vasil Velichkov | 499510b | 2019-04-03 02:32:37 +0300 | [diff] [blame] | 16 | @CODE_COVERAGE_RULES@ |
Max | ff932bb | 2017-07-04 18:19:38 +0200 | [diff] [blame] | 17 | |
| 18 | relengdir = $(includedir) |
| 19 | releng_DATA = osmo-release.mk |
| 20 | |
Harald Welte | ee497f2 | 2017-10-03 16:54:41 +0800 | [diff] [blame] | 21 | dist_bin_SCRIPTS = osmo-release.sh |
| 22 | |
Max | ff932bb | 2017-07-04 18:19:38 +0200 | [diff] [blame] | 23 | osmo-release.mk: git-version-gen |
| 24 | |
Harald Welte | 4cd3d8a | 2010-03-23 00:30:19 +0800 | [diff] [blame] | 25 | BUILT_SOURCES = $(top_srcdir)/.version |
| 26 | $(top_srcdir)/.version: |
| 27 | echo $(VERSION) > $@-t && mv $@-t $@ |
| 28 | dist-hook: |
| 29 | echo $(VERSION) > $(distdir)/.tarball-version |
Holger Hans Peter Freyther | ec4f160 | 2011-07-17 12:13:31 +0200 | [diff] [blame] | 30 | |
Oliver Smith | a299139 | 2020-05-22 13:13:17 +0200 | [diff] [blame] | 31 | EXTRA_DIST = \ |
| 32 | .version \ |
| 33 | README.md \ |
| 34 | contrib/libosmocore.spec.in \ |
| 35 | debian \ |
| 36 | git-version-gen \ |
| 37 | osmo-release.mk \ |
| 38 | osmo-release.sh \ |
| 39 | $(NULL) |
Harald Welte | 21e73c2 | 2011-08-17 19:33:06 +0200 | [diff] [blame] | 40 | |
Neels Hofmeyr | 44c15b7 | 2019-02-01 05:56:09 +0100 | [diff] [blame] | 41 | HTML = \ |
| 42 | $(top_builddir)/doc/core/html/index.html \ |
| 43 | $(top_builddir)/doc/gsm/html/index.html \ |
| 44 | $(top_builddir)/doc/vty/html/index.html \ |
| 45 | $(top_builddir)/doc/codec/html/index.html \ |
| 46 | $(top_builddir)/doc/coding/html/index.html \ |
| 47 | $(top_builddir)/doc/ctrl/html/index.html \ |
| 48 | $(top_builddir)/doc/gb/html/index.html |
Harald Welte | 21e73c2 | 2011-08-17 19:33:06 +0200 | [diff] [blame] | 49 | |
Neels Hofmeyr | 44c15b7 | 2019-02-01 05:56:09 +0100 | [diff] [blame] | 50 | if HAVE_DOXYGEN |
Diego Elio Pettenò | 200710e | 2012-06-29 13:01:26 -0700 | [diff] [blame] | 51 | html_DATA = $(top_builddir)/doc/html.tar |
Harald Welte | 21e73c2 | 2011-08-17 19:33:06 +0200 | [diff] [blame] | 52 | |
Neels Hofmeyr | 249fb71 | 2017-06-20 02:52:38 +0200 | [diff] [blame] | 53 | doc: $(html_DATA) |
| 54 | |
Neels Hofmeyr | 44c15b7 | 2019-02-01 05:56:09 +0100 | [diff] [blame] | 55 | $(html_DATA): apidoc |
| 56 | else |
| 57 | DOXYGEN=doxygen |
| 58 | endif |
| 59 | |
| 60 | .PHONY: apidoc |
| 61 | apidoc: $(HTML) |
Harald Welte | 7992af0 | 2011-08-17 19:37:26 +0200 | [diff] [blame] | 62 | cd $(top_builddir)/doc && tar cf html.tar */html |
Harald Welte | 21e73c2 | 2011-08-17 19:33:06 +0200 | [diff] [blame] | 63 | |
Neels Hofmeyr | 2fe50ac | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 64 | # Support doxygen cross references from each library to each other library: |
| 65 | # First generate the docs to make sure all .tag files are in place. |
| 66 | # In a second run, generate the content with proper referencing. |
| 67 | # For example, libosmocore references tags from libosmovty and vice versa, |
| 68 | # so both need to generate tag files first, and then do another run. |
| 69 | # |
| 70 | # Generate each docs tree, and touch a libosmofoo.tag.prep file when done. |
| 71 | # It means that a libosmofoo.tag file is up-to-date. |
| 72 | # Touch a separate "*.prep" target: libosmofoo.tag as target would create |
| 73 | # circular dependency: we would rebuild all every time 'make' is invoked. |
| 74 | # The .prep file also depends on all the source files for that library. |
| 75 | |
Neels Hofmeyr | 375bf6d | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 76 | $(top_builddir)/doc/libosmocore.tag.prep: $(top_builddir)/Doxyfile.core \ |
| 77 | $(top_srcdir)/include/osmocom/core/*.h \ |
| 78 | $(top_srcdir)/src/*.[hc] \ |
Neels Hofmeyr | 7e689c6 | 2019-02-04 14:13:52 +0100 | [diff] [blame] | 79 | $(top_srcdir)/src/crcXXgen.c.tpl \ |
Neels Hofmeyr | 375bf6d | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 80 | $(top_srcdir)/src/pseudotalloc/*.[hc] |
Neels Hofmeyr | 2fe50ac | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 81 | rm -rf $(top_builddir)/doc/core; mkdir -p $(top_builddir)/doc/core |
| 82 | rm -rf $(top_builddir)/doc/libosmocore.map |
| 83 | -$(DOXYGEN) $(top_builddir)/Doxyfile.core |
| 84 | touch "$@" |
| 85 | |
Neels Hofmeyr | 375bf6d | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 86 | $(top_builddir)/doc/libosmogsm.tag.prep: $(top_builddir)/Doxyfile.gsm \ |
| 87 | $(top_srcdir)/include/osmocom/gsm/*.h \ |
| 88 | $(top_srcdir)/include/osmocom/gsm/protocol/*.h \ |
| 89 | $(top_srcdir)/include/osmocom/crypt/*.h \ |
| 90 | $(top_srcdir)/src/gsm/*.c \ |
| 91 | $(top_srcdir)/src/gsm/milenage/*.[hc] |
Neels Hofmeyr | 2fe50ac | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 92 | rm -rf $(top_builddir)/doc/gsm; mkdir -p $(top_builddir)/doc/gsm |
| 93 | rm -rf $(top_builddir)/doc/libosmogsm.map |
| 94 | -$(DOXYGEN) $(top_builddir)/Doxyfile.gsm |
| 95 | touch "$@" |
| 96 | |
Oliver Smith | 316d1e1 | 2019-06-28 09:13:22 +0200 | [diff] [blame] | 97 | # Don't delete the entire doc/vty, it contains example.xml and vtydoc.xsd (OS#3986) |
Neels Hofmeyr | 375bf6d | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 98 | $(top_builddir)/doc/libosmovty.tag.prep: $(top_builddir)/Doxyfile.vty \ |
| 99 | $(top_srcdir)/include/osmocom/vty/*.h \ |
| 100 | $(top_srcdir)/src/vty/*.c |
Oliver Smith | 316d1e1 | 2019-06-28 09:13:22 +0200 | [diff] [blame] | 101 | rm -rf $(top_builddir)/doc/vty/html $(top_builddir)/doc/vty/latex |
Neels Hofmeyr | 2fe50ac | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 102 | rm -rf $(top_builddir)/doc/libosmovty.map |
| 103 | -$(DOXYGEN) $(top_builddir)/Doxyfile.vty |
| 104 | touch "$@" |
| 105 | |
Neels Hofmeyr | 375bf6d | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 106 | $(top_builddir)/doc/libosmocodec.tag.prep: $(top_builddir)/Doxyfile.codec \ |
| 107 | $(top_srcdir)/include/osmocom/codec/*.h \ |
| 108 | $(top_srcdir)/src/codec/*.c |
Neels Hofmeyr | 2fe50ac | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 109 | rm -rf $(top_builddir)/doc/codec; mkdir -p $(top_builddir)/doc/codec |
| 110 | rm -rf $(top_builddir)/doc/libosmocodec.map |
| 111 | -$(DOXYGEN) $(top_builddir)/Doxyfile.codec |
| 112 | touch "$@" |
| 113 | |
Neels Hofmeyr | 375bf6d | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 114 | $(top_builddir)/doc/libosmocoding.tag.prep: $(top_builddir)/Doxyfile.coding \ |
| 115 | $(top_srcdir)/include/osmocom/coding/*.h \ |
| 116 | $(top_srcdir)/src/coding/*.c |
Neels Hofmeyr | 2fe50ac | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 117 | rm -rf $(top_builddir)/doc/coding; mkdir -p $(top_builddir)/doc/coding |
| 118 | rm -rf $(top_builddir)/doc/libosmocoding.map |
| 119 | -$(DOXYGEN) $(top_builddir)/Doxyfile.coding |
| 120 | touch "$@" |
| 121 | |
Neels Hofmeyr | 375bf6d | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 122 | $(top_builddir)/doc/libosmoctrl.tag.prep: $(top_builddir)/Doxyfile.ctrl \ |
| 123 | $(top_srcdir)/include/osmocom/ctrl/*.h \ |
| 124 | $(top_srcdir)/src/ctrl/*.c |
Neels Hofmeyr | 2fe50ac | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 125 | rm -rf $(top_builddir)/doc/ctrl; mkdir -p $(top_builddir)/doc/ctrl |
| 126 | rm -rf $(top_builddir)/doc/libosmoctrl.map |
| 127 | -$(DOXYGEN) $(top_builddir)/Doxyfile.ctrl |
| 128 | touch "$@" |
| 129 | |
Neels Hofmeyr | 375bf6d | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 130 | $(top_builddir)/doc/libosmogb.tag.prep: $(top_builddir)/Doxyfile.gb \ |
| 131 | $(top_srcdir)/include/osmocom/gprs/*.h \ |
| 132 | $(top_srcdir)/src/gb/*.[hc] |
Neels Hofmeyr | 2fe50ac | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 133 | rm -rf $(top_builddir)/doc/gb; mkdir -p $(top_builddir)/doc/gb |
| 134 | rm -rf $(top_builddir)/doc/libosmogb.map |
| 135 | -$(DOXYGEN) $(top_builddir)/Doxyfile.gb |
| 136 | touch "$@" |
| 137 | |
| 138 | # Build for real once all depending .tag files are in place. |
| 139 | # Depend on the own .tag.prep file to avoid concurrent builds of the same doc |
| 140 | # tree, and to also depend on all the source files listed above. |
| 141 | # |
| 142 | # Each library should depend on all the tag.prep files of which it lists .tag |
| 143 | # files in Doxyfile under TAGFILES. |
| 144 | # |
| 145 | # In turn, include all .tag files in TAGFILES of libraries to which "\ref" |
| 146 | # references point. |
| 147 | # |
| 148 | # Easiest is to just depend on all tag.prep files all across everywhere. |
| 149 | |
| 150 | $(top_builddir)/doc/core/html/index.html: $(top_builddir)/doc/libosmocore.tag.prep \ |
| 151 | $(top_builddir)/doc/libosmogsm.tag.prep \ |
| 152 | $(top_builddir)/doc/libosmovty.tag.prep \ |
| 153 | $(top_builddir)/doc/libosmocodec.tag.prep \ |
| 154 | $(top_builddir)/doc/libosmocoding.tag.prep \ |
| 155 | $(top_builddir)/doc/libosmoctrl.tag.prep \ |
| 156 | $(top_builddir)/doc/libosmogb.tag.prep |
| 157 | rm -rf $(top_builddir)/doc/core; mkdir -p $(top_builddir)/doc/core |
Harald Welte | c7859ed | 2011-08-20 12:54:17 +0200 | [diff] [blame] | 158 | $(DOXYGEN) Doxyfile.core |
Harald Welte | 21e73c2 | 2011-08-17 19:33:06 +0200 | [diff] [blame] | 159 | |
Neels Hofmeyr | 2fe50ac | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 160 | $(top_builddir)/doc/gsm/html/index.html: $(top_builddir)/doc/libosmogsm.tag.prep \ |
| 161 | $(top_builddir)/doc/libosmocore.tag.prep \ |
| 162 | $(top_builddir)/doc/libosmovty.tag.prep \ |
| 163 | $(top_builddir)/doc/libosmocodec.tag.prep \ |
| 164 | $(top_builddir)/doc/libosmocoding.tag.prep \ |
| 165 | $(top_builddir)/doc/libosmoctrl.tag.prep \ |
| 166 | $(top_builddir)/doc/libosmogb.tag.prep |
| 167 | rm -rf $(top_builddir)/doc/gsm; mkdir -p $(top_builddir)/doc/gsm |
Harald Welte | 21e73c2 | 2011-08-17 19:33:06 +0200 | [diff] [blame] | 168 | $(DOXYGEN) Doxyfile.gsm |
| 169 | |
Oliver Smith | 316d1e1 | 2019-06-28 09:13:22 +0200 | [diff] [blame] | 170 | # Don't delete the entire doc/vty, it contains example.xml and vtydoc.xsd (OS#3986) |
Neels Hofmeyr | 2fe50ac | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 171 | $(top_builddir)/doc/vty/html/index.html: $(top_builddir)/doc/libosmovty.tag.prep \ |
| 172 | $(top_builddir)/doc/libosmocore.tag.prep \ |
| 173 | $(top_builddir)/doc/libosmogsm.tag.prep \ |
| 174 | $(top_builddir)/doc/libosmocodec.tag.prep \ |
| 175 | $(top_builddir)/doc/libosmocoding.tag.prep \ |
| 176 | $(top_builddir)/doc/libosmoctrl.tag.prep \ |
| 177 | $(top_builddir)/doc/libosmogb.tag.prep |
Oliver Smith | 316d1e1 | 2019-06-28 09:13:22 +0200 | [diff] [blame] | 178 | rm -rf $(top_builddir)/doc/vty/html $(top_builddir)/doc/vty/latex |
Harald Welte | 21e73c2 | 2011-08-17 19:33:06 +0200 | [diff] [blame] | 179 | $(DOXYGEN) Doxyfile.vty |
| 180 | |
Neels Hofmeyr | 2fe50ac | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 181 | $(top_builddir)/doc/codec/html/index.html: $(top_builddir)/doc/libosmocodec.tag.prep \ |
| 182 | $(top_builddir)/doc/libosmocore.tag.prep \ |
| 183 | $(top_builddir)/doc/libosmogsm.tag.prep \ |
| 184 | $(top_builddir)/doc/libosmovty.tag.prep \ |
| 185 | $(top_builddir)/doc/libosmocoding.tag.prep \ |
| 186 | $(top_builddir)/doc/libosmoctrl.tag.prep \ |
| 187 | $(top_builddir)/doc/libosmogb.tag.prep |
| 188 | rm -rf $(top_builddir)/doc/codec; mkdir -p $(top_builddir)/doc/codec |
Harald Welte | 21e73c2 | 2011-08-17 19:33:06 +0200 | [diff] [blame] | 189 | $(DOXYGEN) Doxyfile.codec |
| 190 | |
Neels Hofmeyr | 2fe50ac | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 191 | $(top_builddir)/doc/coding/html/index.html: $(top_builddir)/doc/libosmocoding.tag.prep \ |
| 192 | $(top_builddir)/doc/libosmocore.tag.prep \ |
| 193 | $(top_builddir)/doc/libosmogsm.tag.prep \ |
| 194 | $(top_builddir)/doc/libosmovty.tag.prep \ |
| 195 | $(top_builddir)/doc/libosmocodec.tag.prep \ |
| 196 | $(top_builddir)/doc/libosmoctrl.tag.prep \ |
| 197 | $(top_builddir)/doc/libosmogb.tag.prep |
| 198 | rm -rf $(top_builddir)/doc/coding; mkdir -p $(top_builddir)/doc/coding |
Vadim Yanitskiy | 3262f82 | 2016-09-23 01:48:59 +0700 | [diff] [blame] | 199 | $(DOXYGEN) Doxyfile.coding |
| 200 | |
Neels Hofmeyr | 2fe50ac | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 201 | $(top_builddir)/doc/ctrl/html/index.html: $(top_builddir)/doc/libosmoctrl.tag.prep \ |
| 202 | $(top_builddir)/doc/libosmocore.tag.prep \ |
| 203 | $(top_builddir)/doc/libosmogsm.tag.prep \ |
| 204 | $(top_builddir)/doc/libosmovty.tag.prep \ |
| 205 | $(top_builddir)/doc/libosmocodec.tag.prep \ |
| 206 | $(top_builddir)/doc/libosmocoding.tag.prep \ |
| 207 | $(top_builddir)/doc/libosmogb.tag.prep |
| 208 | rm -rf $(top_builddir)/doc/ctrl; mkdir -p $(top_builddir)/doc/ctrl |
Harald Welte | b418682 | 2018-05-26 17:25:11 +0200 | [diff] [blame] | 209 | $(DOXYGEN) Doxyfile.ctrl |
| 210 | |
Neels Hofmeyr | 2fe50ac | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 211 | $(top_builddir)/doc/gb/html/index.html: $(top_builddir)/doc/libosmogb.tag.prep \ |
| 212 | $(top_builddir)/doc/libosmocore.tag.prep \ |
| 213 | $(top_builddir)/doc/libosmogsm.tag.prep \ |
| 214 | $(top_builddir)/doc/libosmovty.tag.prep \ |
| 215 | $(top_builddir)/doc/libosmocodec.tag.prep \ |
| 216 | $(top_builddir)/doc/libosmocoding.tag.prep \ |
| 217 | $(top_builddir)/doc/libosmoctrl.tag.prep |
| 218 | rm -rf $(top_builddir)/doc/gb; mkdir -p $(top_builddir)/doc/gb |
Neels Hofmeyr | 249fb71 | 2017-06-20 02:52:38 +0200 | [diff] [blame] | 219 | $(DOXYGEN) Doxyfile.gb |
| 220 | |
Neels Hofmeyr | 44c15b7 | 2019-02-01 05:56:09 +0100 | [diff] [blame] | 221 | if HAVE_DOXYGEN |
Harald Welte | 21e73c2 | 2011-08-17 19:33:06 +0200 | [diff] [blame] | 222 | install-data-hook: |
Diego Elio Pettenò | 200710e | 2012-06-29 13:01:26 -0700 | [diff] [blame] | 223 | cd $(DESTDIR)$(htmldir) && tar xf html.tar && rm -f html.tar |
Harald Welte | 21e73c2 | 2011-08-17 19:33:06 +0200 | [diff] [blame] | 224 | |
| 225 | uninstall-hook: |
Harald Welte | b418682 | 2018-05-26 17:25:11 +0200 | [diff] [blame] | 226 | cd $(DESTDIR)$(htmldir) && rm -rf {core,gsm,vty,codec,coding,ctrl,gb} |
Harald Welte | 21e73c2 | 2011-08-17 19:33:06 +0200 | [diff] [blame] | 227 | |
Neels Hofmeyr | 2fe50ac | 2019-02-01 05:25:36 +0100 | [diff] [blame] | 228 | DX_CLEAN = doc/{core,gsm,vty,codec,coding,ctrl,gb}/html/search/* doc/{core,gsm,vty,codec,coding,ctrl,gb}/{html,latex}/* doc/html.tar doc/{core,gsm,vty,codec,coding,ctrl,gb}/doxygen_sqlite3.db doc/*.tag doc/*.tag.prep |
Harald Welte | 21e73c2 | 2011-08-17 19:33:06 +0200 | [diff] [blame] | 229 | endif |
Harald Welte | 47945f0 | 2011-08-20 13:00:37 +0200 | [diff] [blame] | 230 | |
| 231 | MOSTLYCLEANFILES = $(DX_CLEAN) |