summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2022-03-22 13:29:10 -0500
committerDanny Holman <dholman@gymli.org>2022-03-22 13:29:10 -0500
commit84fe944adc002bc6e8844e9ac9c292b9d7dd3f92 (patch)
tree2e92b776eff5698e1036e4b3290488b508d50fd0
parent8cd22309667cf3da9c357e5b7dca43e8b6a2f9c0 (diff)
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 <dholman@gymli.org>
-rw-r--r--Makefile6
1 files 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