Blame sysinfo/os/pe.mk

85d213
DSO_REF_VER      = $(IMPLIB_VER)
85d213
DSO_REF_SONAME   = $(IMPLIB_SONAME)
85d213
DSO_REF_SOLINK   = $(IMPLIB_SOLINK)
85d213
551024
LDFLAGS_IMPLIB	+= -Wl,--output-def
551024
LDFLAGS_IMPLIB	+= -Wl,$(IMPLIB_DEF)
551024
95d67c
LDFLAGS_SONAME	+= -Wl,-soname
95d67c
LDFLAGS_SONAME	+= -Wl,$(DSO_SONAME)
95d67c
LDFLAGS_SHARED	+= $(LDFLAGS_SONAME)
551024
b69287
DSO_LIBPATH	?= loader
dc0640
PE_SUBSYSTEM	?= windows
dc0640
LDFLAGS_COMMON	+= -Wl,--subsystem=$(PE_SUBSYSTEM)
dc0640
551024
implib:			implib-ver package-implib-soname package-implib-solink
551024
551024
implib-ver:		shared-lib $(IMPLIB_VER)
551024
551024
implib-soname:		shared-lib $(IMPLIB_SONAME)
551024
551024
implib-solink:		shared-lib $(IMPLIB_SOLINK)
551024
551024
$(IMPLIB_DEF):		shared-lib
551024
551024
install-implib:		install-implib-ver \
551024
			package-install-implib-soname \
551024
			package-install-implib-solink
551024
551024
install-implib-ver:	implib-ver
551024
			mkdir -p $(DESTDIR)$(LIBDIR)
551024
			cp $(IMPLIB_VER) $(DESTDIR)$(LIBDIR)
551024
551024
clean-implib:
551024
			rm -f $(SHARED_LIB)
551024
			rm -f $(IMPLIB_DEF)
551024
			rm -f $(IMPLIB_VER)
551024
			rm -f $(IMPLIB_SONAME)
551024
			rm -f $(IMPLIB_SOLINK)
551024
551024
a65132
ifeq ($(OS_IMPLIB_TOOL),mdso)
a65132
a65132
$(IMPLIB_VER):		$(IMPLIB_DEF)
b69287
			$(MDSO) -m $(HOST_BITS) -i $(IMPLIB_VER) -n $(DSO_VER) -l $(DSO_LIBPATH) $<
a65132
a65132
else ifeq ($(OS_IMPLIB_TOOL),dlltool)
a65132
a65132
$(IMPLIB_VER):		$(IMPLIB_DEF)
a65132
			$(DLLTOOL) -l $(IMPLIB_VER) -d $(IMPLIB_DEF) -D $(DSO_VER)
a65132
a65132
endif
a65132
a65132
a65132
551024
ifeq ($(AVOID_VERSION),yes)
551024
551024
package-implib-soname:
551024
package-implib-solink:
551024
package-install-implib-soname:
551024
package-install-implib-solink:
551024
551024
else
551024
551024
package-implib-soname:		implib-soname
551024
package-implib-solink:		implib-solink
551024
package-install-implib-soname:	install-implib-soname
551024
package-install-implib-solink:	install-implib-solink
551024
551024
a65132
ifeq ($(OS_IMPLIB_TOOL),mdso)
a65132
a65132
$(IMPLIB_SONAME):	$(IMPLIB_DEF)
a65132
			$(MDSO) -m $(HOST_BITS) -i $(IMPLIB_SONAME) -n $(DSO_SONAME) $(IMPLIB_DEF)
a65132
a65132
else ifeq ($(OS_IMPLIB_TOOL),dlltool)
a65132
551024
$(IMPLIB_SONAME):	$(IMPLIB_DEF)
551024
			$(DLLTOOL) -l $(IMPLIB_SONAME) -d $(IMPLIB_DEF) -D $(DSO_SONAME)
551024
a65132
endif
a65132
a65132
551024
$(IMPLIB_SOLINK):	$(IMPLIB_SONAME)
551024
			rm -f $(IMPLIB_SOLINK).tmp
551024
			ln -s $(IMP_SONAME) $(IMPLIB_SOLINK).tmp
551024
			mv $(IMPLIB_SOLINK).tmp $(IMPLIB_SOLINK)
551024
551024
install-implib-soname:	implib-soname
551024
			mkdir -p $(DESTDIR)$(LIBDIR)
551024
			cp $(IMPLIB_SONAME) $(DESTDIR)$(LIBDIR)
551024
551024
install-implib-solink:	implib-soname
551024
			mkdir -p $(DESTDIR)$(LIBDIR)
41c50b
			rm -f $(IMPLIB_SOLINK).tmp
41c50b
			ln -s $(IMP_SONAME) $(IMPLIB_SOLINK).tmp
41c50b
			mv $(IMPLIB_SOLINK).tmp $(DESTDIR)$(LIBDIR)/$(IMP_SOLINK)
551024
551024
endif