imgtec-ci20: genimage config/ u-boot env
[openadk.git] / package / wiringPi / patches / patch-wiringPi_Makefile
blob4dac546121666db58c51ba8da31f489948cb0221
1 --- wiringPi-72b2af231be337d45a557ce6ca3ed1eeb6675ffd.orig/wiringPi/Makefile    2015-02-11 09:58:24.000000000 +0100
2 +++ wiringPi-72b2af231be337d45a557ce6ca3ed1eeb6675ffd/wiringPi/Makefile 2015-02-11 13:29:16.820794439 +0100
3 @@ -22,18 +22,18 @@
4  #################################################################################
5  
6  VERSION=$(shell cat ../VERSION)
7 -DESTDIR=/usr
8 -PREFIX=/local
9 +DESTDIR?=
10 +PREFIX=/usr
12  STATIC=libwiringPi.a
13  DYNAMIC=libwiringPi.so.$(VERSION)
15  #DEBUG = -g -O0
16  DEBUG  = -O2
17 -CC     = gcc
18 +CC     ?= gcc
19  INCLUDE        = -I.
20  DEFS   = -D_GNU_SOURCE
21 -CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC
22 +CFLAGS ?= $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -fPIC
24  LIBS    =
26 @@ -83,11 +83,12 @@ $(STATIC):  $(OBJ)
28  $(DYNAMIC):    $(OBJ)
29         @echo "[Link (Dynamic)]"
30 -       @$(CC) -shared -Wl,-soname,libwiringPi.so -o libwiringPi.so.$(VERSION) -lpthread $(OBJ)
31 +       $(CC) -shared -Wl,-soname,libwiringPi.so -o libwiringPi.so.$(VERSION) -lpthread $(OBJ)
32 +       ln -sf libwiringPi.so.$(VERSION) libwiringPi.so
34  .c.o:
35         @echo [Compile] $<
36 -       @$(CC) -c $(CFLAGS) $< -o $@
37 +       $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
40  .PHONY:        clean
41 @@ -110,7 +111,7 @@ install:    $(DYNAMIC)
42         @install -m 0755 -d                                             $(DESTDIR)$(PREFIX)/lib
43         @install -m 0755 libwiringPi.so.$(VERSION)                      $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION)
44         @ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION)       $(DESTDIR)/lib/libwiringPi.so
45 -       @ldconfig
46 +       @ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION)       $(DESTDIR)/lib/libwiringPi.so.2
48  .PHONY:        install-static
49  install-static:        $(STATIC)