chiark / gitweb /
Added in the PiGlow devLib extension driver.
[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   cd ../PiGlow
31   echo -n "PiGlow:     "        ; make clean
32   exit
33 fi
34
35 if [ x$1 = "xuninstall" ]; then
36   cd wiringPi
37   echo -n "wiringPi: " ; sudo make uninstall
38   cd ../devLib
39   echo -n "DevLib:   " ; sudo make uninstall
40   cd ../gpio
41   echo -n "gpio:     " ; sudo make uninstall
42   exit
43 fi
44
45
46   echo "wiringPi Build script"
47   echo "====================="
48   echo
49
50   echo
51   echo "WiringPi Library"
52   cd wiringPi
53   sudo make uninstall
54   make
55   check_make_ok
56   sudo make install
57   check_make_ok
58
59   echo
60   echo "WiringPi Devices Library"
61   cd ../devLib
62   sudo make uninstall
63   make
64   check_make_ok
65   sudo make install
66   check_make_ok
67
68   echo
69   echo "GPIO Utility"
70   cd ../gpio
71   make
72   check_make_ok
73   sudo make install
74   check_make_ok
75
76 # echo
77 # echo "Examples"
78 # cd ../examples
79 # make
80 # cd ..
81
82 echo
83 echo All Done.
84 echo ""
85 echo "NOTE: This is wiringPi v2, and if you need to use the lcd, Piface,"
86 echo "  Gertboard, MaxDetext, etc. routines then you must change your"
87 echo "  compile scripts to add -lwiringPiDev"
88 echo ""