3 # wiringPi - Wiring Compatable library for the Raspberry Pi
5 # Copyright (c) 2012 Gordon Henderson
6 #################################################################################
7 # This file is part of wiringPi:
8 # https://projects.drogon.net/raspberry-pi/wiringpi/
10 # wiringPi is free software: you can redistribute it and/or modify
11 # it under the terms of the GNU Lesser General Public License as published by
12 # the Free Software Foundation, either version 3 of the License, or
13 # (at your option) any later version.
15 # wiringPi is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU Lesser General Public License for more details.
20 # You should have received a copy of the GNU Lesser General Public License
21 # along with wiringPi. If not, see <http://www.gnu.org/licenses/>.
22 #################################################################################
28 DYNAMIC=libwiringPi.so.$(DYN_VERS_MAJ).$(DYN_VERS_MIN)
34 CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe -fPIC
38 # Should not alter anything below this line
39 ###############################################################################
41 SRC = wiringPi.c wiringPiFace.c wiringSerial.c wiringShift.c \
44 lcd.c piHiPri.c piThread.c softPwm.c wiringPiSPI.c
46 OBJ = wiringPi.o wiringPiFace.o wiringSerial.o wiringShift.o \
49 lcd.o piHiPri.o piThread.o softPwm.o wiringPiSPI.o
51 all: $(STATIC) $(DYNAMIC)
55 @ar rcs $(STATIC) $(OBJ)
62 @gcc -shared -Wl,-soname,libwiringPi.so.1 -o libwiringPi.so.1.0 -lpthread $(OBJ)
66 @$(CC) -c $(CFLAGS) $< -o $@
69 rm -f $(OBJ) *~ core tags Makefile.bak libwiringPi.*
80 @install -m 0755 -d /usr/local/lib
81 @install -m 0755 -d /usr/local/include
82 @install -m 0644 wiringPi.h /usr/local/include
83 @install -m 0644 wiringSerial.h /usr/local/include
84 @install -m 0644 wiringShift.h /usr/local/include
85 @install -m 0644 gertboard.h /usr/local/include
86 @install -m 0644 piNes.h /usr/local/include
87 @install -m 0644 softPwm.h /usr/local/include
88 @install -m 0644 lcd.h /usr/local/include
89 @install -m 0644 wiringPiSPI.h /usr/local/include
90 @install -m 0644 libwiringPi.a /usr/local/lib
91 @install -m 0755 libwiringPi.so.1.0 /usr/local/lib
92 @ln -sf /usr/local/lib/libwiringPi.so.1.0 /usr/local/lib/libwiringPi.so
93 @ln -sf /usr/local/lib/libwiringPi.so.1.0 /usr/local/lib/libwiringPi.so.1
98 @rm -f /usr/local/include/wiringPi.h
99 @rm -f /usr/local/include/wiringSerial.h
100 @rm -f /usr/local/include/wiringShift.h
101 @rm -f /usr/local/include/gertboard.h
102 @rm -f /usr/local/include/piNes.h
103 @rm -f /usr/local/include/softPwm.h
104 @rm -f /usr/local/include/lcd.h
105 @rm -f /usr/local/include/wiringPiSPI.h
106 @rm -f /usr/local/lib/libwiringPi.*
112 wiringPi.o: wiringPi.h
113 wiringPiFace.o: wiringPi.h
114 wiringSerial.o: wiringSerial.h
115 wiringShift.o: wiringPi.h wiringShift.h
116 gertboard.o: wiringPiSPI.h gertboard.h
117 piNes.o: wiringPi.h piNes.h
118 lcd.o: wiringPi.h lcd.h
119 piHiPri.o: wiringPi.h
120 piThread.o: wiringPi.h
121 softPwm.o: wiringPi.h softPwm.h
122 wiringPiSPI.o: wiringPiSPI.h