chiark / gitweb /
Fixed delayMicroseconds for more than 1 second.
[wiringPi.git] / build
1 #!/bin/sh
2
3 check_make_ok() {
4   if [ $? != 0 ]; then
5     echo ""
6     echo "Make Failed..."
7     echo "Please check the messages and fix any problems. If you're still stuck,"
8     echo "then please email all the output and as many details as you can to"
9     echo "  projects@drogon.net"
10     echo ""
11     exit 1
12   fi
13 }
14
15 if [ x$1 = "xclean" ]; then
16   cd wiringPi
17   echo -n "wiringPi:   "        ; make clean
18   cd ../devLib
19   echo -n "DevLib:     "        ; make clean
20   cd ../gpio
21   echo -n "gpio:       "        ; make clean
22   cd ../examples
23   echo -n "Examples:   "        ; make clean
24   cd Gertboard
25   echo -n "Gertboard:  "        ; make clean
26   cd ../PiFace
27   echo -n "PiFace:     "        ; make clean
28   cd ../q2w
29   echo -n "Quick2Wire: "        ; make clean
30   exit
31 fi
32
33 if [ x$1 = "xuninstall" ]; then
34   cd wiringPi
35   echo -n "wiringPi: " ; sudo make uninstall
36   cd ../devLib
37   echo -n "DevLib:   " ; sudo make uninstall
38   cd ../gpio
39   echo -n "gpio:     " ; sudo make uninstall
40   exit
41 fi
42
43
44   echo "wiringPi Build script"
45   echo "====================="
46   echo
47
48   echo
49   echo "WiringPi Library"
50   cd wiringPi
51   sudo make uninstall
52   make
53   check_make_ok
54   sudo make install
55   check_make_ok
56
57   echo
58   echo "WiringPi Devices Library"
59   cd ../devLib
60   sudo make uninstall
61   make
62   check_make_ok
63   sudo make install
64   check_make_ok
65
66   echo
67   echo "GPIO Utility"
68   cd ../gpio
69   make
70   check_make_ok
71   sudo make install
72   check_make_ok
73
74 # echo
75 # echo "Examples"
76 # cd ../examples
77 # make
78 # cd ..
79
80 echo
81 echo All Done.
82 echo ""
83 echo "NOTE: This is wiringPi v2, and if you need to use the lcd, Piface,"
84 echo "  Gertboard, MaxDetext, etc. routines then you must change your"
85 echo "  compile scripts to add -lwiringPiDev"
86 echo ""