Blame sysinfo/os/pe.mk

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