blob: be3d9eebdbc9e329653f1fa63e5aad9cde73eee6 [file] [log] [blame]
ErikHH283febe2018-12-20 14:03:41 +01001From 32f3cad3c41161693659a902062fa0c01c0338ed Mon Sep 17 00:00:00 2001
2From: ErikHH <erik.hoogeveen@outlook.com>
3Date: Thu, 20 Dec 2018 15:33:45 +0100
4Subject: [PATCH 1/1] Add initial cross compile support
Patrick Williams8b8bc412016-08-17 15:02:23 -05005
ErikHH283febe2018-12-20 14:03:41 +01006Signed-off-by: ErikHH <erik.hoogeveen@outlook.com>
Patrick Williams8b8bc412016-08-17 15:02:23 -05007---
ErikHH283febe2018-12-20 14:03:41 +01008 devLib/Makefile | 55 +++++++++++++++++++++----------------
9 examples/Gertboard/Makefile | 22 +++++++++------
10 examples/Makefile | 22 +++++++++------
11 examples/PiFace/Makefile | 22 +++++++++------
12 examples/PiGlow/Makefile | 4 +--
13 examples/q2w/Makefile | 4 +--
14 gpio/Makefile | 29 +++++++++----------
15 wiringPi/Makefile | 47 +++++++++++++++++--------------
16 8 files changed, 119 insertions(+), 86 deletions(-)
Patrick Williams8b8bc412016-08-17 15:02:23 -050017
18diff --git a/devLib/Makefile b/devLib/Makefile
ErikHH283febe2018-12-20 14:03:41 +010019index cf665d6..d193a9d 100644
Patrick Williams8b8bc412016-08-17 15:02:23 -050020--- a/devLib/Makefile
21+++ b/devLib/Makefile
ErikHH283febe2018-12-20 14:03:41 +010022@@ -22,6 +22,7 @@
23 #################################################################################
24
25 VERSION=$(shell cat ../VERSION)
26+DYN_VERS_MAJ=$(word 1,$(subst ., ,$(VERSION)))
27 DESTDIR?=/usr
28 PREFIX?=/local
29
30@@ -31,15 +32,19 @@ ifneq ($V,1)
Patrick Williams8b8bc412016-08-17 15:02:23 -050031 Q ?= @
32 endif
33
34-STATIC=libwiringPiDev.a
35-DYNAMIC=libwiringPiDev.so.$(VERSION)
36+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
37+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
38
39-#DEBUG = -g -O0
40-DEBUG = -O2
41-CC = gcc
42-INCLUDE = -I.
43-DEFS = -D_GNU_SOURCE
44-CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC
45+BASE_NAME=libwiringPiDev
46+STATIC=$(BASE_NAME).a
47+DYNAMIC=$(BASE_NAME).so.$(VERSION)
48+
49+#DEBUG ?= -g -O0
50+DEBUG ?= -O2
51+CC ?= gcc
52+INCLUDE ?= -I.
53+DEFS ?= -D_GNU_SOURCE
54+CFLAGS ?= $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC
55
56 LIBS =
57
ErikHH283febe2018-12-20 14:03:41 +010058@@ -68,16 +73,16 @@ $(STATIC): $(OBJ)
Patrick Williams8b8bc412016-08-17 15:02:23 -050059
60 $(DYNAMIC): $(OBJ)
61 $Q echo "[Link (Dynamic)]"
62- $Q $(CC) -shared -Wl,-soname,libwiringPiDev.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPiDev.so.$(VERSION) -lpthread $(OBJ)
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -060063+ $Q $(CC) -shared $(LDFLAGS) -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so -lpthread $(OBJ)
Patrick Williams8b8bc412016-08-17 15:02:23 -050064
65 .c.o:
66 $Q echo [Compile] $<
67- $Q $(CC) -c $(CFLAGS) $< -o $@
68+ $Q $(CC) -c $(CFLAGS) -fPIC $< -o $@
69
70 .PHONY: clean
71 clean:
72 $Q echo "[Clean]"
73- $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPiDev.*
74+ $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak $(BASE_NAME).so* $(BASE_NAME).a
75
76 .PHONY: tags
77 tags: $(SRC)
ErikHH283febe2018-12-20 14:03:41 +010078@@ -88,22 +93,22 @@ tags: $(SRC)
Patrick Williams8b8bc412016-08-17 15:02:23 -050079 .PHONY: install
80 install: $(DYNAMIC)
81 $Q echo "[Install Headers]"
82- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include
83- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
84+ $Q install -m 0755 -d $(INCLUDE_DIR)
85+ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR)
86 $Q echo "[Install Dynamic Lib]"
87- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
88- $Q install -m 0755 libwiringPiDev.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION)
89- $Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION) $(DESTDIR)/lib/libwiringPiDev.so
90- $Q $(LDCONFIG)
91+ $Q install -m 0755 -d $(LIB_DIR)
92+ $Q install -m 0755 $(BASE_NAME).so $(LIB_DIR)/$(DYNAMIC)
93+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so
94+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ)
95
96 .PHONY: install-static
97 install-static: $(STATIC)
98 $Q echo "[Install Headers]"
99- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include
100- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
101+ $Q install -m 0755 -d $(INCLUDE_DIR)
102+ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR)
103 $Q echo "[Install Static Lib]"
104- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
105- $Q install -m 0755 libwiringPiDev.a $(DESTDIR)$(PREFIX)/lib
106+ $Q install -m 0755 -d $(LIB_DIR)
107+ $Q install -m 0755 $(STATIC) $(LIB_DIR)
108
109 .PHONY: install-deb
110 install-deb: $(DYNAMIC)
ErikHH283febe2018-12-20 14:03:41 +0100111@@ -118,9 +123,11 @@ install-deb: $(DYNAMIC)
Patrick Williams8b8bc412016-08-17 15:02:23 -0500112 .PHONY: uninstall
113 uninstall:
114 $Q echo "[UnInstall]"
115- $Q cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS)
116- $Q cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPiDev.*
117- $Q $(LDCONFIG)
118+ $Q cd $(INCLUDE_DIR) && rm -f $(HEADERS)
119+ $Q rm -f $(LIB_DIR)/$(STATIC)
120+ $Q rm -f $(LIB_DIR)/$(DYNAMIC)
121+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so
122+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ)
123
124
125 .PHONY: depend
126diff --git a/examples/Gertboard/Makefile b/examples/Gertboard/Makefile
127index 1939ad6..98d1415 100644
128--- a/examples/Gertboard/Makefile
129+++ b/examples/Gertboard/Makefile
130@@ -9,14 +9,20 @@ ifneq ($V,1)
131 Q ?= @
132 endif
133
134-#DEBUG = -g -O0
135-DEBUG = -O3
136-CC = gcc
137-INCLUDE = -I/usr/local/include
138-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
139-
140-LDFLAGS = -L/usr/local/lib
141-LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
142+DESTDIR?=/usr
143+PREFIX?=/local
144+
145+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
146+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
147+
148+#DEBUG ?= -g -O0
149+DEBUG ?= -O3
150+CC ?= gcc
151+INCLUDE ?= -I$(INCLUDE_DIR)
152+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
153+
154+LDFLAGS ?= -L$(LIB_DIR)
155+LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm
156
157 # Should not alter anything below this line
158 ###############################################################################
159diff --git a/examples/Makefile b/examples/Makefile
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500160index 6d87885..8623816 100644
Patrick Williams8b8bc412016-08-17 15:02:23 -0500161--- a/examples/Makefile
162+++ b/examples/Makefile
163@@ -26,14 +26,20 @@ ifneq ($V,1)
164 Q ?= @
165 endif
166
167-#DEBUG = -g -O0
168-DEBUG = -O3
169-CC = gcc
170-INCLUDE = -I/usr/local/include
171-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
172-
173-LDFLAGS = -L/usr/local/lib
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500174-LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm -lcrypt -lrt
Patrick Williams8b8bc412016-08-17 15:02:23 -0500175+DESTDIR?=/usr
176+PREFIX?=/local
177+
178+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
179+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
180+
181+#DEBUG ?= -g -O0
182+DEBUG ?= -O3
183+CC ?= gcc
184+INCLUDE ?= -I$(INCLUDE_DIR)
185+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
186+
187+LDFLAGS ?= -L$(LIB_DIR)
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500188+LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm -lcrypt -lrt
Patrick Williams8b8bc412016-08-17 15:02:23 -0500189
190 # Should not alter anything below this line
191 ###############################################################################
192diff --git a/examples/PiFace/Makefile b/examples/PiFace/Makefile
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500193index f937c14..ad030b3 100644
Patrick Williams8b8bc412016-08-17 15:02:23 -0500194--- a/examples/PiFace/Makefile
195+++ b/examples/PiFace/Makefile
196@@ -26,14 +26,20 @@ ifneq ($V,1)
197 Q ?= @
198 endif
199
200-#DEBUG = -g -O0
201-DEBUG = -O3
202-CC = gcc
203-INCLUDE = -I/usr/local/include
204-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
205-
206-LDFLAGS = -L/usr/local/lib
207-LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
208+DESTDIR?=/usr
209+PREFIX?=/local
210+
211+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
212+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
213+
214+#DEBUG ?= -g -O0
215+DEBUG ?= -O3
216+CC ?= gcc
217+INCLUDE ?= -I$(INCLUDE_DIR)
218+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
219+
220+LDFLAGS ?= -L$(LIB_DIR)
221+LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm
222
223 # Should not alter anything below this line
224 ###############################################################################
225diff --git a/examples/PiGlow/Makefile b/examples/PiGlow/Makefile
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500226index f182db7..d1ea74f 100644
Patrick Williams8b8bc412016-08-17 15:02:23 -0500227--- a/examples/PiGlow/Makefile
228+++ b/examples/PiGlow/Makefile
229@@ -29,10 +29,10 @@ endif
230 #DEBUG = -g -O0
231 DEBUG = -O3
232 CC = gcc
233-INCLUDE = -I/usr/local/include
234+INCLUDE = -I../wiringPi -I../wiringPiDev
235 CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
236
237-LDFLAGS = -L/usr/local/lib
238+LDFLAGS = -L../wiringPi -L../wiringPiDev
239 LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
240
241 # Should not alter anything below this line
242diff --git a/examples/q2w/Makefile b/examples/q2w/Makefile
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500243index 8f773bf..14aa6e4 100644
Patrick Williams8b8bc412016-08-17 15:02:23 -0500244--- a/examples/q2w/Makefile
245+++ b/examples/q2w/Makefile
246@@ -29,10 +29,10 @@ endif
247 #DEBUG = -g -O0
248 DEBUG = -O3
249 CC = gcc
250-INCLUDE = -I/usr/local/include
251+INCLUDE = -I../wiringPi -I../devLib
252 CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
253
254-LDFLAGS = -L/usr/local/lib
255+LDFLAGS = -L../wiringPi -L../devLib
256 LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
257
258 ###############################################################################
259diff --git a/gpio/Makefile b/gpio/Makefile
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800260index 9ec160d..a294242 100644
Patrick Williams8b8bc412016-08-17 15:02:23 -0500261--- a/gpio/Makefile
262+++ b/gpio/Makefile
263@@ -30,13 +30,17 @@ ifneq ($V,1)
264 Q ?= @
265 endif
266
267-#DEBUG = -g -O0
268-DEBUG = -O2
269-CC = gcc
270-INCLUDE = -I$(DESTDIR)$(PREFIX)/include
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500271-CFLAGS = $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe
Patrick Williams8b8bc412016-08-17 15:02:23 -0500272+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
273+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
274+BIN_DIR?=$(DESTDIR)$(PREFIX)/bin
275
276-LDFLAGS = -L$(DESTDIR)$(PREFIX)/lib
277+#DEBUG ?= -g -O0
278+DEBUG ?= -O2
279+CC ?= gcc
280+INCLUDE ?= -I$(INCLUDE_DIR)
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500281+CFLAGS ?= $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe
Patrick Williams8b8bc412016-08-17 15:02:23 -0500282+
283+LDFLAGS ?= -L$(LIB_DIR)
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500284 LIBS = -lwiringPi -lwiringPiDev -lpthread -lrt -lm -lcrypt
Patrick Williams8b8bc412016-08-17 15:02:23 -0500285
286 # May not need to alter anything below this line
287@@ -72,13 +76,10 @@ tags: $(SRC)
288 .PHONY: install
289 install: gpio
290 $Q echo "[Install]"
291- $Q cp gpio $(DESTDIR)$(PREFIX)/bin
292-ifneq ($(WIRINGPI_SUID),0)
293- $Q chown root.root $(DESTDIR)$(PREFIX)/bin/gpio
294- $Q chmod 4755 $(DESTDIR)$(PREFIX)/bin/gpio
295-endif
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800296- $Q mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
297- $Q cp gpio.1 $(DESTDIR)$(PREFIX)/share/man/man1
Patrick Williams8b8bc412016-08-17 15:02:23 -0500298+ $Q install -d $(BIN_DIR)
299+ $Q install -m 4755 -o root -g root gpio $(BIN_DIR)
300+ $Q install -d $(DESTDIR)$(PREFIX)/share/man/man1
301+ $Q install -m 644 -o root -g root gpio.1 $(DESTDIR)$(PREFIX)/share/man/man1
302
303 .PHONY: install-deb
304 install-deb: gpio
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500305@@ -91,7 +92,7 @@ install-deb: gpio
Patrick Williams8b8bc412016-08-17 15:02:23 -0500306 .PHONY: uninstall
307 uninstall:
308 $Q echo "[UnInstall]"
309- $Q rm -f $(DESTDIR)$(PREFIX)/bin/gpio
310+ $Q rm -f $(BIN_DIR)/gpio
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800311 $Q rm -f $(DESTDIR)$(PREFIX)/share/man/man1/gpio.1
Patrick Williams8b8bc412016-08-17 15:02:23 -0500312
313 .PHONY: depend
314diff --git a/wiringPi/Makefile b/wiringPi/Makefile
ErikHH283febe2018-12-20 14:03:41 +0100315index 287fa58..3423d3f 100644
Patrick Williams8b8bc412016-08-17 15:02:23 -0500316--- a/wiringPi/Makefile
317+++ b/wiringPi/Makefile
ErikHH283febe2018-12-20 14:03:41 +0100318@@ -22,25 +22,30 @@
319 #################################################################################
320
321 VERSION=$(shell cat ../VERSION)
322+DYN_VERS_MAJ=$(word 1,$(subst ., ,$(VERSION)))
Patrick Williams8b8bc412016-08-17 15:02:23 -0500323 DESTDIR?=/usr
324 PREFIX?=/local
325
326+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
327+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
328+
329 LDCONFIG?=ldconfig
330
331 ifneq ($V,1)
332 Q ?= @
333 endif
334
335-STATIC=libwiringPi.a
336-DYNAMIC=libwiringPi.so.$(VERSION)
337+BASE_NAME=libwiringPi
338+STATIC=$(BASE_NAME).a
339+DYNAMIC=$(BASE_NAME).so.$(VERSION)
340
341-#DEBUG = -g -O0
342-DEBUG = -O2
343-CC = gcc
344-INCLUDE = -I.
345+#DEBUG ?= -g -O0
346+DEBUG ?= -O2
347+CC ?= gcc
348+INCLUDE ?= -I.
349 DEFS = -D_GNU_SOURCE
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500350-CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Wextra -Winline $(INCLUDE) -pipe -fPIC
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800351-#CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Wextra -Wconversion -Winline $(INCLUDE) -pipe -fPIC
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500352+CFLAGS = $(DEBUG) $(DEFS) $(INCLUDE) -Wformat=2 -Wall -Wextra -Winline -pipe -fPIC
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800353+#CFLAGS = $(DEBUG) $(DEFS) $(INCLUDE) -Wformat=2 -Wall -Wextra -Wconversion -Winline -pipe -fPIC
Patrick Williams8b8bc412016-08-17 15:02:23 -0500354
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500355 LIBS = -lm -lpthread -lrt -lcrypt
356
ErikHH283febe2018-12-20 14:03:41 +0100357@@ -75,17 +80,17 @@ static:
Patrick Williams8b8bc412016-08-17 15:02:23 -0500358
359 $(DYNAMIC): $(OBJ)
360 $Q echo "[Link (Dynamic)]"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500361- $Q $(CC) -shared -Wl,-soname,libwiringPi.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPi.so.$(VERSION) $(LIBS) $(OBJ)
362+ $Q $(CC) $(LDFLAGS) -shared -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so $(OBJ) $(LIBS)
Patrick Williams8b8bc412016-08-17 15:02:23 -0500363
364 .c.o:
365 $Q echo [Compile] $<
366- $Q $(CC) -c $(CFLAGS) $< -o $@
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500367+ $Q $(CC) $(CFLAGS) $(LIBS) -c $< -o $@
Patrick Williams8b8bc412016-08-17 15:02:23 -0500368
369
370 .PHONY: clean
371 clean:
372 $Q echo "[Clean]"
373- $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPi.*
374+ $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak $(BASE_NAME).so* $(BASE_NAME).a
375
376 .PHONY: tags
377 tags: $(SRC)
ErikHH283febe2018-12-20 14:03:41 +0100378@@ -96,13 +101,13 @@ tags: $(SRC)
Patrick Williams8b8bc412016-08-17 15:02:23 -0500379 .PHONY: install
380 install: $(DYNAMIC)
381 $Q echo "[Install Headers]"
382- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include
383- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
384+ $Q install -m 0755 -d $(INCLUDE_DIR)
385+ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR)
386 $Q echo "[Install Dynamic Lib]"
387- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
388- $Q install -m 0755 libwiringPi.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION)
389- $Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) $(DESTDIR)/lib/libwiringPi.so
390- $Q $(LDCONFIG)
391+ $Q install -m 0755 -d $(LIB_DIR)
392+ $Q install -m 0755 $(BASE_NAME).so $(LIB_DIR)/$(DYNAMIC)
393+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so
394+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ)
395
Patrick Williams8b8bc412016-08-17 15:02:23 -0500396 .PHONY: install-deb
397 install-deb: $(DYNAMIC)
ErikHH283febe2018-12-20 14:03:41 +0100398@@ -117,9 +122,11 @@ install-deb: $(DYNAMIC)
Patrick Williams8b8bc412016-08-17 15:02:23 -0500399 .PHONY: uninstall
400 uninstall:
401 $Q echo "[UnInstall]"
402- $Q cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS)
403- $Q cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPi.*
404- $Q $(LDCONFIG)
405+ $Q cd $(INCLUDE_DIR) && rm -f $(HEADERS)
406+ $Q rm -f $(LIB_DIR)/$(STATIC)
407+ $Q rm -f $(LIB_DIR)/$(DYNAMIC)
408+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so
409+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ)
410
411
412 .PHONY: depend
413--
ErikHH283febe2018-12-20 14:03:41 +01004142.19.1
Patrick Williams8b8bc412016-08-17 15:02:23 -0500415