summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-11-25 05:05:44 -0500
committermidipix <writeonce@midipix.org>2018-11-25 09:24:54 -0500
commit000825b1d3c2c81a61c578bf5385495d36f0dc60 (patch)
tree34ab13c3d801eb6d1aefe6756f176c165c98b189
parent2e2412e8ddaffceddcd4f8ba9bc94380aa2081a8 (diff)
downloadptycon-000825b1d3c2c81a61c578bf5385495d36f0dc60.tar.bz2
ptycon-000825b1d3c2c81a61c578bf5385495d36f0dc60.tar.xz
build system: PE, ELF: defined DSO_REF_VER, DSO_REF_SONAME, DSO_REF_SOLINK.
These definitions come in handy when a project generates alongside its ``primary shared library'' one or more ``extension libraries'' that depend on it. When the rules for generating extension libraries use the $^ directive, the above dependency must be declared in a target-aware manner. In most cases, one would want to express this dependency by way of $(DSO_REF_SONAME), thereby pulling in lib/libfoo.so.$(MAJOR) on ELF targets, lib/libfoo.$(MAJOR).lib.a on midipix targets, and lib/libfoo.$(MAJOR).dll.a on win32 targets.
-rw-r--r--sysinfo/os/pe.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysinfo/os/pe.mk b/sysinfo/os/pe.mk
index e8e1759..c3c5ba0 100644
--- a/sysinfo/os/pe.mk
+++ b/sysinfo/os/pe.mk
@@ -1,3 +1,7 @@
+DSO_REF_VER = $(IMPLIB_VER)
+DSO_REF_SONAME = $(IMPLIB_SONAME)
+DSO_REF_SOLINK = $(IMPLIB_SOLINK)
+
LDFLAGS_IMPLIB += -Wl,--output-def
LDFLAGS_IMPLIB += -Wl,$(IMPLIB_DEF)
LDFLAGS_SHARED += $(LDFLAGS_IMPLIB)