X-Git-Url: https://git.saurik.com/ldid.git/blobdiff_plain/6212944b8293bb035b4a3fd4bdfd14abdd545a5a..4f4aa9c37a0c26908cafbc5ef58c94814d153415:/make.sh diff --git a/make.sh b/make.sh index 0be7611..0b54116 100755 --- a/make.sh +++ b/make.sh @@ -1,2 +1,19 @@ #!/bin/bash -g++ -arch i386 -arch x86_64 -o ldid ldid.cpp -I. -x c lookup2.c sha1.c + +set -e + +flags=() + +sdk=/Developer/SDKs/MacOSX10.4u.sdk +if [[ -e $sdk ]]; then + flags+=(-mmacosx-version-min=10.4 -isysroot "$sdk") +fi + +for arch in i386 x86_64 ppc armv6; do + if g++ -arch "${arch}" --version &>/dev/null; then + flags+=(-arch "${arch}") + fi +done + +set -x +g++ "${flags[@]}" -o ldid ldid.cpp -I. -x c lookup2.c sha1.c