2
1
mirror of https://github.com/qpdf/qpdf.git synced 2025-01-03 07:12:28 +00:00

further refinements to build

git-svn-id: svn+q:///qpdf/trunk@759 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
Jay Berkenbilt 2009-10-10 15:28:33 +00:00
parent 6e193e3126
commit 7398ef88b7
6 changed files with 39 additions and 18 deletions

View File

@ -54,7 +54,7 @@ endif
#XXX
##BUILDRULES := libtool
BUILDRULES := gcc
BUILDRULES := gcc-linux
# Prevent gnu make from trying to rebuild .dep files
$(foreach B,$(BUILD_ITEMS),$(eval \

View File

@ -10,3 +10,8 @@ Must add libqpdf/build to PATH.
To debug a crash in MSVC's debugger, start an instance of Visual C++.
When the abort/retry/ignore dialog pops up, first attach the process
from within visual C++, and then click Retry.
Basic procedure for building with mingw is to run configure and build
in msys and then run the test suite in cygwin with GENDEPS=0.
Also have to deal with gcc runtime DLL.

View File

@ -1,5 +1,4 @@
TARGETS_libqpdf = \
$(foreach L,$(call libname,qpdf),libqpdf/$(OUTPUT_DIR)/$(L))
TARGETS_libqpdf = libqpdf/$(OUTPUT_DIR)/$(call libname,qpdf)
INCLUDES_libqpdf = include libqpdf

View File

@ -5,7 +5,7 @@ LOBJ=o
# Usage: $(call libname,base)
define libname
lib$(1).a lib$(1).so
lib$(1).so
endef
# Usage: $(call binname,base)
@ -41,22 +41,25 @@ define libcompile
endef
# 1 2
# Usage: $(call makeslib,objs,library)
define makeslib
$(RM) $2
ar cru $(2) $(1)
ranlib $(2)
endef
# 1 2 3 4 5
# Usage: $(call makelib,objs,library,current,revision,age)
define makelib
$(RM) $2
if [ "$(findstring .a,$(2))" = ".a" ]; then \
ar cru $(2) $(1); \
ranlib $(2); \
else \
major=$$(( $(3) - $(5))); \
versuffix=$$major.$5.$4; \
$(CXX) $(CXXFLAGS) -shared -o $(2).$$versuffix $(1) \
-Wl,--soname -Wl,`basename $(2)`.$$major \
$(LDFLAGS) $(LIBS); \
ln -s `basename $(2)`.$$versuffix $(2); \
ln -s `basename $(2)`.$$versuffix $(2).$$major; \
fi
major=$$(( $(3) - $(5))); \
versuffix=$$major.$5.$4; \
$(CXX) $(CXXFLAGS) -shared -o $(2).$$versuffix $(1) \
-Wl,--soname -Wl,`basename $(2)`.$$major \
$(LDFLAGS) $(LIBS); \
ln -s `basename $(2)`.$$versuffix $(2); \
ln -s `basename $(2)`.$$versuffix $(2).$$major
endef
# 1 2

View File

@ -57,6 +57,14 @@ define libcompile
$(call fixdeps,$(basename $(call src_to_obj,$(1))))
endef
# 1 2
# Usage: $(call makeslib,objs,library)
define makeslib
$(RM) $2
ar cru $(2) $(1)
ranlib $(2)
endef
# 1 2 3 4 5
# Usage: $(call makelib,objs,library,current,revision,age)
define makelib

View File

@ -35,11 +35,17 @@ endef
libcompile = $(compile)
# 1 2
# Usage: $(call makeslib,objs,library)
define makeslib
$(RM) $2
ar cru $(2) $(1)
ranlib $(2)
endef
# 1 2 3 4 5
# Usage: $(call makelib,objs,library,current,revision,age)
define makelib
ar cru $(2) $(1);
ranlib $(2);
echo `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`$(3).dll
dlltool -l $(2) -D $$(basename `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`$(3).dll) $(1); \
$(CXX) -shared -o `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`$(3).dll \