Blame sysinfo/os/pe.mk

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