-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
BUILDING.txt
57 lines (38 loc) · 1.73 KB
/
BUILDING.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
## Building
Usual Makefile project. This project does not require a configure phase.
The minimum required compiler is GCC 4.2. On 10.6+ with Xcode 3.2+, the
default Xcode compiler is adequate, and a simple 'make' is sufficient to
build all three versions of the library for the default architecture.
On 10.5 with Xcode 3.1, GCC 4.2 is provided, but the default is usually
GCC 4.0, so overriding the default may be needed. On 10.4 with Xcode
2.5, only GCC 4.0 is provided, so it's necessary to use the MacPorts
apple-gcc42 compiler (or better).
Cross-builds and/or universal builds may be specified in the usual way,
either via the usual CFLAGS/CXXFLAGS/LDFLAGS, or via ARCHFLAGS.
Note that the 'ar' tool may generate spurious warnings when creating a
universal static library, but it still produces the correct result.
## Optional variables
# `CFLAGS`
# `CXXFLAGS`
# `LDFLAGS`
Applied as usual to C compiles, C++ compiles, and linking, respectively. Note
that CFLAGS and CXXFLAGS are applied in addition to the defaults included in
the Makefile. To override the defaults, see below.
# `XCFLAGS`
# `XCXXFLAGS`
Overridable default values for CFLAGS and CXXFLAGS, respectively. Merged with
any supplied CFLAGS and/or CXXFLAGS. Note that the only C++ builds are a few
tests not included in the standard test suite, so [X]CXXFLAGS usually has no
effect.
# `ARCHFLAGS`
Merged into CFLAGS/CXXFLAGS/LDFLAGS, normally to specify arch-related options.
# `DEBUG`
Merged into CFLAGS/CXXFLAGS/LDFLAGS, normally to specify a debug option
such as `-g3`.
# `OPT`
The optimization setting (defaulting to `-Os`), which is merged into the
compile flags but not the linker flags.
### Special optional variables
# `PLATFORM`
# `FORCE_ARCH`
Obsolete. No longer used.