Blame sysinfo/os/pe.mk

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