Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ echo "done."

patch ./wiringpi/devLib/Makefile < ./patchs/devLib_Makefile.patch
patch ./wiringpi/gpio/Makefile < ./patchs/gpio_Makefile.patch
patch ./wiringpi/wiringPi/Makefile < ./patchs/wiringpi_Makefile.patch

if [ -z "$CC" ]; then
export CC=gcc
fi

echo -n "Making libWiringPi ... "
cd ./wiringpi/wiringPi/
Expand Down
3 changes: 2 additions & 1 deletion patchs/devLib_Makefile.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
@@ -33,7 +34,7 @@
#DEBUG = -g -O0
DEBUG = -O2
CC = gcc
-CC = gcc
+CC ?= gcc
-INCLUDE = -I.
+INCLUDE = -I. -I$(PWD)/../wiringPi
DEFS = -D_GNU_SOURCE
Expand Down
3 changes: 2 additions & 1 deletion patchs/gpio_Makefile.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

#DEBUG = -g -O0
DEBUG = -O2
CC = gcc
-CC = gcc
+CC ?= gcc
-INCLUDE = -I$(DESTDIR)$(PREFIX)/include
+INCLUDE = -I$(PWD)/../wiringPi -I$(PWD)/../devLib
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
Expand Down
11 changes: 11 additions & 0 deletions patchs/wiringpi_Makefile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- ./wiringpi/wiringPi/Makefile 2018-07-09 17:41:41.230429060 +0200
+++ ./wiringpi/wiringPi/Makefile_orig 2018-07-09 17:40:09.449485572 +0200
@@ -30,7 +30,7 @@

#DEBUG = -g -O0
DEBUG = -O2
+CC ?= gcc
-CC = gcc
INCLUDE = -I.
DEFS = -D_GNU_SOURCE
CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC