Blame sysinfo/os/pe.mk

0efa8c
LDFLAGS_IMPLIB	+= -Wl,--output-def
0efa8c
LDFLAGS_IMPLIB	+= -Wl,$(IMPLIB_DEF)
0efa8c
LDFLAGS_SHARED	+= $(LDFLAGS_IMPLIB)
0efa8c
1f5a23
LDFLAGS_SONAME	+= -Wl,-soname
1f5a23
LDFLAGS_SONAME	+= -Wl,$(DSO_SONAME)
1f5a23
LDFLAGS_SHARED	+= $(LDFLAGS_SONAME)
0efa8c
369a20
DSO_LIBPATH	?= loader
0efa8c
PE_SUBSYSTEM	?= windows
0efa8c
LDFLAGS_COMMON	+= -Wl,--subsystem=$(PE_SUBSYSTEM)
0efa8c
0efa8c
implib:			implib-ver package-implib-soname package-implib-solink
0efa8c
0efa8c
implib-ver:		shared-lib $(IMPLIB_VER)
0efa8c
0efa8c
implib-soname:		shared-lib $(IMPLIB_SONAME)
0efa8c
0efa8c
implib-solink:		shared-lib $(IMPLIB_SOLINK)
0efa8c
0efa8c
$(IMPLIB_DEF):		shared-lib
0efa8c
0efa8c
install-implib:		install-implib-ver \
0efa8c
			package-install-implib-soname \
0efa8c
			package-install-implib-solink
0efa8c
0efa8c
install-implib-ver:	implib-ver
0efa8c
			mkdir -p $(DESTDIR)$(LIBDIR)
0efa8c
			cp $(IMPLIB_VER) $(DESTDIR)$(LIBDIR)
0efa8c
0efa8c
clean-implib:
0efa8c
			rm -f $(SHARED_LIB)
0efa8c
			rm -f $(IMPLIB_DEF)
0efa8c
			rm -f $(IMPLIB_VER)
0efa8c
			rm -f $(IMPLIB_SONAME)
0efa8c
			rm -f $(IMPLIB_SOLINK)
0efa8c
0efa8c
54b776
ifeq ($(OS_IMPLIB_TOOL),mdso)
54b776
54b776
$(IMPLIB_VER):		$(IMPLIB_DEF)
369a20
			$(MDSO) -m $(HOST_BITS) -i $(IMPLIB_VER) -n $(DSO_VER) -l $(DSO_LIBPATH) $<
54b776
54b776
else ifeq ($(OS_IMPLIB_TOOL),dlltool)
54b776
54b776
$(IMPLIB_VER):		$(IMPLIB_DEF)
54b776
			$(DLLTOOL) -l $(IMPLIB_VER) -d $(IMPLIB_DEF) -D $(DSO_VER)
54b776
54b776
endif
54b776
54b776
54b776
0efa8c
ifeq ($(AVOID_VERSION),yes)
0efa8c
0efa8c
package-implib-soname:
0efa8c
package-implib-solink:
0efa8c
package-install-implib-soname:
0efa8c
package-install-implib-solink:
0efa8c
0efa8c
else
0efa8c
0efa8c
package-implib-soname:		implib-soname
0efa8c
package-implib-solink:		implib-solink
0efa8c
package-install-implib-soname:	install-implib-soname
0efa8c
package-install-implib-solink:	install-implib-solink
0efa8c
0efa8c
54b776
ifeq ($(OS_IMPLIB_TOOL),mdso)
54b776
54b776
$(IMPLIB_SONAME):	$(IMPLIB_DEF)
54b776
			$(MDSO) -m $(HOST_BITS) -i $(IMPLIB_SONAME) -n $(DSO_SONAME) $(IMPLIB_DEF)
54b776
54b776
else ifeq ($(OS_IMPLIB_TOOL),dlltool)
54b776
0efa8c
$(IMPLIB_SONAME):	$(IMPLIB_DEF)
0efa8c
			$(DLLTOOL) -l $(IMPLIB_SONAME) -d $(IMPLIB_DEF) -D $(DSO_SONAME)
0efa8c
54b776
endif
54b776
54b776
0efa8c
$(IMPLIB_SOLINK):	$(IMPLIB_SONAME)
0efa8c
			rm -f $(IMPLIB_SOLINK).tmp
0efa8c
			ln -s $(IMP_SONAME) $(IMPLIB_SOLINK).tmp
0efa8c
			mv $(IMPLIB_SOLINK).tmp $(IMPLIB_SOLINK)
0efa8c
0efa8c
install-implib-soname:	implib-soname
0efa8c
			mkdir -p $(DESTDIR)$(LIBDIR)
0efa8c
			cp $(IMPLIB_SONAME) $(DESTDIR)$(LIBDIR)
0efa8c
0efa8c
install-implib-solink:	implib-soname
0efa8c
			mkdir -p $(DESTDIR)$(LIBDIR)
7b19a0
			rm -f $(IMPLIB_SOLINK).tmp
7b19a0
			ln -s $(IMP_SONAME) $(IMPLIB_SOLINK).tmp
7b19a0
			mv $(IMPLIB_SOLINK).tmp $(DESTDIR)$(LIBDIR)/$(IMP_SOLINK)
0efa8c
0efa8c
endif