| 1 |
## Building |
| 2 |
|
| 3 |
Usual Makefile project. This project does not require a configure phase. |
| 4 |
|
| 5 |
### Special optional variables |
| 6 |
|
| 7 |
# `PLATFORM` |
| 8 |
|
| 9 |
Darwin version to target against. Detected automatically, but can also |
| 10 |
be overridden manually to test builds for other OS versions. |
| 11 |
(This is not the macOS version.) |
| 12 |
|
| 13 |
# `FORCE_ARCH` |
| 14 |
|
| 15 |
Architecture to build for. Accepts a single value, not a list. |
| 16 |
|
| 17 |
If your `lipo` binary is new enough and supports the `-archs` flag, you will |
| 18 |
not need to use this variable. Instead, directly build the software |
| 19 |
universally in one pass using the usual `-arch` compiler flags. The |
| 20 |
autodetection, split and merge features will then handle the different |
| 21 |
architectures automatically. |
| 22 |
|
| 23 |
Older versions of `lipo` do not support the `-archs` flag, so automatic |
| 24 |
architecture detection via binary/object file inspection is not be possible |
| 25 |
on older platforms. |
| 26 |
|
| 27 |
In order to avoid an additional dependency on the `cctools` port |
| 28 |
to provide a newer `lipo` version, this variable was introduced. |
| 29 |
It disables the automatic architecture detection feature and instead |
| 30 |
hardcodes the contained value as the target architecture. |
| 31 |
|
| 32 |
Within `MacPorts`, we use it in multi-architecture builds with one |
| 33 |
pass per architecture. Finally, the `MacPorts ``muniversal` PortGroup |
| 34 |
will merge the resulting binaries into one fat/universal binary automatically. |
| 35 |
|
| 36 |
Some symbols must be built multiple times. Each variant will use a different |
| 37 |
data layout and have a special postfix appended to it. The data layouts |
| 38 |
supported and needed depend upon the architecture and (target) OS version. |