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

set -e

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

set -x
"${flags[@]}" -o ldid ldid.cpp -I. -x c lookup2.c -x c sha1.c