Implement a helper library for POSIX semantics syscalls.

Since Linux kernel supported threads are not POSIX threads
and the glibc pthread library only supports POSIX semantics
for 9 system calls, to fully support the POSIX semantics for
a process sharing its security state across all of its
threads, we've created libpsx.

This commit also includes a threading test in tests/ for
this new psx_syscall() abstraction - one that transparently
mirrors calling POSIX-needing semantics syscalls over
all running threads.

Signed-off-by: Andrew G. Morgan <[email protected]>
diff --git a/Make.Rules b/Make.Rules
index b685ab2..1ccead1 100644
--- a/Make.Rules
+++ b/Make.Rules
@@ -61,6 +61,9 @@
         -Wnested-externs -Winline -Wshadow
 LD=$(CC) -Wl,-x -shared
 LDFLAGS := #-g
+LIBCAPLIB := -L$(topdir)/libcap -lcap
+LIBPSXLIB := -L$(topdir)/libcap -lpsx -lpthread
+
 BUILD_GPERF := $(shell which gperf >/dev/null 2>/dev/null && echo yes)
 
 SYSTEM_HEADERS = /usr/include