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