summaryrefslogtreecommitdiff
path: root/sysinfo/os/pe.mk
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-24 16:29:50 -0400
committermidipix <writeonce@midipix.org>2016-04-24 17:06:32 -0400
commit1f5b18a8949ecfc942dac4c71f2358b955bde2fe (patch)
treec59c263ed163b3680e662fe9c21b0daa1b384aee /sysinfo/os/pe.mk
parent513c5c3ce6d8fd3878759398748638a1937f54d4 (diff)
downloadslibtool-1f5b18a8949ecfc942dac4c71f2358b955bde2fe.tar.bz2
slibtool-1f5b18a8949ecfc942dac4c71f2358b955bde2fe.tar.xz
build system: PE targets: added import library version support.
Diffstat (limited to 'sysinfo/os/pe.mk')
-rw-r--r--sysinfo/os/pe.mk48
1 files changed, 48 insertions, 0 deletions
diff --git a/sysinfo/os/pe.mk b/sysinfo/os/pe.mk
new file mode 100644
index 0000000..0b50df2
--- /dev/null
+++ b/sysinfo/os/pe.mk
@@ -0,0 +1,48 @@
+LDFLAGS_IMPLIB += -Wl,--output-def
+LDFLAGS_IMPLIB += -Wl,$(IMPLIB_DEF)
+
+implib: implib-ver implib-soname implib-solink
+
+implib-ver: shared-lib $(IMPLIB_VER)
+
+implib-soname: shared-lib $(IMPLIB_SONAME)
+
+implib-solink: shared-lib $(IMPLIB_SOLINK)
+
+$(IMPLIB_DEF): shared-lib
+
+$(IMPLIB_VER): $(IMPLIB_DEF)
+ $(DLLTOOL) -l $(IMPLIB_VER) -d $(IMPLIB_DEF) -D $(DSO_VER)
+
+$(IMPLIB_SONAME): $(IMPLIB_DEF)
+ $(DLLTOOL) -l $(IMPLIB_SONAME) -d $(IMPLIB_DEF) -D $(DSO_SONAME)
+
+$(IMPLIB_SOLINK): $(IMPLIB_SONAME)
+ rm -f $(IMPLIB_SOLINK).tmp
+ ln -s $(IMP_SONAME) $(IMPLIB_SOLINK).tmp
+ mv $(IMPLIB_SOLINK).tmp $(IMPLIB_SOLINK)
+
+install-implib: install-implib-ver \
+ install-implib-soname \
+ install-implib-solink
+
+install-implib-ver: implib-ver
+ mkdir -p $(DESTDIR)$(LIBDIR)
+ cp $(IMPLIB_VER) $(DESTDIR)$(LIBDIR)
+
+install-implib-soname: implib-soname
+ mkdir -p $(DESTDIR)$(LIBDIR)
+ cp $(IMPLIB_SONAME) $(DESTDIR)$(LIBDIR)
+
+install-implib-solink: implib-soname
+ mkdir -p $(DESTDIR)$(LIBDIR)
+ rm -f $@.tmp
+ ln -s $(IMP_SONAME) $@.tmp
+ mv $@.tmp $(DESTDIR)$(LIBDIR)/$(IMP_SOLINK)
+
+clean-implib:
+ rm -f $(SHARED_LIB)
+ rm -f $(IMPLIB_DEF)
+ rm -f $(IMPLIB_VER)
+ rm -f $(IMPLIB_SONAME)
+ rm -f $(IMPLIB_SOLINK)