aboutsummaryrefslogtreecommitdiffstats
path: root/make.sh
blob: 4ab6acffe3bd5c29e54ee956148fbdbf767386b3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

set -e

sudo xcode-select --switch /Applications/Xcode-5.1.1.app

if which xcrun &>/dev/null; then
    flags=(xcrun -sdk macosx g++)
    flags+=(-mmacosx-version-min=10.4)

    for arch in i386 x86_64; do
        flags+=(-arch "${arch}")
    done
else
    flags=(g++)
fi

flags+=(-I.)

set -x
"${flags[@]}" -c -std=c++11 -o ldid.o ldid.cpp
"${flags[@]}" -o ldid ldid.o -x c lookup2.c -x c sha1.c