From 58320cbb4614458e49f4c24d7b192ff27df7f41b Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Wed, 11 Jan 2023 16:04:16 +0100 Subject: [PATCH] Makefile: tcpd, zig links against libc. --- zig-impl/makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zig-impl/makefile b/zig-impl/makefile index 7d234fa..c4a278d 100644 --- a/zig-impl/makefile +++ b/zig-impl/makefile @@ -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) $^