sortix-mirror/regress/Makefile
Jonas 'Sortie' Termansen 3c43f71084 Implement file descriptor passing.
This change refactors the Unix socket / pipe backend to have a ring buffer
containing segments, where each segment has an optional leading ancillary
buffer containing control messages followed by a normal data buffer.

The SCM_RIGHTS control message has been implemented which transfers file
descriptors to the receiving process. File descriptors are reference counted
and cycles are prevented using the following restrictions:

1) Unix sockets cannot be sent on themselves (on either end).
2) Unix sockets themselves being sent cannot be sent on.
3) Unix sockets cannot send a Unix socket being sent on.

This is a compatible ABI change.
2021-12-31 22:24:11 +01:00

51 lines
1.1 KiB
Makefile

SOFTWARE_MEANT_FOR_SORTIX=1
include ../build-aux/platform.mak
include ../build-aux/compiler.mak
include ../build-aux/version.mak
include ../build-aux/dirs.mak
OPTLEVEL?=$(DEFAULT_OPTLEVEL)
CFLAGS?=$(OPTLEVEL)
TESTDIR?=$(LIBEXECDIR)/test
CPPFLAGS:=$(CPPFLAGS) -DVERSIONSTR=\"$(VERSION)\" -DTESTDIR=\"$(TESTDIR)\"
CFLAGS:=$(CFLAGS) -Wall -Wextra
BINARIES:=\
regress \
TESTS:=\
test-fmemopen \
test-pipe-one-byte \
test-pthread-argv \
test-pthread-basic \
test-pthread-main-exit \
test-pthread-main-join \
test-pthread-once \
test-pthread-self \
test-pthread-tls \
test-signal-raise \
test-unix-socket-fd-cycle \
test-unix-socket-fd-leak \
test-unix-socket-fd-pass \
test-unix-socket-fd-trunc \
test-unix-socket-name \
test-unix-socket-shutdown \
all: $(BINARIES) $(TESTS)
.PHONY: all install clean
install: all
mkdir -p $(DESTDIR)$(BINDIR)
install $(BINARIES) $(DESTDIR)$(BINDIR)
mkdir -p $(DESTDIR)$(TESTDIR)
ifneq ($(TESTS),)
install $(TESTS) $(DESTDIR)$(TESTDIR)
endif
%: %.c
$(CC) -std=gnu11 $(CFLAGS) $(CPPFLAGS) $< -o $@
clean:
rm -f $(BINARIES) $(TESTS) *.o