]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/bash | |
2 | ||
3 | set -e | |
4 | ||
5 | flags=() | |
6 | ||
7 | sdk=/Developer/SDKs/MacOSX10.4u.sdk | |
8 | if [[ -e $sdk ]]; then | |
9 | flags+=(-mmacosx-version-min=10.4 -isysroot "$sdk") | |
10 | fi | |
11 | ||
12 | for arch in i386 x86_64 ppc armv6; do | |
13 | if g++ -arch "${arch}" --version &>/dev/null; then | |
14 | flags+=(-arch "${arch}") | |
15 | fi | |
16 | done | |
17 | ||
18 | set -x | |
19 | g++ "${flags[@]}" -o ldid ldid.cpp -I. -x c lookup2.c sha1.c |