summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..bcb7224
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+ZIG_DOPTIMIZE := -Doptimize=ReleaseSafe
+ZIG_DTARGET := -Dtarget=native
+ZIG_DCPU := -Dcpu=native
+
+all:
+ zig build ${ZIG_DOPTIMIZE} ${ZIG_DTARGET} ${ZIG_DCPU}
+
+debug:
+ zig build -Doptimize=Debug ${ZIG_DTARGET} ${ZIG_DCPU}
+
+fast:
+ zig build -Doptimize=ReleaseFast ${ZIG_DTARGET} ${ZIG_DCPU}
+
+safe:
+ zig build -Doptimize=ReleaseSafe ${ZIG_DTARGET} ${ZIG_DCPU}
+
+small:
+ zig build -Doptimize=ReleaseSmall ${ZIG_DTARGET} ${ZIG_DCPU}
+
+clean:
+ rm -rf zig-cache/ zig-out/
+
+run:
+ zig build run
+
+install: zig-out/bin/zhttpd
+ install -Dm755 zig-out/bin/zhttpd ~/.local/bin/zhttpd