diff options
Diffstat (limited to 'patch')
-rw-r--r-- | patch | 550 |
1 files changed, 550 insertions, 0 deletions
@@ -0,0 +1,550 @@ | |||
1 | From 1913375d97caee1279345fbbf776472d769f4c5e Mon Sep 17 00:00:00 2001 | ||
2 | From: Gianfranco Costamagna <gianfranco.costamagna@abinsula.com> | ||
3 | Date: Mon, 12 Oct 2015 12:28:06 +0200 | ||
4 | Subject: [PATCH] =?UTF-8?q?Add=20initial=20cross=20compile=20support=20(re?= | ||
5 | =?UTF-8?q?base=20from=20Petter=20Mab=C3=A4cker=20<petter@technux.se>=20ve?= | ||
6 | =?UTF-8?q?rsion)?= | ||
7 | MIME-Version: 1.0 | ||
8 | Content-Type: text/plain; charset=UTF-8 | ||
9 | Content-Transfer-Encoding: 8bit | ||
10 | |||
11 | --- | ||
12 | .../0001-Add-initial-cross-compile-support.patch | 355 ++++++++++----------- | ||
13 | recipes-devtools/wiringPi/wiringpi_git.bb | 3 +- | ||
14 | 2 files changed, 170 insertions(+), 188 deletions(-) | ||
15 | |||
16 | diff --git a/recipes-devtools/wiringPi/files/0001-Add-initial-cross-compile-support.patch b/recipes-devtools/wiringPi/files/0001-Add-initial-cross-compile-support.patch | ||
17 | index c5ba270..ed47fab 100644 | ||
18 | --- a/recipes-devtools/wiringPi/files/0001-Add-initial-cross-compile-support.patch | ||
19 | +++ b/recipes-devtools/wiringPi/files/0001-Add-initial-cross-compile-support.patch | ||
20 | @@ -1,37 +1,26 @@ | ||
21 | -From b0d82bc7cc90db41aa4f7012bbe3009f0b8ab11d Mon Sep 17 00:00:00 2001 | ||
22 | -From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= <petter@technux.se> | ||
23 | -Date: Sat, 18 Jul 2015 23:20:05 +0200 | ||
24 | -Subject: [PATCH] Add initial cross compile support | ||
25 | -MIME-Version: 1.0 | ||
26 | -Content-Type: text/plain; charset=UTF-8 | ||
27 | -Content-Transfer-Encoding: 8bit | ||
28 | +From 6d85e6cc3ab97c3f060e5e0a8e3f1945a14c86ba Mon Sep 17 00:00:00 2001 | ||
29 | +From: Gianfranco Costamagna <gianfranco.costamagna@abinsula.com> | ||
30 | +Date: Mon, 12 Oct 2015 12:15:51 +0200 | ||
31 | +Subject: [PATCH] Add initial cross compile support (rebase from Petter Mabäcker <petter@technux.se> version) | ||
32 | |||
33 | -Upstream-Status: Pending | ||
34 | - | ||
35 | -Signed-off-by: Petter Mabäcker <petter@technux.se> | ||
36 | --- | ||
37 | - devLib/Makefile | 58 +++++++++++++++++++++++++-------------------- | ||
38 | - examples/Gertboard/Makefile | 22 ++++++++++------- | ||
39 | - examples/Makefile | 19 +++++++++------ | ||
40 | - examples/PiFace/Makefile | 22 ++++++++++------- | ||
41 | - examples/PiGlow/Makefile | 4 ++-- | ||
42 | - examples/q2w/Makefile | 5 ++-- | ||
43 | - gpio/Makefile | 31 +++++++++++++----------- | ||
44 | - wiringPi/Makefile | 56 ++++++++++++++++++++++++------------------- | ||
45 | - 8 files changed, 124 insertions(+), 93 deletions(-) | ||
46 | + devLib/Makefile | 54 ++++++++++++++++++++++++------------------- | ||
47 | + examples/Gertboard/Makefile | 22 +++++++++++------- | ||
48 | + examples/Makefile | 22 +++++++++++------- | ||
49 | + examples/PiFace/Makefile | 22 +++++++++++------- | ||
50 | + examples/PiGlow/Makefile | 4 ++-- | ||
51 | + examples/q2w/Makefile | 4 ++-- | ||
52 | + gpio/Makefile | 29 ++++++++++++----------- | ||
53 | + wiringPi/Makefile | 50 +++++++++++++++++++++------------------ | ||
54 | + 8 files changed, 119 insertions(+), 88 deletions(-) | ||
55 | |||
56 | diff --git a/devLib/Makefile b/devLib/Makefile | ||
57 | -index d62b532..c7c7884 100644 | ||
58 | +index 0fb0033..cbea759 100644 | ||
59 | --- a/devLib/Makefile | ||
60 | +++ b/devLib/Makefile | ||
61 | -@@ -22,18 +22,22 @@ | ||
62 | - ################################################################################# | ||
63 | - | ||
64 | - VERSION=$(shell cat ../VERSION) | ||
65 | --DESTDIR=/usr | ||
66 | --PREFIX=/local | ||
67 | -+DESTDIR?=/usr | ||
68 | -+PREFIX?=/local | ||
69 | +@@ -31,15 +31,19 @@ ifneq ($V,1) | ||
70 | + Q ?= @ | ||
71 | + endif | ||
72 | |||
73 | -STATIC=libwiringPiDev.a | ||
74 | -DYNAMIC=libwiringPiDev.so.$(VERSION) | ||
75 | @@ -48,7 +37,7 @@ index d62b532..c7c7884 100644 | ||
76 | +STATIC=$(BASE_NAME).a | ||
77 | +DYNAMIC=$(BASE_NAME).so.$(VERSION) | ||
78 | + | ||
79 | -+#DEBUG ?= -g -O0 | ||
80 | ++#DEBUG ?= -g -O0 | ||
81 | +DEBUG ?= -O2 | ||
82 | +CC ?= gcc | ||
83 | +INCLUDE ?= -I. | ||
84 | @@ -57,81 +46,81 @@ index d62b532..c7c7884 100644 | ||
85 | |||
86 | LIBS = | ||
87 | |||
88 | -@@ -60,16 +64,16 @@ $(STATIC): $(OBJ) | ||
89 | +@@ -66,16 +70,16 @@ $(STATIC): $(OBJ) | ||
90 | |||
91 | $(DYNAMIC): $(OBJ) | ||
92 | - @echo "[Link (Dynamic)]" | ||
93 | -- @$(CC) -shared -Wl,-soname,libwiringPiDev.so -o libwiringPiDev.so.$(VERSION) -lpthread $(OBJ) | ||
94 | -+ @$(CC) -shared -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so -lpthread $(OBJ) | ||
95 | + $Q echo "[Link (Dynamic)]" | ||
96 | +- $Q $(CC) -shared -Wl,-soname,libwiringPiDev.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPiDev.so.$(VERSION) -lpthread $(OBJ) | ||
97 | ++ $Q $(CC) -shared -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so -lpthread $(OBJ) | ||
98 | |||
99 | .c.o: | ||
100 | - @echo [Compile] $< | ||
101 | -- @$(CC) -c $(CFLAGS) $< -o $@ | ||
102 | -+ @$(CC) -c $(CFLAGS) -fPIC $< -o $@ | ||
103 | + $Q echo [Compile] $< | ||
104 | +- $Q $(CC) -c $(CFLAGS) $< -o $@ | ||
105 | ++ $Q $(CC) -c $(CFLAGS) -fPIC $< -o $@ | ||
106 | |||
107 | .PHONY: clean | ||
108 | clean: | ||
109 | - @echo "[Clean]" | ||
110 | -- @rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPiDev.* | ||
111 | -+ @rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak $(BASE_NAME).so* $(BASE_NAME).a | ||
112 | + $Q echo "[Clean]" | ||
113 | +- $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPiDev.* | ||
114 | ++ $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak $(BASE_NAME).so* $(BASE_NAME).a | ||
115 | |||
116 | .PHONY: tags | ||
117 | tags: $(SRC) | ||
118 | -@@ -80,22 +84,22 @@ tags: $(SRC) | ||
119 | +@@ -86,22 +90,22 @@ tags: $(SRC) | ||
120 | .PHONY: install | ||
121 | install: $(DYNAMIC) | ||
122 | - @echo "[Install Headers]" | ||
123 | -- @install -m 0755 -d $(DESTDIR)$(PREFIX)/include | ||
124 | -- @install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include | ||
125 | -+ @install -m 0755 -d $(INCLUDE_DIR) | ||
126 | -+ @install -m 0644 $(HEADERS) $(INCLUDE_DIR) | ||
127 | - @echo "[Install Dynamic Lib]" | ||
128 | -- @install -m 0755 -d $(DESTDIR)$(PREFIX)/lib | ||
129 | -- @install -m 0755 libwiringPiDev.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION) | ||
130 | -- @ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION) $(DESTDIR)/lib/libwiringPiDev.so | ||
131 | -- @ldconfig | ||
132 | -+ @install -m 0755 -d $(LIB_DIR) | ||
133 | -+ @install -m 0755 $(BASE_NAME).so $(LIB_DIR)/$(DYNAMIC) | ||
134 | -+ @ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so | ||
135 | -+ @ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) | ||
136 | + $Q echo "[Install Headers]" | ||
137 | +- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include | ||
138 | +- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include | ||
139 | ++ $Q install -m 0755 -d $(INCLUDE_DIR) | ||
140 | ++ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR) | ||
141 | + $Q echo "[Install Dynamic Lib]" | ||
142 | +- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib | ||
143 | +- $Q install -m 0755 libwiringPiDev.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION) | ||
144 | +- $Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION) $(DESTDIR)/lib/libwiringPiDev.so | ||
145 | +- $Q $(LDCONFIG) | ||
146 | ++ $Q install -m 0755 -d $(LIB_DIR) | ||
147 | ++ $Q install -m 0755 $(BASE_NAME).so $(LIB_DIR)/$(DYNAMIC) | ||
148 | ++ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so | ||
149 | ++ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) | ||
150 | |||
151 | .PHONY: install-static | ||
152 | install-static: $(STATIC) | ||
153 | - @echo "[Install Headers]" | ||
154 | -- @install -m 0755 -d $(DESTDIR)$(PREFIX)/include | ||
155 | -- @install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include | ||
156 | -+ @install -m 0755 -d $(INCLUDE_DIR) | ||
157 | -+ @install -m 0644 $(HEADERS) $(INCLUDE_DIR) | ||
158 | - @echo "[Install Static Lib]" | ||
159 | -- @install -m 0755 -d $(DESTDIR)$(PREFIX)/lib | ||
160 | -- @install -m 0755 libwiringPiDev.a $(DESTDIR)$(PREFIX)/lib | ||
161 | -+ @install -m 0755 -d $(LIB_DIR) | ||
162 | -+ @install -m 0644 $(STATIC) $(LIB_DIR) | ||
163 | + $Q echo "[Install Headers]" | ||
164 | +- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include | ||
165 | +- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include | ||
166 | ++ $Q install -m 0755 -d $(INCLUDE_DIR) | ||
167 | ++ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR) | ||
168 | + $Q echo "[Install Static Lib]" | ||
169 | +- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib | ||
170 | +- $Q install -m 0755 libwiringPiDev.a $(DESTDIR)$(PREFIX)/lib | ||
171 | ++ $Q install -m 0755 -d $(LIB_DIR) | ||
172 | ++ $Q install -m 0755 $(STATIC) $(LIB_DIR) | ||
173 | |||
174 | .PHONY: install-deb | ||
175 | install-deb: $(DYNAMIC) | ||
176 | -@@ -110,9 +114,11 @@ install-deb: $(DYNAMIC) | ||
177 | +@@ -116,9 +120,11 @@ install-deb: $(DYNAMIC) | ||
178 | .PHONY: uninstall | ||
179 | uninstall: | ||
180 | - @echo "[UnInstall]" | ||
181 | -- @cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS) | ||
182 | -- @cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPiDev.* | ||
183 | -- @ldconfig | ||
184 | -+ @cd $(INCLUDE_DIR) && rm -f $(HEADERS) | ||
185 | -+ @rm -f $(LIB_DIR)/$(STATIC) | ||
186 | -+ @rm -f $(LIB_DIR)/$(DYNAMIC) | ||
187 | -+ @rm -f $(LIB_DIR)/$(BASE_NAME).so | ||
188 | -+ @rm -f $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) | ||
189 | + $Q echo "[UnInstall]" | ||
190 | +- $Q cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS) | ||
191 | +- $Q cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPiDev.* | ||
192 | +- $Q $(LDCONFIG) | ||
193 | ++ $Q cd $(INCLUDE_DIR) && rm -f $(HEADERS) | ||
194 | ++ $Q rm -f $(LIB_DIR)/$(STATIC) | ||
195 | ++ $Q rm -f $(LIB_DIR)/$(DYNAMIC) | ||
196 | ++ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so | ||
197 | ++ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) | ||
198 | |||
199 | |||
200 | .PHONY: depend | ||
201 | diff --git a/examples/Gertboard/Makefile b/examples/Gertboard/Makefile | ||
202 | -index 7569261..b0c32e0 100644 | ||
203 | +index 1939ad6..98d1415 100644 | ||
204 | --- a/examples/Gertboard/Makefile | ||
205 | +++ b/examples/Gertboard/Makefile | ||
206 | -@@ -5,14 +5,20 @@ | ||
207 | - # Copyright (c) 2013 Gordon Henderson | ||
208 | - ################################################################################# | ||
209 | +@@ -9,14 +9,20 @@ ifneq ($V,1) | ||
210 | + Q ?= @ | ||
211 | + endif | ||
212 | |||
213 | -#DEBUG = -g -O0 | ||
214 | -DEBUG = -O3 | ||
215 | @@ -159,26 +148,27 @@ index 7569261..b0c32e0 100644 | ||
216 | # Should not alter anything below this line | ||
217 | ############################################################################### | ||
218 | diff --git a/examples/Makefile b/examples/Makefile | ||
219 | -index c9967dc..c2f8b9d 100644 | ||
220 | +index e6b9b71..931b167 100644 | ||
221 | --- a/examples/Makefile | ||
222 | +++ b/examples/Makefile | ||
223 | -@@ -22,15 +22,20 @@ | ||
224 | - # along with wiringPi. If not, see <http://www.gnu.org/licenses/>. | ||
225 | - ################################################################################# | ||
226 | - | ||
227 | -+DESTDIR?=/usr | ||
228 | -+PREFIX?=/local | ||
229 | +@@ -26,14 +26,20 @@ ifneq ($V,1) | ||
230 | + Q ?= @ | ||
231 | + endif | ||
232 | |||
233 | -#DEBUG = -g -O0 | ||
234 | -DEBUG = -O3 | ||
235 | -CC = gcc | ||
236 | -INCLUDE = -I/usr/local/include | ||
237 | -CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe | ||
238 | -+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include | ||
239 | -+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib | ||
240 | - | ||
241 | +- | ||
242 | -LDFLAGS = -L/usr/local/lib | ||
243 | -LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm | ||
244 | ++DESTDIR?=/usr | ||
245 | ++PREFIX?=/local | ||
246 | ++ | ||
247 | ++INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include | ||
248 | ++LIB_DIR?=$(DESTDIR)$(PREFIX)/lib | ||
249 | ++ | ||
250 | +#DEBUG ?= -g -O0 | ||
251 | +DEBUG ?= -O3 | ||
252 | +CC ?= gcc | ||
253 | @@ -191,12 +181,12 @@ index c9967dc..c2f8b9d 100644 | ||
254 | # Should not alter anything below this line | ||
255 | ############################################################################### | ||
256 | diff --git a/examples/PiFace/Makefile b/examples/PiFace/Makefile | ||
257 | -index 0bde334..fc14c0c 100644 | ||
258 | +index 4685adc..cfaf902 100644 | ||
259 | --- a/examples/PiFace/Makefile | ||
260 | +++ b/examples/PiFace/Makefile | ||
261 | -@@ -23,14 +23,20 @@ | ||
262 | - ################################################################################# | ||
263 | - | ||
264 | +@@ -26,14 +26,20 @@ ifneq ($V,1) | ||
265 | + Q ?= @ | ||
266 | + endif | ||
267 | |||
268 | -#DEBUG = -g -O0 | ||
269 | -DEBUG = -O3 | ||
270 | @@ -224,10 +214,10 @@ index 0bde334..fc14c0c 100644 | ||
271 | # Should not alter anything below this line | ||
272 | ############################################################################### | ||
273 | diff --git a/examples/PiGlow/Makefile b/examples/PiGlow/Makefile | ||
274 | -index 8d31141..482c9e7 100644 | ||
275 | +index acd4818..dabd64e 100644 | ||
276 | --- a/examples/PiGlow/Makefile | ||
277 | +++ b/examples/PiGlow/Makefile | ||
278 | -@@ -26,10 +26,10 @@ | ||
279 | +@@ -29,10 +29,10 @@ endif | ||
280 | #DEBUG = -g -O0 | ||
281 | DEBUG = -O3 | ||
282 | CC = gcc | ||
283 | @@ -241,14 +231,10 @@ index 8d31141..482c9e7 100644 | ||
284 | |||
285 | # Should not alter anything below this line | ||
286 | diff --git a/examples/q2w/Makefile b/examples/q2w/Makefile | ||
287 | -index 150c825..0544aa3 100644 | ||
288 | +index 6f50fa0..c5e9f6e 100644 | ||
289 | --- a/examples/q2w/Makefile | ||
290 | +++ b/examples/q2w/Makefile | ||
291 | -@@ -22,14 +22,13 @@ | ||
292 | - # along with wiringPi. If not, see <http://www.gnu.org/licenses/>. | ||
293 | - ################################################################################# | ||
294 | - | ||
295 | -- | ||
296 | +@@ -29,10 +29,10 @@ endif | ||
297 | #DEBUG = -g -O0 | ||
298 | DEBUG = -O3 | ||
299 | CC = gcc | ||
300 | @@ -262,17 +248,12 @@ index 150c825..0544aa3 100644 | ||
301 | |||
302 | ############################################################################### | ||
303 | diff --git a/gpio/Makefile b/gpio/Makefile | ||
304 | -index 449986e..95af1ad 100644 | ||
305 | +index 7dcd090..83ec454 100644 | ||
306 | --- a/gpio/Makefile | ||
307 | +++ b/gpio/Makefile | ||
308 | -@@ -23,16 +23,20 @@ | ||
309 | - # along with wiringPi. If not, see <http://www.gnu.org/licenses/>. | ||
310 | - ################################################################################# | ||
311 | - | ||
312 | --DESTDIR=/usr | ||
313 | --PREFIX=/local | ||
314 | -+DESTDIR?=/usr | ||
315 | -+PREFIX?=/local | ||
316 | +@@ -30,13 +30,17 @@ ifneq ($V,1) | ||
317 | + Q ?= @ | ||
318 | + endif | ||
319 | |||
320 | -#DEBUG = -g -O0 | ||
321 | -DEBUG = -O2 | ||
322 | @@ -290,49 +271,53 @@ index 449986e..95af1ad 100644 | ||
323 | +INCLUDE ?= -I$(INCLUDE_DIR) | ||
324 | +CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe | ||
325 | + | ||
326 | -+LDFLAGS = -L$(LIB_DIR) | ||
327 | - LIBS = -lwiringPi -lwiringPiDev -lpthread -lm | ||
328 | ++LDFLAGS ?= -L$(LIB_DIR) | ||
329 | + LIBS = -lwiringPi -lwiringPiDev -lpthread | ||
330 | |||
331 | # May not need to alter anything below this line | ||
332 | -@@ -68,11 +72,10 @@ tags: $(SRC) | ||
333 | +@@ -72,13 +76,10 @@ tags: $(SRC) | ||
334 | .PHONY: install | ||
335 | install: gpio | ||
336 | - @echo "[Install]" | ||
337 | -- @cp gpio $(DESTDIR)$(PREFIX)/bin | ||
338 | -- @chown root.root $(DESTDIR)$(PREFIX)/bin/gpio | ||
339 | -- @chmod 4755 $(DESTDIR)$(PREFIX)/bin/gpio | ||
340 | -- @mkdir -p $(DESTDIR)$(PREFIX)/man/man1 | ||
341 | -- @cp gpio.1 $(DESTDIR)$(PREFIX)/man/man1 | ||
342 | -+ @install -d $(BIN_DIR) | ||
343 | -+ @install -m 4755 -o root -g root gpio $(BIN_DIR) | ||
344 | -+ @install -d $(DESTDIR)$(PREFIX)/share/man/man1 | ||
345 | -+ @install -m 644 -o root -g root gpio.1 $(DESTDIR)$(PREFIX)/share/man/man1 | ||
346 | + $Q echo "[Install]" | ||
347 | +- $Q cp gpio $(DESTDIR)$(PREFIX)/bin | ||
348 | +-ifneq ($(WIRINGPI_SUID),0) | ||
349 | +- $Q chown root.root $(DESTDIR)$(PREFIX)/bin/gpio | ||
350 | +- $Q chmod 4755 $(DESTDIR)$(PREFIX)/bin/gpio | ||
351 | +-endif | ||
352 | +- $Q mkdir -p $(DESTDIR)$(PREFIX)/man/man1 | ||
353 | +- $Q cp gpio.1 $(DESTDIR)$(PREFIX)/man/man1 | ||
354 | ++ $Q install -d $(BIN_DIR) | ||
355 | ++ $Q install -m 4755 -o root -g root gpio $(BIN_DIR) | ||
356 | ++ $Q install -d $(DESTDIR)$(PREFIX)/share/man/man1 | ||
357 | ++ $Q install -m 644 -o root -g root gpio.1 $(DESTDIR)$(PREFIX)/share/man/man1 | ||
358 | |||
359 | .PHONY: install-deb | ||
360 | install-deb: gpio | ||
361 | -@@ -83,7 +86,7 @@ install-deb: gpio | ||
362 | +@@ -89,7 +90,7 @@ install-deb: gpio | ||
363 | .PHONY: uninstall | ||
364 | uninstall: | ||
365 | - @echo "[UnInstall]" | ||
366 | -- @rm -f $(DESTDIR)$(PREFIX)/bin/gpio | ||
367 | -+ @rm -f $(BIN_DIR)/gpio | ||
368 | - @rm -f $(DESTDIR)$(PREFIX)/man/man1/gpio.1 | ||
369 | + $Q echo "[UnInstall]" | ||
370 | +- $Q rm -f $(DESTDIR)$(PREFIX)/bin/gpio | ||
371 | ++ $Q rm -f $(BIN_DIR)/gpio | ||
372 | + $Q rm -f $(DESTDIR)$(PREFIX)/man/man1/gpio.1 | ||
373 | |||
374 | .PHONY: depend | ||
375 | diff --git a/wiringPi/Makefile b/wiringPi/Makefile | ||
376 | -index 015a894..5fc0659 100644 | ||
377 | +index 6bbcc5d..5355b74 100644 | ||
378 | --- a/wiringPi/Makefile | ||
379 | +++ b/wiringPi/Makefile | ||
380 | -@@ -22,18 +22,22 @@ | ||
381 | - ################################################################################# | ||
382 | +@@ -25,19 +25,23 @@ VERSION=$(shell cat ../VERSION) | ||
383 | + DESTDIR?=/usr | ||
384 | + PREFIX?=/local | ||
385 | |||
386 | - VERSION=$(shell cat ../VERSION) | ||
387 | --DESTDIR=/usr | ||
388 | --PREFIX=/local | ||
389 | -+DESTDIR?=/usr | ||
390 | -+PREFIX?=/local | ||
391 | +INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include | ||
392 | +LIB_DIR?=$(DESTDIR)$(PREFIX)/lib | ||
393 | ++ | ||
394 | + LDCONFIG?=ldconfig | ||
395 | + | ||
396 | + ifneq ($V,1) | ||
397 | + Q ?= @ | ||
398 | + endif | ||
399 | |||
400 | -STATIC=libwiringPi.a | ||
401 | -DYNAMIC=libwiringPi.so.$(VERSION) | ||
402 | @@ -344,86 +329,82 @@ index 015a894..5fc0659 100644 | ||
403 | -DEBUG = -O2 | ||
404 | -CC = gcc | ||
405 | -INCLUDE = -I. | ||
406 | --DEFS = -D_GNU_SOURCE | ||
407 | +#DEBUG ?= -g -O0 | ||
408 | - CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC | ||
409 | +DEBUG ?= -O2 | ||
410 | +CC ?= gcc | ||
411 | -+DEFS = -D_GNU_SOURCE | ||
412 | +INCLUDE ?= -I. | ||
413 | -+CFLAGS ?= $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC | ||
414 | - | ||
415 | - LIBS = | ||
416 | + DEFS = -D_GNU_SOURCE | ||
417 | + CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC | ||
418 | |||
419 | -@@ -83,17 +87,17 @@ $(STATIC): $(OBJ) | ||
420 | +@@ -89,17 +93,17 @@ $(STATIC): $(OBJ) | ||
421 | |||
422 | $(DYNAMIC): $(OBJ) | ||
423 | - @echo "[Link (Dynamic)]" | ||
424 | -- @$(CC) -shared -Wl,-soname,libwiringPi.so -o libwiringPi.so.$(VERSION) -lpthread $(OBJ) | ||
425 | -+ @$(CC) -shared -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so -lpthread $(OBJ) | ||
426 | + $Q echo "[Link (Dynamic)]" | ||
427 | +- $Q $(CC) -shared -Wl,-soname,libwiringPi.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPi.so.$(VERSION) -lpthread $(OBJ) | ||
428 | ++ $Q $(CC) -shared -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so -lpthread $(OBJ) | ||
429 | |||
430 | .c.o: | ||
431 | - @echo [Compile] $< | ||
432 | -- @$(CC) -c $(CFLAGS) $< -o $@ | ||
433 | -+ @$(CC) -c $(CFLAGS) -fPIC $< -o $@ | ||
434 | + $Q echo [Compile] $< | ||
435 | +- $Q $(CC) -c $(CFLAGS) $< -o $@ | ||
436 | ++ $Q $(CC) -c $(CFLAGS) -fPIC $< -o $@ | ||
437 | |||
438 | |||
439 | .PHONY: clean | ||
440 | clean: | ||
441 | - @echo "[Clean]" | ||
442 | -- @rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPi.* | ||
443 | -+ @rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak $(BASE_NAME).so* $(BASE_NAME).a | ||
444 | + $Q echo "[Clean]" | ||
445 | +- $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPi.* | ||
446 | ++ $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak $(BASE_NAME).so* $(BASE_NAME).a | ||
447 | |||
448 | .PHONY: tags | ||
449 | tags: $(SRC) | ||
450 | -@@ -104,22 +108,22 @@ tags: $(SRC) | ||
451 | +@@ -110,22 +114,22 @@ tags: $(SRC) | ||
452 | .PHONY: install | ||
453 | install: $(DYNAMIC) | ||
454 | - @echo "[Install Headers]" | ||
455 | -- @install -m 0755 -d $(DESTDIR)$(PREFIX)/include | ||
456 | -- @install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include | ||
457 | -+ @install -m 0755 -d $(INCLUDE_DIR) | ||
458 | -+ @install -m 0644 $(HEADERS) $(INCLUDE_DIR) | ||
459 | - @echo "[Install Dynamic Lib]" | ||
460 | -- @install -m 0755 -d $(DESTDIR)$(PREFIX)/lib | ||
461 | -- @install -m 0755 libwiringPi.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) | ||
462 | -- @ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) $(DESTDIR)/lib/libwiringPi.so | ||
463 | -- @ldconfig | ||
464 | -+ @install -m 0755 -d $(LIB_DIR) | ||
465 | -+ @install -m 0755 $(BASE_NAME).so $(LIB_DIR)/$(DYNAMIC) | ||
466 | -+ @ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so | ||
467 | -+ @ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) | ||
468 | + $Q echo "[Install Headers]" | ||
469 | +- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include | ||
470 | +- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include | ||
471 | ++ $Q install -m 0755 -d $(INCLUDE_DIR) | ||
472 | ++ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR) | ||
473 | + $Q echo "[Install Dynamic Lib]" | ||
474 | +- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib | ||
475 | +- $Q install -m 0755 libwiringPi.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) | ||
476 | +- $Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) $(DESTDIR)/lib/libwiringPi.so | ||
477 | +- $Q $(LDCONFIG) | ||
478 | ++ $Q install -m 0755 -d $(LIB_DIR) | ||
479 | ++ $Q install -m 0755 $(BASE_NAME).so $(LIB_DIR)/$(DYNAMIC) | ||
480 | ++ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so | ||
481 | ++ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) | ||
482 | |||
483 | .PHONY: install-static | ||
484 | install-static: $(STATIC) | ||
485 | - @echo "[Install Headers]" | ||
486 | -- @install -m 0755 -d $(DESTDIR)$(PREFIX)/include | ||
487 | -- @install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include | ||
488 | -+ @install -m 0755 -d $(INCLUDE_DIR) | ||
489 | -+ @install -m 0644 $(HEADERS) $(INCLUDE_DIR) | ||
490 | - @echo "[Install Static Lib]" | ||
491 | -- @install -m 0755 -d $(DESTDIR)$(PREFIX)/lib | ||
492 | -- @install -m 0755 libwiringPi.a $(DESTDIR)$(PREFIX)/lib | ||
493 | -+ @install -m 0755 -d $(LIB_DIR) | ||
494 | -+ @install -m 0644 $(STATIC) $(LIB_DIR) | ||
495 | + $Q echo "[Install Headers]" | ||
496 | +- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include | ||
497 | +- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include | ||
498 | ++ $Q install -m 0755 -d $(INCLUDE_DIR) | ||
499 | ++ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR) | ||
500 | + $Q echo "[Install Static Lib]" | ||
501 | +- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib | ||
502 | +- $Q install -m 0755 libwiringPi.a $(DESTDIR)$(PREFIX)/lib | ||
503 | ++ $Q install -m 0755 -d $(LIB_DIR) | ||
504 | ++ $Q install -m 0755 $(STATIC) $(LIB_DIR) | ||
505 | |||
506 | .PHONY: install-deb | ||
507 | install-deb: $(DYNAMIC) | ||
508 | -@@ -134,9 +138,11 @@ install-deb: $(DYNAMIC) | ||
509 | +@@ -140,9 +144,11 @@ install-deb: $(DYNAMIC) | ||
510 | .PHONY: uninstall | ||
511 | uninstall: | ||
512 | - @echo "[UnInstall]" | ||
513 | -- @cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS) | ||
514 | -- @cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPi.* | ||
515 | -- @ldconfig | ||
516 | -+ @cd $(INCLUDE_DIR) && rm -f $(HEADERS) | ||
517 | -+ @rm -f $(LIB_DIR)/$(STATIC) | ||
518 | -+ @rm -f $(LIB_DIR)/$(DYNAMIC) | ||
519 | -+ @rm -f $(LIB_DIR)/$(BASE_NAME).so | ||
520 | -+ @rm -f $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) | ||
521 | + $Q echo "[UnInstall]" | ||
522 | +- $Q cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS) | ||
523 | +- $Q cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPi.* | ||
524 | +- $Q $(LDCONFIG) | ||
525 | ++ $Q cd $(INCLUDE_DIR) && rm -f $(HEADERS) | ||
526 | ++ $Q rm -f $(LIB_DIR)/$(STATIC) | ||
527 | ++ $Q rm -f $(LIB_DIR)/$(DYNAMIC) | ||
528 | ++ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so | ||
529 | ++ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) | ||
530 | |||
531 | |||
532 | .PHONY: depend | ||
533 | -- | ||
534 | -1.9.1 | ||
535 | +2.1.4 | ||
536 | |||
537 | diff --git a/recipes-devtools/wiringPi/wiringpi_git.bb b/recipes-devtools/wiringPi/wiringpi_git.bb | ||
538 | index 21b5294..4254a0a 100644 | ||
539 | --- a/recipes-devtools/wiringPi/wiringpi_git.bb | ||
540 | +++ b/recipes-devtools/wiringPi/wiringpi_git.bb | ||
541 | @@ -4,7 +4,8 @@ SECTION = "devel/libs" | ||
542 | LICENSE = "LGPLv3+" | ||
543 | LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02" | ||
544 | |||
545 | -SRCREV = "5edd177112c99416f68ba3e8c6c4db6ed942e796" | ||
546 | +# tag 2.29 | ||
547 | +SRCREV = "d79506694d7ba1c3da865d095238289d6175057d" | ||
548 | |||
549 | S = "${WORKDIR}/git" | ||
550 | \ No newline at end of file | ||