 -CC	= gcc
 -INCLUDE	= -I/usr/local/include
 -CFLAGS	= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
+-
+-LDFLAGS	= -L/usr/local/lib
+-LDLIBS    = -lwiringPi -lwiringPiDev -lpthread -lm
 +DESTDIR?=/usr
 +PREFIX?=/local
- 
--LDFLAGS	= -L/usr/local/lib
--LDLIBS    = -lwiringPi -lwiringPiDev -lpthread -lm
++
 +INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
 +LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
 +

 
 .PHONY:	depend
diff --git a/wiringPi/Makefile b/wiringPi/Makefile
index e1868b9..e39f75a 100644
--- a/wiringPi/Makefile
+++ b/wiringPi/Makefile
@@ -25,19 +25,23 @@ VERSION=$(shell cat ../VERSION)
 DESTDIR?=/usr
 PREFIX?=/local
 

From ca25788e2563bad0d554deb9f4300d1e7d062825 Mon Sep 17 00:00:00 2001
From: Aurelian Zanoschi <aurelian17@gmail.com>
Date: Mon, 31 Jul 2017 20:25:15 +0300
Subject: [PATCH] Add initial cross compile support

---
 devLib/Makefile             | 54 +++++++++++++++++++++++++--------------------
 examples/Gertboard/Makefile | 22 +++++++++++-------
 examples/Makefile           | 22 +++++++++++-------
 examples/PiFace/Makefile    | 22 +++++++++++-------
 examples/PiGlow/Makefile    |  4 ++--
 examples/q2w/Makefile       |  4 ++--
 gpio/Makefile               | 29 ++++++++++++------------
 wiringPi/Makefile           | 52 ++++++++++++++++++++++++-------------------
 8 files changed, 120 insertions(+), 89 deletions(-)

diff --git a/devLib/Makefile b/devLib/Makefile
index cf665d6..040c03a 100644
