[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dmidecode] [PATCH] Allow overriding build settings from the environment
From: |
Jean Delvare |
Subject: |
[dmidecode] [PATCH] Allow overriding build settings from the environment |
Date: |
Mon, 6 Apr 2020 11:38:51 +0200 |
Let packagers pass their own CC, CFLAGS and LDFLAGS settings. The
settings which are specific to dmidecode are appended later so that
they are applied no matter what.
This should fix bug #55805:
https://savannah.nongnu.org/bugs/?55805
Signed-off-by: Jean Delvare <address@hidden>
---
Makefile | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
--- a/Makefile
+++ b/Makefile
@@ -12,8 +12,13 @@
# (at your option) any later version.
#
-CC = gcc
-CFLAGS = -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
+CC ?= gcc
+# Base CFLAGS can be overridden by environment
+CFLAGS ?= -O2
+# When debugging, disable -O2 and enable -g
+#CFLAGS ?= -g
+
+CFLAGS += -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
-Wcast-align -Wwrite-strings -Wmissing-prototypes -Winline -Wundef
# Let lseek and mmap support 64-bit wide offsets
@@ -22,12 +27,8 @@ CFLAGS += -D_FILE_OFFSET_BITS=64
#CFLAGS += -DBIGENDIAN
#CFLAGS += -DALIGNMENT_WORKAROUND
-# When debugging, disable -O2 and enable -g.
-CFLAGS += -O2
-#CFLAGS += -g
-
-# Pass linker flags here
-LDFLAGS =
+# Pass linker flags here (can be set from environment too)
+LDFLAGS ?=
DESTDIR =
prefix = /usr/local
--
Jean Delvare
SUSE L3 Support
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dmidecode] [PATCH] Allow overriding build settings from the environment,
Jean Delvare <=