Commit Graph

56 Commits

Author SHA1 Message Date
Vadim Yanitskiy 94e0af0a6d doxygen: also generate documentation for libosmo{sim,usb}
We do have API documentation for all libraries, excepte these two.

Change-Id: I2ec5803bc219b9ceaf0d52d41a03ab78f580e689
2023-02-27 11:14:40 +00:00
Harald Welte d55a209d1c create libosmoisdn sub-library
There are some parts of libosmogsm which are not really GSM specific,
but rather ISDN bits that were inherited by GSM.  This includes the
I.460 multiplex as well as the core LAPD protocol.

Let's move those bits to its own libosmoisdn library, before we add
more ISDN specific bits to the wrong place.

Backwards-compatibility is created by making libosmogsm depend on
libosmoisdn, and by providing wrapper include files for source
compatibility.

Change-Id: Ib1a6c762322fd5047be3188b1df22408ef06aa50
2023-01-21 22:41:57 +01:00
Pau Espin a50ed5fda8 Makefile.am: Remove unexsiting all_includes variable
Change-Id: I9bc7de6f85558e55265c6cc965bc7fe97a6736ee
2023-01-18 19:04:36 +01:00
Pau Espin d4c3dc8d59 Move src/*.{c,h} to src/core/
This way we have all libosmocore.so in an own subdir instead of having
lots of files in the parent dir, which also contains subdirs to other
libraries.
This also matches the schema under include/osmocom/.

Change-Id: I6c76fafebdd5e961aed88bbecd2c16bc69d580e2
2023-01-18 17:14:06 +01:00
Neels Hofmeyr 044f0cd64c cosmetic tweak in Makefile.am
Change-Id: I141e502ffbb1a45f9751943d47766bdfbf77484a
2022-06-14 19:45:02 +02:00
Harald Welte 433005c87c initial support for static userspace probes via systemtap
This adds a --enable-systemtap configure option, which will then
add static tracepoints to the generated libosmocore binary.

At this point, only two tracepoints are supported: log_start
and log_done.  They can be used to trace the amount of time
a libosmocore-using application spends in potentiall blocking calls to
log to stderr or to files.

Related: OS#4311
Change-Id: I7e1ab664241deb524c9582cbd1bec31af46c747e
2021-02-03 13:55:40 +00:00
Oliver Smith a299139129 Makefile.am: EXTRA_DIST: debian, contrib/*.spec.in
Change-Id: I13f28041adcc1530e5125775c4533d8ac0a88169
2020-05-22 13:26:19 +02:00
Neels Hofmeyr 7e689c6577 add crcXXgen.c.tpl to EXTRA_DIST
'make distcheck' distributes the generated .c files, but it is good GPL
practice to also distribute the template.

Change-Id: I988acd3bc629e98985a99780d3142112125d13f7
2020-01-07 17:25:51 +01:00
Harald Welte da432cdc35 libosmocore libusb integration
Osmocom applications typically use libosmocore select.[ch] event loop
code as their main event dispatch mechanism.  When they want to deal
with libusb in a non-blocking/asynchronous way, they need to integrate
libusb into that select().

The new libosmousb is doing exactly that: Providing a shared utility
library for Osmocom programs that wish to use libusb.  This is useful
for example in simtrace2 host utilitie as well as osmo-e1d.

Change-Id: I656a1a38cbb5b1f3a9145d2869d3b4d0adefcae3
Closes: OS#4299
2019-12-16 00:17:27 +01:00
Vasil Velichkov 499510bd52 Add code coverage support
The coverage report shows what code is covered by tests and what is not
and the ratio could be tracked over time. These reports will allow us
to identify code that is not being tested and improve the test suites.

To enable the reports configure with --enable-code-coverage and execute
"make check-code-coverage". The HTML report will be generated in a
subdirectory with name libosmocore-$(PACKAGE_VERSION)-coverage/index.html

The report is generated using gcov, lcov and lcov_cobertura tools and
the OSMO_AC_CODE_COVERAGE macro. The osmo_ax_code_coverage.m4 is a copy of
ax_code_coverage.m4 taken from autoconf-archive v2018.03.13. It was
copied to avoid the additional external dependency and renamed to avoid
overwriting it in case autoconf-archive is already installed as we are
going to install it in $(datadir)/aclocal in order to be reused in other
osmocom's projects.

Closes: OS#1987
Change-Id: I6f4ffb91bd7f3dd070aa09dd16d5ad1faf130a4c
2019-11-30 02:17:23 +00:00
Oliver Smith 316d1e1b7b Makefile.am: don't delete example.xml, vtydoc.xsd
Do not remove the entire doc/vty/ dir during the doxygen generation,
because it contains versioned files.

Fixes: 2fe50ac951 ("doxygen: enable cross referencing everywhere")
Related: OS#3986
Change-Id: I884398c5e834ae2fac0af8c9b52d65bb3ceacb2d
2019-06-28 12:27:30 +00:00
Neels Hofmeyr 44c15b7a8f doxygen: allow manual 'make apidoc' even if --disable-doxygen
Even if ./configure --disable-doxygen was passed and doxygen builds are by
default skipped, provide a manual 'make apidoc' target that nevertheless
generates the API doc on the premise that a 'doxygen' program is available.

Especially since we do a two-pass doxygen build whenever any source file
changes, my guess is --disable-doxygen could be a common choice. It is then
cumbersome to have to ./configure just to get one doxygen build started.

Change-Id: If8d8dfb8365c8f28612b8ce2b8ddf88f74df9a90
2019-02-04 16:43:57 +00:00
Neels Hofmeyr 375bf6dcc5 doxygen: add source files as dependencies
So far, when modifying a source file, the doxygen docs were not regenerated
automatically. It required a manual 'rm -rf docs/core' or similar. Make it
rebuild automatically:

Add each library's source files to the list of dependencies for the first-pass
doxygen build.

Attention, since all libraries depend on the .map files of each other library,
and each library depends on its own source files, that means that a single
touch on one .c file anywhere will result in rebuilding the entire doxygen
docs. It is correct to do so, since any file may introduce \ref targets used
anywhere else. If you don't want that, --disable-doxygen.

Change-Id: I15ea96be6e7abe91264b91f0b06963a0f2d63b0b
2019-02-04 16:43:57 +00:00
Neels Hofmeyr 2fe50ac951 doxygen: enable cross referencing everywhere
doxygen \ref cross-references to groups or files from other libraries only work
when the .map file was present when the HTML was generated, and when that .map
file was listed in TAGFILES in the Doxyfile.

- Makefile.am: introduce a two-pass build for doxygen API docs.
  - First build pass makes sure the .tag files are present.
  - Second build pass picks up all the references, hence generates hyperlinks
    properly.
- Add all libraries to TAGFILES of all other libraries, so we can from now on
  freely criss-cross reference from everywhere to everywhere.
- Add all libraries' tag files as dependencies for all others.

Example: in upcoming tdef.h, I would like to cross reference to tdef_vty.h, and
vice versa, even though they are in libosmocore and libosmovty, respectively.
This is now possible.

We may still need to fix some problems with naming collisions, see for example
stats.h, which exists twice with identical doxygen handle (different source
dirs seems to not suffice for doxygen).

Change-Id: Ib03d0b70d536c8f1386def666c89106a840f7363
2019-02-04 16:43:57 +00:00
Harald Welte 40f35212c7 Revert "osmo-config-merge: Add manual page"
This reverts commit 6dd00d876e.

Unfortunately, it seems older a2x versions don't support "-D" for
manpage generation:

All the osmocom master builds started to fail with:

make[2]: Entering directory '/build/deps/libosmocore/man'
a2x --doctype manpage --format manpage -D . osmo-config-merge.adoc
a2x: WARNING: --destination-dir option is only applicable to HTML based outputs
a2x: ERROR: "xmllint" --nonet --noout --valid "/build/deps/libosmocore/man/osmo-config-merge.xml" returned
non-zero exit status 127
Makefile:545: recipe for target 'osmo-config-merge.8' failed

Change-Id: I0f45362d3e978c328d962a5c0d883eade27b875c
2018-09-29 01:43:14 +02:00
Daniel Willmann 6dd00d876e osmo-config-merge: Add manual page
Change-Id: Ifaa5afe28779a805764caf76a89efb0a3169942e
2018-09-28 16:19:53 +02:00
Harald Welte b4186824c2 ctrl: Add doxygen API documentation; generate html from it
Closes: OS#3293
Change-Id: I8dc2f24d4bf557ff7bb0f2f46881f9f8d9d7f86f
2018-05-26 21:58:15 +02:00
Martin Hauke 13e7f05611 build: Ensure all .pc files are installed
Change-Id: I824e63087021adfda81bd0f867a3fdb5e9efcf7a
2018-02-14 00:47:19 +00:00
Harald Welte ee497f245e Fixup severe build performance issues
Make variable substitution calling bumpversion and other commands
introduce by osmo-release.mk has severely slowed down builds.

Inside the makefile we could use $(eval FOO:=$(shell...)) constructs
to have variable substitution only happen once the 'release' target
is executed. However, 'ifeq' and friends don't work with such late
constructs. Let's shift all release action into a helper shell script
that is called from the Makefile instead.

This way we get the best of both worlds: No performance impact during
normal builds, and the convenience of 'make release'.

Modified-by: Max <msuraev@sysmocom.de>

Related: OS#2524

Change-Id: I98b3b5fe3db39953cea969a9dfbb75889df2e1ea
2017-10-04 16:26:37 +02:00
Max ff932bbc38 Add release target to Makefile
Add simple helper target to automate basic release steps:
* version bump
* prepare release commit
* git commit, tag and sign

For library projects:
* update debian/changelog from TODO-RELEASE
* cleanup TODO-RELEASE

For non-library projects:
* update debian/changelog from git log

Note: it requires bumpversion package to be installed, debian/control is
adjusted accordingly. The helper itself is installed to facilitate reuse
by other libraries.

N. B: you still have to manually adjust LIBVERSION in previous commit -
see TODO-RELEASE header for details.

Use it as follows:
make REL=minor release

The REL parameter defines which component of the version [1] to bump and
can be any of { major, minor, patch }.

[1] http://semver.org/

Change-Id: I790ceb958195b9f6cbabfe8c977dc30e2bd7414b
Related: OS#1861
2017-08-08 11:55:03 +00:00
Neels Hofmeyr 249fb71a2e doxygen: add missing gb API doc generation
Files in include/osmocom/gprs/ and src/gb/ are not included in any doxygen
generated API docs. Add Doxyfile.gb.in and adjust configure.ac and Makefile.am.

Change-Id: Ieb64f497f55368e396872083237c9ff28da2dd93
2017-06-23 00:18:21 +00:00
Harald Welte 898ffefde4 add libpseudotalloc as super-simplistic talloc replacement
In tightly embedded builds (--enable-embedded), we want the ability to
replace talloc with a very simple heap allocator to avoid the complexity
of talloc without modifying all our code that assumes talloc.

This will break the hierarchical notion of the allocator, but
libosmo{core,gsm,coding,codec} don't rely on that anyway.

Change-Id: Ie341034076f242a813f081919dd09d845775ad35
2017-05-17 15:15:52 +01:00
Harald Welte 220fa74016 Add a README file for some background information about this repo
Let's add some general information about this repository, links to
redmine, gerrit, the mailing list, etc.

Change-Id: If034c6f551ff9bfaff0b8368fd0963f3147155b9
2017-03-16 15:31:37 +01:00
Neels Hofmeyr d3b58730d5 add osmo-auc-gen_test
Add test for osmo-auc-gen invocations to ensure stability across upcoming SQN
increment scheme changes.

The test comprises of a shell script that invokes the osmo-auc-gen binary with
various milenage parameters, of which the stdout/stderr are verified.

More osmo-auc-gen invocations could be added, but my main focus is on the SEQ
changes. Instead of manually testing that it still works for each SQN patch, I
want this test to do it for me.

To make sure that osmo-auc-gen is build before the tests are launched, place
'utils' before 'tests' in the root Makefile.am.

Related: OS#1968
Change-Id: Ib4af34201cd2e7d76037bcd31dd89ef18c1a9aec
2017-03-15 12:46:08 +00:00
Vadim Yanitskiy 3262f820b5 libosmocoding: migrate transcoding routines from OsmoBTS
There are some projects, such as GR-GSM and OsmocomBB, which would
benefit from using one shared implementation of GSM 05.03 code. So,
this commit introduces a new sub-library called libosmocoding, which
(for now) provides GSM, GPRS and EDGE transcoding routines, migrated
from OsmoBTS.

The original GSM 05.03 code from OsmoBTS was relicensed under
GPLv2-or-later with permission of copyright holders (Andreas Eversberg,
Alexander Chemeris and Tom Tsou).

The following data types are currently supported:

 - xCCH
 - PDTCH (CS 1-4 and MCS 1-9)
 - TCH/FR
 - TCH/HR
 - TCH/AFS
 - RCH/AHS
 - RACH
 - SCH

Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1
2017-03-07 01:06:38 +07:00
ikostov 3e6d5701e6 OAP:remove design doc. osmocom-authn-protocol.txt
Osmocom Authentication Protocol design document
 is removed from libosmocore project as this
 information has been included in the User Manual.
 It is present in SGSN User Manual.

 relates to OS#1874

Change-Id: I2d4dc608622a7484e67b15f930efc76e28285045
2017-02-15 17:56:39 +01:00
Harald Welte c0f0007292 import oap message parsing / encoding from openbsc.git; AGPL->GPL
In the process, also:
* Change the license from AGPLv3 to GPLv2-or-later;
* correct spelling of 'sysmocom' to lowercase;
* add '2016' to the copyright;
* rename to osmo_*;
* add API docs;
* add logging category DLOAP: define id and add to internal_cat;
* redirect all oap.c logging to DLOAP.

A unit test will follow in a subsequent patch, since it needs a minor tweak for
decoding of boolean values.

The related openbsc change-id is I2f06aaa6eb54eafa860cfed8e72e41d82ff1c4cf.

Tweaked-by: Neels Hofmeyr
Change-Id: If5099e60681a215e798b6675f21813f26769c253
2016-12-11 03:42:58 +01:00
Holger Hans Peter Freyther 7d004a1d69 doxygen: Remove the tag file on uninstall as well
Hopefully last patch:

ERROR: files left in build directory after distclean:
./doc/libosmocore.tag
./doc/libosmovty.tag
./doc/libosmogsm.tag
./doc/libosmocodec.tag
Makefile:800: recipe for target 'distcleancheck' failed
2016-04-24 20:57:30 +02:00
Holger Hans Peter Freyther c63ed3f7c6 doxygen: Next try to fix the uninstall handling
Use /* to remove the files
2016-04-24 20:30:34 +02:00
Holger Hans Peter Freyther faaf2528b1 doxygen: Try to uninstall the search files as well
Try to fix this by putting the search directory first as I don't
know how to pass -r to the RM command.

rm -f doc/{core,gsm,vty,codec}/{html,latex}/* doc/html.tar doc/{core,gsm,vty,codec}/doxygen_sqlite3.db
rm: cannot remove ‘doc/core/html/search’: Is a directory
rm: cannot remove ‘doc/gsm/html/search’: Is a directory
rm: cannot remove ‘doc/vty/html/search’: Is a directory
rm: cannot remove ‘doc/codec/html/search’: Is a directory
2016-04-24 20:18:20 +02:00
Harald Welte 534163bade remove doxygen_sqlite3.db during 'make clean' 2014-10-26 20:09:17 +01:00
Harald Welte d54c2ee8c5 initial checkin of 'libosmosim' 2014-10-26 19:09:22 +01:00
Jan Engelhardt 9ffeb9756a build: remove unused all_includes and use AM_CPPFLAGS
Preprocessor flags are best placed in AM_CPPFLAGS. Remove use of the
unused all_includes variable, which is never set.
2014-10-03 08:48:31 +02:00
Harald Welte 3ff81b1a6b libctrl: autotools build system integration
Now we actually build the recently-imported libctrl
2014-08-21 15:34:18 +02:00
Sylvain Munaut e28bc6876d build: Add .version to EXTRA_DIST
This is required to make distcheck work and apparently that's
the "good way" to do it.

See http://comments.gmane.org/gmane.comp.lib.gnulib.bugs/27780

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-06-15 18:47:03 +02:00
Alexander Huemer 1e4400d26a Makefile.am: Use AM_CPPFLAGS
Since automake 1.13 INCLUDES is depricates and causes a warning
2013-06-12 07:53:30 +02:00
Holger Hans Peter Freyther 8297c819e9 vty: Add xsd and a command that can generate the documentation.
When building the doxygen documentation do not remove the other
VTY documentation files in the doc/vty folder. Create a command
that can be installed to dump all nodes and commands as XML on
the given VTY. Create a schema for the XML file and a XSL-T script
that can merge the generated file with additional information.
2012-07-25 11:58:58 +02:00
Diego Elio Pettenò 200710e3eb build: use default htmldir directory.
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
2012-06-30 22:01:43 +02:00
Diego Elio Pettenò 7e007e0f87 build: avoid multi-level recursion for src/ directory.
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
2012-06-30 22:01:43 +02:00
Diego Elio Pettenò 8dd81fa31f build: avoid duplication of automake options, add no-dist-gzip.
There's little to no point to build the gzip version of the tarball
when we're building the bzip2 version.

Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
2012-06-30 22:01:43 +02:00
Harald Welte 641f7cee5d libosmogb: move files to proper location and fix build 2012-06-17 23:05:26 +08:00
Sylvain Munaut 49767228f7 build: Remove docdir, don't comment it
The revision control is there to show the history, no point in
leaving commented out bits

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-09-02 20:23:42 +02:00
job 36b4a20acd Adapted configure options to autoconf default behaviour 2011-09-02 09:10:37 +02:00
Harald Welte 47945f0a8b Make sure 'make distclean' works for doxygen 2011-08-20 17:40:04 +02:00
Harald Welte c7859edf51 consistent Doxyfile naming 2011-08-20 17:39:58 +02:00
Harald Welte 09b4c2275e update makefile.am to support out-of-tree builds
Conflicts:

	Makefile.am
2011-08-20 17:39:45 +02:00
Harald Welte 02624d2743 doxygen automake integration: make sure the 'doc' directory exists 2011-08-17 19:41:49 +02:00
Harald Welte 7992af0180 doxygen: fix correct use of doc/core subdirectory 2011-08-17 19:37:26 +02:00
Harald Welte 21e73c2597 Integrate doxygen documentation building into autoconf/automake process 2011-08-17 19:33:06 +02:00
Harald Welte eeb78dde9b add new 'osmo-arfcn' program to compute frequency based on arfcn
The freq -> arfcn side still needs to be implemented.
2011-08-02 13:44:54 +02:00