blob: a94522b19da128fab0c3c70623d19646f2b3a792 [file] [log] [blame]
Neels Hofmeyr0a1bdff2017-08-13 03:22:42 +02001This provides a set of top-level makefiles to build variants of the Osmocom
2source trees. It is inteded for the core network components and related
3projects, but works generically.
4
5The idea is to have all your Osmocom git clones in ./src, while keeping one or
6more separate build trees in ./make-*.
7
8Run ./gen_makefile.py with a choice of projects (2G only or also 3G?)
9and a choice of configure options, for example:
10
Neels Hofmeyr450dac72017-08-22 19:27:08 +020011 ./gen_makefile.py 3G+2G.deps default.opts iu.opts
Neels Hofmeyr0a1bdff2017-08-13 03:22:42 +020012
13This generates a new dir containing a Makefile. When you run make in it, this
14will clone the source trees (if not present yet) and build all of them in the
15right order:
16
Neels Hofmeyr450dac72017-08-22 19:27:08 +020017 cd make-3G+2G-default+iu
Neels Hofmeyr0a1bdff2017-08-13 03:22:42 +020018 make
19
20If you make modifications in one of the source trees, this Makefile will pick
21it up, rebuild the project and also rebuild all dependencies (according to the
22*.deps file the Makefile was generated from).
23
24If you modify the *.deps or *.opts file, you can easily run 'make regen' in a
25make-* subdir to regenerate the Makefile from the same files.
26
27In your make-* subdir there are empty status files that are touched for every
28completed make target. From these, 'make' can detect what needs to be rebuilt.
29You can manually remove them to force a rebuild of a specific target.
30
31For example, if you 'rm .make.libosmocore.autoconf', libosmocore and all
32projects depending on libosmocore will be rebuilt from scratch.
33
34For more details on the *.opts and *.deps syntax, read the docs at the top of
35./gen_makefile.py.
36
37It is also easily possible to keep sources and build trees in various
38configurations, see the command line options of ./gen_makefile.py.