diff options
author | midipix <writeonce@midipix.org> | 2018-12-26 08:48:48 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-12-30 18:39:00 -0500 |
commit | 7e34aa8d0cfd096571343a80eb537c84544d8c59 (patch) | |
tree | 089df5a7186a1240289c75d86ebb9978c8e8e5e8 /sofort/exrules | |
parent | 5539405abbd9ee5dd141df08aa4c093c53fe7d98 (diff) | |
download | sbpython2-7e34aa8d0cfd096571343a80eb537c84544d8c59.tar.bz2 sbpython2-7e34aa8d0cfd096571343a80eb537c84544d8c59.tar.xz |
build system: major overhaul: removed sysinfo, integrated ccenv.
Diffstat (limited to 'sofort/exrules')
-rw-r--r-- | sofort/exrules/default.mk | 8 | ||||
-rw-r--r-- | sofort/exrules/pe-common.mk | 39 | ||||
-rw-r--r-- | sofort/exrules/pe-dlltool.mk | 15 | ||||
-rw-r--r-- | sofort/exrules/pe-mdso.mk | 15 | ||||
-rw-r--r-- | sofort/exrules/pe-version.mk | 31 |
5 files changed, 108 insertions, 0 deletions
diff --git a/sofort/exrules/default.mk b/sofort/exrules/default.mk new file mode 100644 index 0000000..ad1c11c --- /dev/null +++ b/sofort/exrules/default.mk @@ -0,0 +1,8 @@ +DSO_REF_VER = $(SHARED_LIB) +DSO_REF_SONAME = $(SHARED_SONAME) +DSO_REF_SOLINK = $(SHARED_SOLINK) + +LDFLAGS_SHARED += -Wl,-soname +LDFLAGS_SHARED += -Wl,$(DSO_SONAME) + +.PHONY: $(IMPLIB_DEF) $(IMPLIB_VER) $(IMPLIB_SONAME) $(IMPLIB_SOLINK) 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) diff --git a/sofort/exrules/pe-dlltool.mk b/sofort/exrules/pe-dlltool.mk new file mode 100644 index 0000000..6694ed5 --- /dev/null +++ b/sofort/exrules/pe-dlltool.mk @@ -0,0 +1,15 @@ +include $(PROJECT_DIR)/sofort/exrules/pe-common.mk + +$(IMPLIB_VER): $(IMPLIB_DEF) + $(DLLTOOL) -l $(IMPLIB_VER) -d $(IMPLIB_DEF) -D $(DSO_VER) + +ifeq ($(AVOID_VERSION),yes) + +else + +$(IMPLIB_SONAME): $(IMPLIB_DEF) + $(DLLTOOL) -l $(IMPLIB_SONAME) -d $(IMPLIB_DEF) -D $(DSO_SONAME) + +endif + +include $(PROJECT_DIR)/sofort/exrules/pe-version.mk diff --git a/sofort/exrules/pe-mdso.mk b/sofort/exrules/pe-mdso.mk new file mode 100644 index 0000000..b5e2dba --- /dev/null +++ b/sofort/exrules/pe-mdso.mk @@ -0,0 +1,15 @@ +include $(PROJECT_DIR)/sofort/exrules/pe-common.mk + +$(IMPLIB_VER): $(IMPLIB_DEF) + $(MDSO) -m $(CC_BITS) -i $(IMPLIB_VER) -n $(DSO_VER) -l $(DSO_LIBPATH) $< + +ifeq ($(AVOID_VERSION),yes) + +else + +$(IMPLIB_SONAME): $(IMPLIB_DEF) + $(MDSO) -m $(CC_BITS) -i $(IMPLIB_SONAME) -n $(DSO_SONAME) $(IMPLIB_DEF) + +endif + +include $(PROJECT_DIR)/sofort/exrules/pe-version.mk diff --git a/sofort/exrules/pe-version.mk b/sofort/exrules/pe-version.mk new file mode 100644 index 0000000..38714b4 --- /dev/null +++ b/sofort/exrules/pe-version.mk @@ -0,0 +1,31 @@ +ifeq ($(AVOID_VERSION),yes) + +package-implib-soname: +package-implib-solink: +package-install-implib-soname: +package-install-implib-solink: + +else + +package-implib-soname: implib-soname +package-implib-solink: implib-solink +package-install-implib-soname: install-implib-soname +package-install-implib-solink: install-implib-solink + + +$(IMPLIB_SOLINK): $(IMPLIB_SONAME) + rm -f $(IMPLIB_SOLINK).tmp + ln -s $(IMP_SONAME) $(IMPLIB_SOLINK).tmp + mv $(IMPLIB_SOLINK).tmp $(IMPLIB_SOLINK) + +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 $(IMPLIB_SOLINK).tmp + ln -s $(IMP_SONAME) $(IMPLIB_SOLINK).tmp + mv $(IMPLIB_SOLINK).tmp $(DESTDIR)$(LIBDIR)/$(IMP_SOLINK) + +endif |