]>
Commit | Line | Data |
---|---|---|
6212944b | 1 | #!/bin/bash |
6579543e | 2 | |
a5b37447 | 3 | set -e |
1d58df4c | 4 | |
cd35ba9e JF |
5 | if which xcrun &>/dev/null; then |
6 | flags=(xcrun -sdk macosx g++) | |
7 | flags+=(-mmacosx-version-min=10.4) | |
6579543e | 8 | |
cd35ba9e | 9 | for arch in i386 x86_64; do |
bf29b0fe | 10 | flags+=(-arch "${arch}") |
cd35ba9e JF |
11 | done |
12 | else | |
13 | flags=(g++) | |
14 | fi | |
bf29b0fe | 15 | |
4374152f JF |
16 | flags+=(-I.) |
17 | ||
bf29b0fe | 18 | set -x |
4374152f JF |
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 |