Support shared library build and linkage of -lpsx
For now, the dynamic linkage of libpsx.so* is considered alpha.
The build tree supports it and can successfully run tests but
I'm hopeful I can get some feedback from third parties that it
works as expected.
Feature request:
https://bugzilla.kernel.org/show_bug.cgi?id=206093
Signed-off-by: Andrew G. Morgan <[email protected]>
diff --git a/Make.Rules b/Make.Rules
index 5366f2d..6a571c6 100644
--- a/Make.Rules
+++ b/Make.Rules
@@ -71,7 +71,8 @@
LD=$(CC) -Wl,-x -shared
LDFLAGS ?= #-g
LIBCAPLIB := -L$(topdir)/libcap -lcap
-LIBPSXLIB := -L$(topdir)/libcap -lpsx -lpthread -Wl,-wrap,pthread_create
+PSXLINKFLAGS := -lpthread -Wl,-wrap,pthread_create
+LIBPSXLIB := -L$(topdir)/libcap -lpsx $(PSXLINKFLAGS)
BUILD_GPERF := $(shell which gperf >/dev/null 2>/dev/null && echo yes)