chiark / gitweb /
tidied and tested DRC Serial (renamed it it drcSerial too)
[wiringPi.git] / build
diff --git a/build b/build
index 776c756fa0703eae0ab3420c11dd09e651348e5e..e17cf18737abb5d81ae9f603e7c8b11bf4258843 100755 (executable)
--- a/build
+++ b/build
@@ -1,7 +1,6 @@
-#!/bin/bash
+#!/bin/sh
 
-check-make-ok()
-{
+check_make_ok() {
   if [ $? != 0 ]; then
     echo ""
     echo "Make Failed..."
@@ -28,6 +27,8 @@ if [ x$1 = "xclean" ]; then
   echo -n "PiFace:     "       ; make clean
   cd ../q2w
   echo -n "Quick2Wire: "       ; make clean
+  cd ../PiGlow
+  echo -n "PiGlow:     "       ; make clean
   exit
 fi
 
@@ -50,27 +51,39 @@ fi
   echo "WiringPi Library"
   cd wiringPi
   sudo make uninstall
-  make
-  check-make-ok
-  sudo make install
-  check-make-ok
+  if [ x$1 = "xstatic" ]; then
+    make static
+    check_make_ok
+    sudo make install-static
+  else
+    make
+    check_make_ok
+    sudo make install
+  fi
+  check_make_ok
 
   echo
   echo "WiringPi Devices Library"
   cd ../devLib
   sudo make uninstall
-  make
-  check-make-ok
-  sudo make install
-  check-make-ok
+  if [ x$1 = "xstatic" ]; then
+    make static
+    check_make_ok
+    sudo make install-static
+  else
+    make
+    check_make_ok
+    sudo make install
+  fi
+  check_make_ok
 
   echo
   echo "GPIO Utility"
   cd ../gpio
   make
-  check-make-ok
+  check_make_ok
   sudo make install
-  check-make-ok
+  check_make_ok
 
 # echo
 # echo "Examples"