Blame sysinfo/os/pe.mk

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