Blame sysinfo/os/pe.mk

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