diff --git a/devLib/Makefile b/devLib/Makefile index cf665d6..7c1a180 100644 --- a/devLib/Makefile +++ b/devLib/Makefile @@ -36,10 +36,10 @@ DYNAMIC=libwiringPiDev.so.$(VERSION) #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 +CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC $(EXTRA_CFLAGS) LIBS = diff --git a/examples/Gertboard/Makefile b/examples/Gertboard/Makefile index 1939ad6..01a3cc3 100644 --- a/examples/Gertboard/Makefile +++ b/examples/Gertboard/Makefile @@ -11,9 +11,9 @@ endif #DEBUG = -g -O0 DEBUG = -O3 -CC = gcc +CC ?= gcc INCLUDE = -I/usr/local/include -CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe +CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) LDFLAGS = -L/usr/local/lib LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm diff --git a/examples/Makefile b/examples/Makefile index 6d87885..5813ca0 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -28,9 +28,9 @@ endif #DEBUG = -g -O0 DEBUG = -O3 -CC = gcc +CC ?= gcc INCLUDE = -I/usr/local/include -CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe +CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) LDFLAGS = -L/usr/local/lib LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm -lcrypt -lrt diff --git a/examples/PiFace/Makefile b/examples/PiFace/Makefile index f937c14..a5c7c72 100644 --- a/examples/PiFace/Makefile +++ b/examples/PiFace/Makefile @@ -28,9 +28,9 @@ endif #DEBUG = -g -O0 DEBUG = -O3 -CC = gcc +CC ?= gcc INCLUDE = -I/usr/local/include -CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe +CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) LDFLAGS = -L/usr/local/lib LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm diff --git a/examples/PiGlow/Makefile b/examples/PiGlow/Makefile index f182db7..10b7bd7 100644 --- a/examples/PiGlow/Makefile +++ b/examples/PiGlow/Makefile @@ -28,9 +28,9 @@ endif #DEBUG = -g -O0 DEBUG = -O3 -CC = gcc +CC ?= gcc INCLUDE = -I/usr/local/include -CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe +CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) LDFLAGS = -L/usr/local/lib LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm diff --git a/examples/q2w/Makefile b/examples/q2w/Makefile index 8f773bf..7dc0e55 100644 --- a/examples/q2w/Makefile +++ b/examples/q2w/Makefile @@ -28,9 +28,9 @@ endif #DEBUG = -g -O0 DEBUG = -O3 -CC = gcc +CC ?= gcc INCLUDE = -I/usr/local/include -CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe +CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) LDFLAGS = -L/usr/local/lib LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm diff --git a/examples/scrollPhat/Makefile b/examples/scrollPhat/Makefile index 2471f69..ac384d8 100644 --- a/examples/scrollPhat/Makefile +++ b/examples/scrollPhat/Makefile @@ -28,9 +28,9 @@ endif #DEBUG = -g -O0 DEBUG = -O3 -CC = gcc +CC ?= gcc INCLUDE = -I/usr/local/include -CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe +CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) LDFLAGS = -L/usr/local/lib LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm diff --git a/gpio/Makefile b/gpio/Makefile index 9ec160d..c0ed359 100644 --- a/gpio/Makefile +++ b/gpio/Makefile @@ -32,9 +32,9 @@ endif #DEBUG = -g -O0 DEBUG = -O2 -CC = gcc +CC ?= gcc INCLUDE = -I$(DESTDIR)$(PREFIX)/include -CFLAGS = $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe +CFLAGS = $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) LDFLAGS = -L$(DESTDIR)$(PREFIX)/lib LIBS = -lwiringPi -lwiringPiDev -lpthread -lrt -lm -lcrypt diff --git a/wiringPi/Makefile b/wiringPi/Makefile index 287fa58..e778f7f 100644 --- a/wiringPi/Makefile +++ b/wiringPi/Makefile @@ -36,10 +36,10 @@ DYNAMIC=libwiringPi.so.$(VERSION) #DEBUG = -g -O0 DEBUG = -O2 -CC = gcc +CC ?= gcc INCLUDE = -I. DEFS = -D_GNU_SOURCE -CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Wextra -Winline $(INCLUDE) -pipe -fPIC +CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Wextra -Winline $(INCLUDE) -pipe -fPIC $(EXTRA_CFLAGS) #CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Wextra -Wconversion -Winline $(INCLUDE) -pipe -fPIC LIBS = -lm -lpthread -lrt -lcrypt diff --git a/wiringPiD/Makefile b/wiringPiD/Makefile index 6b2cc9e..6e1068b 100644 --- a/wiringPiD/Makefile +++ b/wiringPiD/Makefile @@ -31,9 +31,9 @@ endif #DEBUG = -g -O0 DEBUG = -O2 -CC = gcc +CC ?= gcc INCLUDE = -I$(DESTDIR)$(PREFIX)/include -CFLAGS = $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe +CFLAGS = $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) LDFLAGS = -L$(DESTDIR)$(PREFIX)/lib LIBS = -lwiringPi -lwiringPiDev -lpthread -lrt -lm -lcrypt