mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-08 17:24:06 +00:00
tweak shared library creation
git-svn-id: svn+q:///qpdf/trunk@1007 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
parent
a4963e8b52
commit
bc91aa2945
@ -66,12 +66,12 @@ endef
|
|||||||
# Usage: $(call makelib,objs,library,ldflags,libs,current,revision,age)
|
# Usage: $(call makelib,objs,library,ldflags,libs,current,revision,age)
|
||||||
define makelib
|
define makelib
|
||||||
$(RM) $(2) $(2).*
|
$(RM) $(2) $(2).*
|
||||||
major=$$(( $(5) - $(7))); \
|
major=$$(( $(5) - $(7) )); \
|
||||||
versuffix=$$major.$(7).$(6); \
|
versuffix=$$major.$(7).$(6); \
|
||||||
$(CXX) $(CXXFLAGS) -shared -o $(2).$$versuffix $(1) \
|
$(CXX) $(CXXFLAGS) -shared -o $(2).$$versuffix $(1) \
|
||||||
-Wl,--soname -Wl,`basename $(2)`.$$major \
|
-Wl,--soname -Wl,`basename $(2)`.$$major \
|
||||||
$(3) $(4); \
|
$(3) $(4) && \
|
||||||
ln -s `basename $(2)`.$$versuffix $(2); \
|
ln -s `basename $(2)`.$$versuffix $(2) && \
|
||||||
ln -s `basename $(2)`.$$versuffix $(2).$$major
|
ln -s `basename $(2)`.$$versuffix $(2).$$major
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -62,9 +62,9 @@ endef
|
|||||||
# 1 2 3 4 5 6 7
|
# 1 2 3 4 5 6 7
|
||||||
# Usage: $(call makelib,objs,library,ldflags,libs,current,revision,age)
|
# Usage: $(call makelib,objs,library,ldflags,libs,current,revision,age)
|
||||||
define makelib
|
define makelib
|
||||||
major=$$(( $(5) - $(7))); \
|
major=$$(( $(5) - $(7) )); \
|
||||||
dlltool -l $(2) -D $$(basename `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`$(major).dll) $(1); \
|
dlltool -l $(2) -D $$(basename `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`)$${major}.dll $(1) && \
|
||||||
$(CXX) -shared -o `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`$(major).dll \
|
$(CXX) -shared -o `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`$${major}.dll \
|
||||||
$(1) $(3) $(4)
|
$(1) $(3) $(4)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
16
make/msvc.mk
16
make/msvc.mk
@ -65,16 +65,16 @@ endef
|
|||||||
# 1 2 3 4 5 6 7
|
# 1 2 3 4 5 6 7
|
||||||
# Usage: $(call makelib,objs,library,ldflags,libs,current,revision,age)
|
# Usage: $(call makelib,objs,library,ldflags,libs,current,revision,age)
|
||||||
define makelib
|
define makelib
|
||||||
major=$$(( $(5) - $(7))); \
|
major=$$(( $(5) - $(7) )); \
|
||||||
cl /nologo /O2 /Zi /Gy /EHsc /MD /LD /Fe$(basename $(2))$(major).dll \
|
cl /nologo /O2 /Zi /Gy /EHsc /MD /LD /Fe$(basename $(2))$${major}.dll \
|
||||||
$(1) /link /incremental:no \
|
$(1) /link /incremental:no \
|
||||||
$(foreach L,$(subst -L,,$(3)),/LIBPATH:$(L)) \
|
$(foreach L,$(subst -L,,$(3)),/LIBPATH:$(L)) \
|
||||||
$(foreach L,$(subst -l,,$(4)),$(L).lib)
|
$(foreach L,$(subst -l,,$(4)),$(L).lib) && \
|
||||||
if [ -f $(basename $(2))$(major).dll.manifest ]; then \
|
if [ -f $(basename $(2))$${major}.dll.manifest ]; then \
|
||||||
mt.exe -nologo -manifest $(basename $(2))$(major).dll.manifest \
|
mt.exe -nologo -manifest $(basename $(2))$${major}.dll.manifest \
|
||||||
-outputresource:$(basename $(2))$(major).dll\;2; \
|
-outputresource:$(basename $(2))$${major}.dll\;2; \
|
||||||
fi
|
fi && \
|
||||||
mv $(basename $(2))$(major).lib $(2)
|
mv $(basename $(2))$${major}.lib $(2)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# 1 2 3 4
|
# 1 2 3 4
|
||||||
|
Loading…
Reference in New Issue
Block a user