dmidecode-build-system-fixes.patch 969 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. #CFLAGS += -DBIGENDIAN
  21. #CFLAGS += -DALIGNMENT_WORKAROUND
  22. @@ -23,7 +24,7 @@
  23. #CFLAGS += -g
  24. # Pass linker flags here
  25. -LDFLAGS =
  26. +override LDFLAGS +=
  27. DESTDIR =
  28. prefix = /usr/local