]> git.cameronkatri.com Git - ldid.git/blobdiff - make.sh
Add minimal as a git submodule for easier access.
[ldid.git] / make.sh
diff --git a/make.sh b/make.sh
index c8f467269699bbba5aa0df5dafcb4bb0d81018aa..0b541163809491c58ff920cc49bcbb57d400f6cb 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+set -e
+
 flags=()
 
 sdk=/Developer/SDKs/MacOSX10.4u.sdk
@@ -7,4 +9,11 @@ if [[ -e $sdk ]]; then
     flags+=(-mmacosx-version-min=10.4 -isysroot "$sdk")
 fi
 
-g++ -arch ppc -arch i386 -arch x86_64 "${flags[@]}" -o ldid ldid.cpp -I. -x c lookup2.c sha1.c
+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