aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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