Osmocom Top-level Makefile and dev tools
Go to file
Neels Hofmeyr 453004b171 fix some deps: sgsn->ggsn and msc->libsmpp34 2018-05-25 17:14:16 +02:00
src s: auto fast forward, commit local mods first 2018-02-28 18:28:09 +01:00
.gitignore add src scripts 2017-08-22 15:58:51 +02:00
2G.deps fix some deps: sgsn->ggsn and msc->libsmpp34 2018-05-25 17:14:16 +02:00
3G+2G.deps fix some deps: sgsn->ggsn and msc->libsmpp34 2018-05-25 17:14:16 +02:00
README readme: add quick start section 2018-01-06 21:20:28 +01:00
all-tests.opts all-tests.opts: add osmo-mgw, osmo-hlr external tests 2017-09-26 13:55:07 +02:00
default.opts default.opts: drop obsolete configure options for osmo-bsc 2017-12-06 00:30:39 +01:00
gen_makefile.py rm .version with -f 2018-04-23 17:04:25 +02:00
iu.opts Revert "move iu.opts to no-iu.opts, change to --disable-iu" 2017-09-06 18:57:30 +02:00
osmo-uninstall.sh add osmo-uninstall.sh 2017-08-23 00:13:33 +02:00
sanitize.opts add sanitize.opts 2017-11-21 13:02:18 +01:00
transcoding.opts fix transcoding.opts: osmo-bsc also needs it ATM 2017-08-22 19:34:02 +02:00
werror.opts add werror.opts using 'configure --enable-werror' 2018-03-16 03:45:02 +01:00

README

=== Quick Start

sudo apt install \
  build-essential gcc g++ make automake autoconf libtool pkg-config \
  libtalloc-dev libpcsclite-dev libortp-dev libsctp-dev libssl-dev libdbi-dev \
  libdbd-sqlite3 libsqlite3-dev libpcap-dev libc-ares-dev libgnutls28-dev \
  libsctp-dev sqlite3

./gen_makefile.py 3G+2G.deps default.opts iu.opts -I -m make

cd make
make

- 'make' will ask for sudo password to run 'make install' and 'ldconfig'.
  To run non-interactively:

  - 'make install':
    chown $USER: /usr/local
    Then call gen_makefile.py once without the -I option

  - 'ldconfig':
    echo "$USER  ALL= NOPASSWD: /sbin/ldconfig" > /etc/sudoers.d/ldconfig


=== gen_makefile.py

This provides a set of top-level makefiles to build variants of the Osmocom
source trees. It is inteded for the core network components and related
projects, but works generically.

The idea is to have all your Osmocom git clones in ./src, while keeping one or
more separate build trees in ./make-*.

Run ./gen_makefile.py with a choice of projects (2G only or also 3G?)
and a choice of configure options.


Examples:

Full 2G and 3G support:

  ./gen_makefile.py 3G+2G.deps default.opts iu.opts  -m make
  cd make
  make

2G only, and a custom dir name of 'make-2G':

  ./gen_makefile.py 2G.deps default.opts -m make-2G
  cd make-2G
  make

If you make modifications in one of the source trees, this Makefile will pick
it up, rebuild the project and also rebuild all dependencies (according to the
*.deps file the Makefile was generated from).

If you modify the *.deps or *.opts file, you can easily run 'make regen' in a
make-* subdir to regenerate the Makefile from the same files.

In your make-* subdir there are empty status files that are touched for every
completed make target. From these, 'make' can detect what needs to be rebuilt.
You can manually remove them to force a rebuild of a specific target.

For example, if you 'rm .make.libosmocore.autoconf', libosmocore and all
projects depending on libosmocore will be rebuilt from scratch.

For more details on the *.opts and *.deps syntax, read the docs at the top of
./gen_makefile.py.

It is also easily possible to keep sources and build trees in various
configurations, see the command line options of ./gen_makefile.py.


=== Build Environment

For dependencies, see the "External dependencies" on:

  https://osmocom.org/projects/cellular-infrastructure/wiki/Build_from_Source

If /usr/local/ is not writable by your user, pass the --sudo-make-install
option to gen_makefile.py above (a custom --prefix is not yet supported).

If your system doesn't have this by default, you will need:

  export LD_LIBRARY_PATH="/usr/local/lib"

and

  export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"

to your environment. To use the installed binaries after installation, also

  export PATH="$PATH:/usr/local/bin"


=== osmo-uninstall.sh

Remove osmocom built binaries and headers from given prefix,
default is /usr/local.


=== src/*

Find other useful scripts in src/, see src/README.