From 84fe944adc002bc6e8844e9ac9c292b9d7dd3f92 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Tue, 22 Mar 2022 13:29:10 -0500 Subject: Makefile: explicitly define CC variable The CC variable is already defined by the make program, so use "CC:=" instead of "CC?=". This makes sure the proper cross compiler is in use. Signed-off-by: Danny Holman --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d03990e..6b88f2d 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,20 @@ -CC=i686-elf-gcc INCLUDE?=-Iinclude CFLAGS?=-O2 -ffreestanding -std=gnu11 LDFLAGS?=-nostdlib LIBS?=-lgcc +ARCH?=i386 # -- Do not edit below this line -- +CC:=i686-elf-gcc VERSION:="$(shell git describe --abbrev=4 --dirty --always --tags)" INCLUDE:=$(INCLUDE) CFLAGS:=$(CFLAGS) -Wall -Wextra -DVERSION=\"$(VERSION)\" -ggdb LDFLAGS:=$(LDFLAGS) LIBS:=$(LIBS) +ARCH:=$(ARCH) -ARCHDIR=arch/i386 +ARCHDIR=arch/$(ARCH) include $(ARCHDIR)/make.config -- cgit v1.2.3