]>
Commit | Line | Data |
---|---|---|
6212944b | 1 | #!/bin/bash |
6579543e | 2 | |
a5b37447 | 3 | set -e |
1d58df4c | 4 | |
69d2fe54 JF |
5 | sudo xcode-select --switch /Applications/Xcode-5.1.1.app |
6 | ||
cd35ba9e JF |
7 | if which xcrun &>/dev/null; then |
8 | flags=(xcrun -sdk macosx g++) | |
9 | flags+=(-mmacosx-version-min=10.4) | |
6579543e | 10 | |
cd35ba9e | 11 | for arch in i386 x86_64; do |
bf29b0fe | 12 | flags+=(-arch "${arch}") |
cd35ba9e JF |
13 | done |
14 | else | |
15 | flags=(g++) | |
16 | fi | |
bf29b0fe | 17 | |
4374152f JF |
18 | flags+=(-I.) |
19 | ||
bf29b0fe | 20 | set -x |
4374152f JF |
21 | "${flags[@]}" -c -std=c++11 -o ldid.o ldid.cpp |
22 | "${flags[@]}" -o ldid ldid.o -x c lookup2.c -x c sha1.c |