4 # A swiss-army knige of GPIO shenanigans.
5 # https://projects.drogon.net/wiring-pi
7 # Copyright (c) 2012-2013 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 #################################################################################
32 INCLUDE = -I$(DESTDIR)$(PREFIX)/include
33 CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
35 LDFLAGS = -L$(DESTDIR)$(PREFIX)/lib
36 LIBS = -lwiringPi -lwiringPiDev -lpthread -lm
38 # May not need to alter anything below this line
39 ###############################################################################
41 SRC = gpio.c extensions.c readall.c pins.c
49 @$(CC) -o $@ $(OBJ) $(LDFLAGS) $(LIBS)
53 @$(CC) -c $(CFLAGS) $< -o $@
58 @rm -f $(OBJ) gpio *~ core tags *.bak
68 @cp gpio $(DESTDIR)$(PREFIX)/bin
69 @chown root.root $(DESTDIR)$(PREFIX)/bin/gpio
70 @chmod 4755 $(DESTDIR)$(PREFIX)/bin/gpio
71 @mkdir -p $(DESTDIR)$(PREFIX)/man/man1
72 @cp gpio.1 $(DESTDIR)$(PREFIX)/man/man1
77 @rm -f $(DESTDIR)$(PREFIX)/bin/gpio
78 @rm -f $(DESTDIR)$(PREFIX)/man/man1/gpio.1
87 extensions.o: extensions.h