summaryrefslogtreecommitdiff
path: root/sofort/exrules/pe-common.mk
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-12-26 08:48:48 -0500
committermidipix <writeonce@midipix.org>2018-12-31 21:36:45 -0500
commitf7f887d5191514f5cd61db8f9e4cb9676c296abf (patch)
treee625a8482ac45336aae39c05ae51976f71674e1c /sofort/exrules/pe-common.mk
parenteb9c1bcf86daeb0dab4164ce59c68f2008f3d774 (diff)
downloadslibtool-f7f887d5191514f5cd61db8f9e4cb9676c296abf.tar.bz2
slibtool-f7f887d5191514f5cd61db8f9e4cb9676c296abf.tar.xz
build system: major overhaul: removed sysinfo, integrated ccenv.
Diffstat (limited to 'sofort/exrules/pe-common.mk')
-rw-r--r--sofort/exrules/pe-common.mk39
1 files changed, 39 insertions, 0 deletions
diff --git a/sofort/exrules/pe-common.mk b/sofort/exrules/pe-common.mk
new file mode 100644
index 0000000..be19ab3
--- /dev/null
+++ b/sofort/exrules/pe-common.mk
@@ -0,0 +1,39 @@
+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_SONAME += -Wl,-soname
+LDFLAGS_SONAME += -Wl,$(DSO_SONAME)
+LDFLAGS_SHARED += $(LDFLAGS_SONAME)
+
+DSO_LIBPATH ?= loader
+PE_SUBSYSTEM ?= windows
+LDFLAGS_COMMON += -Wl,--subsystem=$(PE_SUBSYSTEM)
+
+implib: implib-ver package-implib-soname package-implib-solink
+
+implib-ver: shared-lib $(IMPLIB_VER)
+
+implib-soname: shared-lib $(IMPLIB_SONAME)
+
+implib-solink: shared-lib $(IMPLIB_SOLINK)
+
+$(IMPLIB_DEF): shared-lib
+
+install-implib: install-implib-ver \
+ package-install-implib-soname \
+ package-install-implib-solink
+
+install-implib-ver: implib-ver
+ mkdir -p $(DESTDIR)$(LIBDIR)
+ cp $(IMPLIB_VER) $(DESTDIR)$(LIBDIR)
+
+clean-implib:
+ rm -f $(SHARED_LIB)
+ rm -f $(IMPLIB_DEF)
+ rm -f $(IMPLIB_VER)
+ rm -f $(IMPLIB_SONAME)
+ rm -f $(IMPLIB_SOLINK)