2017-08-22 22:13:33 +00:00
|
|
|
=== gen_makefile.py
|
|
|
|
|
2017-08-13 01:22:42 +00:00
|
|
|
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?)
|
2017-09-03 21:57:55 +00:00
|
|
|
and a choice of configure options.
|
2017-08-13 01:22:42 +00:00
|
|
|
|
2017-09-20 17:41:09 +00:00
|
|
|
For the clone step to work, you must either provide the --url argument to
|
|
|
|
gen_makefile like
|
|
|
|
./gen_makefile --url git://git.osmocom.org
|
|
|
|
OR add an SSH config to reach gerrit.osmocom.org as ssh://go; add this to your
|
|
|
|
~/.ssh/config:
|
|
|
|
host go
|
|
|
|
hostname gerrit.osmocom.org
|
|
|
|
port 29418
|
|
|
|
|
|
|
|
|
2017-09-03 21:57:55 +00:00
|
|
|
Examples:
|
|
|
|
|
|
|
|
Full 2G and 3G support:
|
|
|
|
|
2017-09-20 17:41:09 +00:00
|
|
|
./gen_makefile.py --url=git://git.osmocom.org 3G+2G.deps default.opts iu.opts
|
2017-09-03 21:57:55 +00:00
|
|
|
|
|
|
|
2G only (requires to pass no-iu.opts), and a custom dir name of 'make-2G':
|
|
|
|
|
2017-09-06 16:54:58 +00:00
|
|
|
./gen_makefile.py 2G.deps default.opts -m make-2G
|
2017-08-13 01:22:42 +00:00
|
|
|
|
|
|
|
This generates a new dir containing a Makefile. When you run make in it, this
|
|
|
|
will clone the source trees (if not present yet) and build all of them in the
|
|
|
|
right order:
|
|
|
|
|
2017-09-06 16:54:58 +00:00
|
|
|
cd make-3G+2G-default+iu
|
2017-08-13 01:22:42 +00:00
|
|
|
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.
|
2017-08-22 22:13:33 +00:00
|
|
|
|
|
|
|
|
2017-10-01 22:26:12 +00:00
|
|
|
=== Build Environment
|
|
|
|
|
|
|
|
For dependencies, see
|
|
|
|
|
|
|
|
https://osmocom.org/projects/cellular-infrastructure/wiki/Build_from_Source
|
|
|
|
|
|
|
|
Furthermore, note that the makefiles by default install to /usr/local/*,
|
|
|
|
so if your system doesn't have this by default, you should probably add
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
|
2017-08-22 22:13:33 +00:00
|
|
|
=== osmo-uninstall.sh
|
|
|
|
|
|
|
|
Remove osmocom built binaries and headers from given prefix,
|
|
|
|
default is /usr/local.
|
2017-09-04 02:32:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
=== src/*
|
|
|
|
|
|
|
|
Find other useful scripts in src/, see src/README.
|