]> git.saurik.com Git - ldid.git/blame - make.sh
Older versions of Apple's compiler give me errors.
[ldid.git] / make.sh
CommitLineData
6212944b 1#!/bin/bash
6579543e 2
a5b37447 3set -e
1d58df4c 4
69d2fe54
JF
5sudo xcode-select --switch /Applications/Xcode-5.1.1.app
6
cd35ba9e
JF
7if 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
14else
15 flags=(g++)
16fi
bf29b0fe 17
4374152f
JF
18flags+=(-I.)
19
bf29b0fe 20set -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