about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorMel <mel@rnrd.eu>2026-01-27 04:15:32 +0100
committerMel <mel@rnrd.eu>2026-01-27 04:15:32 +0100
commit129e5669015a7ffd78d0f665f46cc434bcf126d2 (patch)
tree97c203070590cf27bba2209c1998bcc546260753 /Makefile
parent38bc2d06fff322a99ba6ba46df69bbd2b40c6173 (diff)
downloadcatskill-main.tar.zst
catskill-main.zip
TinyCC (libtcc) backend for catboot HEAD main
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index bc091f0..046c3c1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,9 @@
 MUSL_LIB ?= /usr/lib/musl
 MUSL_DEV ?= /usr/include/musl
 
-DEFINES ?= -DMUSL_LIB=\"$(MUSL_LIB)\" -DMUSL_DEV=\"$(MUSL_DEV)\"
+DEFINES ?= -DCATBOOT_BACKEND_TCC -DMUSL_LIB=\"$(MUSL_LIB)\" -DMUSL_DEV=\"$(MUSL_DEV)\"
 CFLAGS ?= -std=c99 -Wall -Werror -static -g -O0 $(DEFINES)
+LDFLAGS ?= -ltcc
 
 .DEFAULT_GOAL := all
 
@@ -16,7 +17,7 @@ build/catskill: build $(SOURCES)
 
 build/catboot: build $(BOOTSTRAP_SOURCES) boot/scripts/embed.sh
 	./boot/scripts/embed.sh $(BOOTSTRAP_SOURCES)
-	$(CC) $(CFLAGS) -o ./build/catboot ./build/boot/catboot.c
+	$(CC) $(CFLAGS) -o ./build/catboot ./build/boot/catboot.c $(LDFLAGS)
 
 build/catboot-test: build $(BOOTSTRAP_TEST_SOURCES)
 	$(CC) $(CFLAGS) -o ./build/catboot-test ./boot/tests/test.c