From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mattias Nilsson <mattias.nilsson@nshift.com>
Date: Mon, 4 Apr 2022 22:05:38 +0200
Subject: [PATCH] Make it possible to override HOSTCC and CC from the
 environment

---
 makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/makefile b/makefile
index 0240e5ec9ffe3699aadd0fce2466466b7ceea614..865d52f5b5f8a1fe58125c058a03523f7e79db12 100644
--- a/makefile
+++ b/makefile
@@ -31,9 +31,9 @@ CFLAGS = -O2
 #CC = cc -Wall -g -Wwrite-strings
 #CC = cc -O4 -Wall -pedantic -fno-strict-aliasing
 #CC = cc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov
-HOSTCC = cc -g -Wall -pedantic -Wcast-qual
+HOSTCC ?= cc -g -Wall -pedantic -Wcast-qual
 # HOSTCC = g++ -g -Wall -pedantic -Wcast-qual
-CC = $(HOSTCC)  # change this is cross-compiling.
+CC ?= $(HOSTCC)  # change this is cross-compiling.
 
 # By fiat, to make our lives easier, yacc is now defined to be bison.
 # If you want something else, you're on your own.
