From 3c89b222070342f2fc9cd06b3915f8ab20a49be8 Mon Sep 17 00:00:00 2001 From: Priit Laes Date: Tue, 4 Aug 2026 21:55:28 +0300 Subject: [PATCH] makefile: Use origin check for CC variable Make defines defaults for commonly used variables, therefore we need to check first how the variable was defined. If `default` value was used, override it with our own default. --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2bcb077..0cbc04f 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,9 @@ DEFAULT_CONFIG_LOCATION = 454656 CONFIG_LOCATION = 458752 HTML_LOCATION = 262144 -CC ?= sdcc +ifeq ($(origin CC),default) +CC = sdcc +endif CC_FLAGS = -mmcs51 -I. -Ihttpd -Iuip ASM ?= sdas8051 AFLAGS= -plosgff