0001-build-system-fixes.patch 1008 B

1234567891011121314151617181920212223242526272829303132333435
  1. Minor build system fixes
  2. Usual build system fixes to allow CC/CFLAGS/LDFLAGS to be overriden
  3. from the command line, and completed by additional flags from the
  4. Makefile.
  5. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  6. Index: b/Makefile
  7. ===================================================================
  8. --- a/Makefile
  9. +++ b/Makefile
  10. @@ -12,9 +12,10 @@
  11. # (at your option) any later version.
  12. #
  13. -CC = gcc
  14. -CFLAGS = -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
  15. - -Wcast-align -Wwrite-strings -Wmissing-prototypes -Winline -Wundef
  16. +CC ?= gcc
  17. +override CFLAGS += \
  18. + -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
  19. + -Wcast-align -Wwrite-strings -Wmissing-prototypes -Winline -Wundef
  20. # Let lseek and mmap support 64-bit wide offsets
  21. CFLAGS += -D_FILE_OFFSET_BITS=64
  22. @@ -27,7 +28,7 @@ CFLAGS += -O2
  23. #CFLAGS += -g
  24. # Pass linker flags here
  25. -LDFLAGS =
  26. +override LDFLAGS +=
  27. DESTDIR =
  28. prefix = /usr/local