aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.shlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile.shlib')
-rw-r--r--src/Makefile.shlib10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index d546ed1f313..6ee92f2d740 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -20,12 +20,16 @@
#
# NAME Name of library to build (no suffix nor "lib" prefix)
# OBJS List of object files to include in library
-# SHLIB_LINK If shared library relies on other libraries,
-# additional stuff to put in its link command
+# SHLIB_LINK Stuff to append to library's link command
+# (typically, -L and -l switches for external libraries)
+# SHLIB_LINK_INTERNAL -L and -l switches for Postgres-supplied libraries
# SHLIB_PREREQS Order-only prerequisites for library build target
# SHLIB_EXPORTS (optional) Name of file containing list of symbols to
# export, in the format "function_name number"
#
+# Don't use SHLIB_LINK for references to files in the build tree, or the
+# wrong things will happen --- use SHLIB_LINK_INTERNAL for those!
+#
# When building a shared library, the following version information
# must also be set. It should be omitted when building a dynamically
# loadable module.
@@ -70,6 +74,8 @@
COMPILER = $(CC) $(CFLAGS)
LINK.static = $(AR) $(AROPT)
+LDFLAGS_INTERNAL += $(SHLIB_LINK_INTERNAL)
+
ifdef SO_MAJOR_VERSION