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
48 #all: $(STATIC) $(DYNAMIC)
53 @ar rcs $(STATIC) $(OBJ)
59 @$(CC) -shared -Wl,-soname,libwiringPi.so.1 -o libwiringPi.so.1.0 -lpthread $(OBJ)
63 @$(CC) -c $(CFLAGS) $< -o $@
67 rm -f $(OBJ) *~ core tags Makefile.bak libwiringPi.*
77 @install -m 0755 -d /usr/local/lib
78 @install -m 0755 -d /usr/local/include
79 @install -m 0644 wiringPi.h /usr/local/include
80 @install -m 0644 wiringSerial.h /usr/local/include
81 @install -m 0644 wiringShift.h /usr/local/include
82 @install -m 0644 gertboard.h /usr/local/include
83 @install -m 0644 piNes.h /usr/local/include
84 @install -m 0644 softPwm.h /usr/local/include
85 @install -m 0644 lcd.h /usr/local/include
86 @install -m 0644 wiringPiSPI.h /usr/local/include
87 # @install -m 0644 libwiringPi.a /usr/local/lib
88 @install -m 0755 libwiringPi.so.1.0 /usr/local/lib
89 @ln -sf /usr/local/lib/libwiringPi.so.1.0 /usr/local/lib/libwiringPi.so
90 @ln -sf /usr/local/lib/libwiringPi.so.1.0 /usr/local/lib/libwiringPi.so.1
96 @rm -f /usr/local/include/wiringPi.h
97 @rm -f /usr/local/include/wiringSerial.h
98 @rm -f /usr/local/include/wiringShift.h
99 @rm -f /usr/local/include/gertboard.h
100 @rm -f /usr/local/include/piNes.h
101 @rm -f /usr/local/include/softPwm.h
102 @rm -f /usr/local/include/lcd.h
103 @rm -f /usr/local/include/wiringPiSPI.h
104 @rm -f /usr/local/lib/libwiringPi.*
114 wiringPi.o: wiringPi.h
115 wiringPiFace.o: wiringPi.h
116 wiringSerial.o: wiringSerial.h
117 wiringShift.o: wiringPi.h wiringShift.h
118 gertboard.o: wiringPiSPI.h gertboard.h
119 piNes.o: wiringPi.h piNes.h
120 lcd.o: wiringPi.h lcd.h
121 piHiPri.o: wiringPi.h
122 piThread.o: wiringPi.h
123 softPwm.o: wiringPi.h softPwm.h
124 wiringPiSPI.o: wiringPiSPI.h