Blame sysinfo/os/pe.mk

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