Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1 | From 223de708552b1ab00ac1a119e82e13deed573036 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sat, 30 Oct 2021 10:22:38 -0700 |
| 4 | Subject: [PATCH] make: Make CC weak assignment |
| 5 | |
| 6 | This ensures that if environment overrrides it then its respected, this |
| 7 | helps cross-compiling cases |
| 8 | |
| 9 | Upstream-Status: Pending |
| 10 | |
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 12 | --- |
| 13 | Makefile | 2 +- |
| 14 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 15 | |
| 16 | --- a/Makefile |
| 17 | +++ b/Makefile |
| 18 | @@ -18,14 +18,14 @@ VERSION-FILE: FORCE |
| 19 | @$(SHELL_PATH) ./GEN-VERSION-FILE |
| 20 | -include VERSION-FILE |
| 21 | |
| 22 | -CFLAGS = -g -O2 -Wall -W -Werror=format-security |
| 23 | -LDFLAGS = |
| 24 | +CFLAGS += -g -O2 -Wall -W -Werror=format-security |
| 25 | +LDFLAGS ?= |
| 26 | IPTRAF_CFLAGS := -std=gnu99 -D_GNU_SOURCE |
| 27 | ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS) $(IPTRAF_CFLAGS) |
| 28 | ALL_LDFLAGS = $(LDFLAGS) |
| 29 | STRIP ?= strip |
| 30 | |
| 31 | -prefix = $(HOME) |
| 32 | +prefix ?= $(HOME) |
| 33 | sbindir_relative = sbin |
| 34 | sbindir = $(prefix)/$(sbindir_relative) |
| 35 | mandir = $(prefix)/share/man |
| 36 | @@ -39,7 +39,7 @@ pathsep = : |
| 37 | |
| 38 | export prefix bindir sharedir sysconfdir gitwebdir localedir |
| 39 | |
| 40 | -CC = cc |
| 41 | +CC ?= cc |
| 42 | RM = rm -f |
| 43 | INSTALL = install |
| 44 | RPMBUILD = rpmbuild |