4 # A swiss-army knige of GPIO shenanigans.
5 # https://projects.drogon.net/wiring-pi
7 # Copyright (c) 2012-2015 Gordon Henderson
8 #################################################################################
9 # This file is part of wiringPi:
10 # Wiring Compatable library for the Raspberry Pi
12 # wiringPi is free software: you can redistribute it and/or modify
13 # it under the terms of the GNU Lesser General Public License as published by
14 # the Free Software Foundation, either version 3 of the License, or
15 # (at your option) any later version.
17 # wiringPi is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU Lesser General Public License for more details.
22 # You should have received a copy of the GNU Lesser General Public License
23 # along with wiringPi. If not, see <http://www.gnu.org/licenses/>.
24 #################################################################################
36 INCLUDE = -I$(DESTDIR)$(PREFIX)/include
37 CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
39 LDFLAGS = -L$(DESTDIR)$(PREFIX)/lib
40 LIBS = -lwiringPi -lwiringPiDev -lpthread -lm
42 # May not need to alter anything below this line
43 ###############################################################################
45 SRC = gpio.c readall.c pins.c
56 $Q $(CC) -o $@ $(OBJ) $(LDFLAGS) $(LIBS)
60 $Q $(CC) -c $(CFLAGS) $< -o $@
65 $Q rm -f $(OBJ) gpio *~ core tags *.bak
75 $Q cp gpio $(DESTDIR)$(PREFIX)/bin
76 $Q chown root.root $(DESTDIR)$(PREFIX)/bin/gpio
77 $Q chmod 4755 $(DESTDIR)$(PREFIX)/bin/gpio
78 $Q mkdir -p $(DESTDIR)$(PREFIX)/man/man1
79 $Q cp gpio.1 $(DESTDIR)$(PREFIX)/man/man1
83 $Q echo "[Install: deb]"
84 $Q install -m 0755 -d ~/wiringPi/debian/wiringPi/usr/bin
85 $Q install -m 0755 gpio ~/wiringPi/debian/wiringPi/usr/bin
90 $Q rm -f $(DESTDIR)$(PREFIX)/bin/gpio
91 $Q rm -f $(DESTDIR)$(PREFIX)/man/man1/gpio.1