summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2024-03-11 01:34:22 -0500
committerzachir <zachir@librem.one>2024-03-11 01:34:22 -0500
commit2b135d87f5c1f1f307984f5fd78e151f5ee99dae (patch)
tree6e9e089326ea40badd6dab25a3ed5a7cef61dcbd /Makefile
parent42b5d719a0207a56b482a4e0298d72b628b93fa0 (diff)
Replace build system with zig
Zig is actually handling the building and such, now the Makefile is here just as a wrapper for it.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 4 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 1879a14..1336403 100644
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,8 @@
-C_SRC := main.c
-C_OBJ := main.o
-B_NAM := even
-CC := gcc
-C_FLG := -Os -Wall -Wpedantic -Werror
-O_FLG := ${C_FLG}
+ZIG_ARGS := -Doptimize=ReleaseSmall
-${B_NAM}: ${C_OBJ}
- ${CC} ${O_FLG} -o ${B_NAM} ${C_OBJ}
-
-main.o: main.c main.h
- ${CC} ${C_FLG} -c main.c
+all:
+ zig build ${ZIG_ARGS}
clean:
- rm -f ${B_NAM} ${C_OBJ}
+ rm -rf zig-out/ zig-cache/