chiark / gitweb /
Build system: Remove a trailing tab from gpio/Makefile
[wiringPi.git] / build
diff --git a/build b/build
index 377bd165b6177f99545c1ca1a46c6b95d15428d5..7c050871ec7774590e90e9bc500775e790e0ade7 100755 (executable)
--- a/build
+++ b/build
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -e
 
 # build
 #      Simple wiringPi build and install script
@@ -73,6 +73,28 @@ if [ x$1 = "xuninstall" ]; then
   exit
 fi
 
+# Only if you know what you're doing!
+
+if [ x$1 = "xdebian" ]; then
+  here=`pwd`
+  cd debian/wiringPi
+  rm -rf usr
+  cd $here/wiringPi
+  make install-deb
+  cd $here/devLib
+  make install-deb
+  cd $here/gpio
+  make install-deb
+  cd $here/debian
+  fakeroot dpkg-deb --build wiringPi
+  mv wiringPi.deb  wiringpi-`cat $here/VERSION`-1.deb
+  exit
+fi
+
+if [ x$1 != "x" ]; then
+  echo "Usage: $0 [clean | uninstall]"
+  exit 1
+fi
 
   echo "wiringPi Build script"
   echo "====================="
@@ -80,20 +102,20 @@ fi
 
   hardware=`fgrep Hardware /proc/cpuinfo | head -1 | awk '{ print $3 }'`
 
-  if [ x$hardware != "xBCM2708" ]; then
-    echo ""
-    echo "   +------------------------------------------------------------+"
-    echo "   |   wiringPi is designed to run on the Raspberry Pi only.    |"
-    echo "   |   This processor does not appear to be a Raspberry Pi.     |"
-    echo "   +------------------------------------------------------------+"
-    echo "   | In the unlikely event that you think it is a Raspberry Pi, |"
-    echo "   | then please accept my apologies and email the contents of  |"
-    echo "   | /proc/cpuinfo to projects@drogon.net.                      |"
-    echo "   |    - Thanks, Gordon                                        |"
-    echo "   +------------------------------------------------------------+"
-    echo ""
-    exit 1
-  fi
+#  if [ x$hardware != "xBCM2708" ]; then
+#    echo ""
+#    echo "   +------------------------------------------------------------+"
+#    echo "   |   wiringPi is designed to run on the Raspberry Pi only.    |"
+#    echo "   |   This processor does not appear to be a Raspberry Pi.     |"
+#    echo "   +------------------------------------------------------------+"
+#    echo "   | In the unlikely event that you think it is a Raspberry Pi, |"
+#    echo "   | then please accept my apologies and email the contents of  |"
+#    echo "   | /proc/cpuinfo to projects@drogon.net.                      |"
+#    echo "   |    - Thanks, Gordon                                        |"
+#    echo "   +------------------------------------------------------------+"
+#    echo ""
+#    exit 1
+#  fi
 
 
   echo
@@ -101,11 +123,11 @@ fi
   cd wiringPi
   sudo make uninstall
   if [ x$1 = "xstatic" ]; then
-    make static
+    make -j5 static
     check_make_ok
     sudo make install-static
   else
-    make
+    make -j5
     check_make_ok
     sudo make install
   fi
@@ -116,11 +138,11 @@ fi
   cd ../devLib
   sudo make uninstall
   if [ x$1 = "xstatic" ]; then
-    make static
+    make -j5 static
     check_make_ok
     sudo make install-static
   else
-    make
+    make -j5
     check_make_ok
     sudo make install
   fi
@@ -129,7 +151,7 @@ fi
   echo
   echo "GPIO Utility"
   cd ../gpio
-  make
+  make -j5
   check_make_ok
   sudo make install
   check_make_ok