Blame sysinfo/os/pe.mk

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