Makefile: tcpd, zig links against libc.

master
Philippe Pittoli 2023-01-11 16:04:16 +01:00
parent 1e3c1b2625
commit 58320cbb46
1 changed files with 6 additions and 1 deletions

View File

@ -2,7 +2,9 @@ all:
ZIGMAKEDOC = -femit-docs -fno-emit-bin
ZIGOPTIM ?= Debug
ZIGBUSEOPTS ?= -O$(ZIGOPTIM) -freference-trace
# Linking against libc is almost mandatory, C allocator is used
# for switching (default reception and emission functions).
ZIGBUSEOPTS ?= -O$(ZIGOPTIM) -freference-trace -lc
ZIGUSROPTS ?=
ZIGC ?= zig
ZIGOPTS ?= $(ZIGBUSEOPTS) $(ZIGUSROPTS)
@ -10,6 +12,9 @@ ZIGOPTS ?= $(ZIGBUSEOPTS) $(ZIGUSROPTS)
ipcd: src/ipcd.zig
$(ZIGC) build-exe $(ZIGOPTS) $^
tcpd: src/tcpd.zig
$(ZIGC) build-exe $(ZIGOPTS) $^
test-libipc: src/main.zig
$(ZIGC) test $(ZIGOPTS) $^