Reicher82 / python / sbpython3

Forked from python/sbpython3 3 years ago
Clone

Blame sysinfo/os/pe.mk

5dc983
DSO_REF_VER      = $(IMPLIB_VER)
5dc983
DSO_REF_SONAME   = $(IMPLIB_SONAME)
5dc983
DSO_REF_SOLINK   = $(IMPLIB_SOLINK)
5dc983
5dc983
LDFLAGS_IMPLIB	+= -Wl,--output-def
5dc983
LDFLAGS_IMPLIB	+= -Wl,$(IMPLIB_DEF)
5dc983
5dc983
LDFLAGS_SONAME	+= -Wl,-soname
5dc983
LDFLAGS_SONAME	+= -Wl,$(DSO_SONAME)
5dc983
LDFLAGS_SHARED	+= $(LDFLAGS_SONAME)
5dc983
5dc983
DSO_LIBPATH	?= loader
5dc983
PE_SUBSYSTEM	?= windows
5dc983
LDFLAGS_COMMON	+= -Wl,--subsystem=$(PE_SUBSYSTEM)
5dc983
5dc983
implib:			implib-ver package-implib-soname package-implib-solink
5dc983
5dc983
implib-ver:		shared-lib $(IMPLIB_VER)
5dc983
5dc983
implib-soname:		shared-lib $(IMPLIB_SONAME)
5dc983
5dc983
implib-solink:		shared-lib $(IMPLIB_SOLINK)
5dc983
5dc983
$(IMPLIB_DEF):		shared-lib
5dc983
5dc983
install-implib:		install-implib-ver \
5dc983
			package-install-implib-soname \
5dc983
			package-install-implib-solink
5dc983
5dc983
install-implib-ver:	implib-ver
5dc983
			mkdir -p $(DESTDIR)$(LIBDIR)
5dc983
			cp $(IMPLIB_VER) $(DESTDIR)$(LIBDIR)
5dc983
5dc983
clean-implib:
5dc983
			rm -f $(SHARED_LIB)
5dc983
			rm -f $(IMPLIB_DEF)
5dc983
			rm -f $(IMPLIB_VER)
5dc983
			rm -f $(IMPLIB_SONAME)
5dc983
			rm -f $(IMPLIB_SOLINK)
5dc983
5dc983
5dc983
ifeq ($(OS_IMPLIB_TOOL),mdso)
5dc983
5dc983
$(IMPLIB_VER):		$(IMPLIB_DEF)
5dc983
			$(MDSO) -m $(HOST_BITS) -i $(IMPLIB_VER) -n $(DSO_VER) -l $(DSO_LIBPATH) $<
5dc983
5dc983
else ifeq ($(OS_IMPLIB_TOOL),dlltool)
5dc983
5dc983
$(IMPLIB_VER):		$(IMPLIB_DEF)
5dc983
			$(DLLTOOL) -l $(IMPLIB_VER) -d $(IMPLIB_DEF) -D $(DSO_VER)
5dc983
5dc983
endif
5dc983
5dc983
5dc983
5dc983
ifeq ($(AVOID_VERSION),yes)
5dc983
5dc983
package-implib-soname:
5dc983
package-implib-solink:
5dc983
package-install-implib-soname:
5dc983
package-install-implib-solink:
5dc983
5dc983
else
5dc983
5dc983
package-implib-soname:		implib-soname
5dc983
package-implib-solink:		implib-solink
5dc983
package-install-implib-soname:	install-implib-soname
5dc983
package-install-implib-solink:	install-implib-solink
5dc983
5dc983
5dc983
ifeq ($(OS_IMPLIB_TOOL),mdso)
5dc983
5dc983
$(IMPLIB_SONAME):	$(IMPLIB_DEF)
5dc983
			$(MDSO) -m $(HOST_BITS) -i $(IMPLIB_SONAME) -n $(DSO_SONAME) $(IMPLIB_DEF)
5dc983
5dc983
else ifeq ($(OS_IMPLIB_TOOL),dlltool)
5dc983
5dc983
$(IMPLIB_SONAME):	$(IMPLIB_DEF)
5dc983
			$(DLLTOOL) -l $(IMPLIB_SONAME) -d $(IMPLIB_DEF) -D $(DSO_SONAME)
5dc983
5dc983
endif
5dc983
5dc983
5dc983
$(IMPLIB_SOLINK):	$(IMPLIB_SONAME)
5dc983
			rm -f $(IMPLIB_SOLINK).tmp
5dc983
			ln -s $(IMP_SONAME) $(IMPLIB_SOLINK).tmp
5dc983
			mv $(IMPLIB_SOLINK).tmp $(IMPLIB_SOLINK)
5dc983
5dc983
install-implib-soname:	implib-soname
5dc983
			mkdir -p $(DESTDIR)$(LIBDIR)
5dc983
			cp $(IMPLIB_SONAME) $(DESTDIR)$(LIBDIR)
5dc983
5dc983
install-implib-solink:	implib-soname
5dc983
			mkdir -p $(DESTDIR)$(LIBDIR)
5dc983
			rm -f $(IMPLIB_SOLINK).tmp
5dc983
			ln -s $(IMP_SONAME) $(IMPLIB_SOLINK).tmp
5dc983
			mv $(IMPLIB_SOLINK).tmp $(DESTDIR)$(LIBDIR)/$(IMP_SOLINK)
5dc983
5dc983
endif