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