aboutsummaryrefslogtreecommitdiffstats
path: root/package/dmidecode/dmidecode-build-system-fixes.patch
blob: 275f9df7f1760204f71b3487e91eb6b9c4ad3a34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Minor build system fixes

Usual build system fixes to allow CC/CFLAGS/LDFLAGS to be overriden
from the command line, and completed by additional flags from the
Makefile.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Index: b/Makefile
===================================================================
--- a/Makefile
+++ b/Makefile
@@ -12,9 +12,10 @@
 #   (at your option) any later version.
 #
 
-CC      = gcc
-CFLAGS  = -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
-          -Wcast-align -Wwrite-strings -Wmissing-prototypes -Winline -Wundef
+CC      ?= gcc
+override CFLAGS  += \
+	-W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
+        -Wcast-align -Wwrite-strings -Wmissing-prototypes -Winline -Wundef
 #CFLAGS += -DBIGENDIAN
 #CFLAGS += -DALIGNMENT_WORKAROUND
 
@@ -23,7 +24,7 @@
 #CFLAGS += -g
 
 # Pass linker flags here
-LDFLAGS =
+override LDFLAGS +=
 
 DESTDIR =
 prefix  = /usr/local