]> git.saurik.com Git - ldid.git/blob - make.sh
Maintain fat_arch.align when allocating fat files.
[ldid.git] / make.sh
1 #!/bin/bash
2
3 set -e
4
5 sudo xcode-select --switch /Applications/Xcode-5.1.1.app
6
7 if which xcrun &>/dev/null; then
8 flags=(xcrun -sdk macosx g++)
9 flags+=(-mmacosx-version-min=10.4)
10
11 for arch in i386 x86_64; do
12 flags+=(-arch "${arch}")
13 done
14 else
15 flags=(g++)
16 fi
17
18 flags+=(-I.)
19
20 set -x
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