Blame sysinfo/os/pe.mk

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