summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorZuhaitz <zuhaitz.zechhub@gmail.com>2026-01-12 15:59:15 +0000
committerGitHub <noreply@github.com>2026-01-12 15:59:15 +0000
commit06381baa771238282d64c58aef9c3f7734799b6d (patch)
treecb489c22ae02c39da720836cb3588cf3edc21778 /Makefile
parent9a54f2f52fdaf9364b0f757f5cdcbf09de230919 (diff)
parent19fa2f2d880a693af2dd6346b120bb88e615f4e5 (diff)
Merge pull request #2 from binoculars/feat/zig
feat: add zig compiler support
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a4dfccd..0b62685 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,7 @@
-
+# Compiler configuration
+# Default: gcc
+# To build with clang: make CC=clang
+# To build with zig: make CC="zig cc"
CC = gcc
CFLAGS = -Wall -Wextra -g -I./src -I./src/ast -I./src/parser -I./src/codegen -I./plugins -I./src/zen -I./src/utils -I./src/lexer -I./src/analysis -I./src/lsp
TARGET = zc
@@ -78,4 +81,11 @@ clean:
test: $(TARGET)
./tests/run_tests.sh
-.PHONY: all clean install uninstall test
+# Build with alternative compilers
+zig:
+ $(MAKE) CC="zig cc"
+
+clang:
+ $(MAKE) CC=clang
+
+.PHONY: all clean install uninstall test zig clang