patch-devLib_Makefile 839 B

123456789101112131415161718192021222324252627282930
  1. fix upstream Makefile
  2. --- wiringPi-0.1.orig/devLib/Makefile 2014-12-05 14:48:57.000000000 +0100
  3. +++ wiringPi-0.1/devLib/Makefile 2014-12-05 15:35:35.470864970 +0100
  4. @@ -32,9 +32,9 @@ DYNAMIC=libwiringPiDev.so.$(VERSION)
  5. #DEBUG = -g -O0
  6. DEBUG = -O2
  7. -CC = gcc
  8. +CC ?= gcc
  9. INCLUDE = -I.
  10. -CFLAGS = $(DEBUG) -Wformat=2 -Wall $(INCLUDE) -Winline -pipe -fPIC
  11. +CFLAGS ?= -Wformat=2 -Wall $(INCLUDE) -Winline -pipe -fPIC
  12. LIBS =
  13. @@ -59,11 +59,11 @@ $(STATIC): $(OBJ)
  14. $(DYNAMIC): $(OBJ)
  15. @echo "[Link (Dynamic)]"
  16. - @$(CC) -shared -Wl,-soname,libwiringPiDev.so -o libwiringPiDev.so.$(VERSION) -lpthread $(OBJ)
  17. + $(CC) -shared -Wl,-soname,libwiringPiDev.so -o libwiringPiDev.so.$(VERSION) -lpthread $(OBJ)
  18. .c.o:
  19. @echo [Compile] $<
  20. - @$(CC) -c $(CFLAGS) $< -o $@
  21. + $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
  22. .PHONY: clean
  23. clean: