Blame sysinfo/os/pe.mk

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