aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2009-10-10 17:28:33 +0200
committerJay Berkenbilt <ejb@ql.org>2009-10-10 17:28:33 +0200
commit7398ef88b78d04b1428ed6336325a89f55117841 (patch)
tree261038456934d7b0bcbbba1d477323ed82d64779
parent6e193e31265f2c1c936d7110b956a2422bf707b1 (diff)
downloadqpdf-7398ef88b78d04b1428ed6336325a89f55117841.tar.zst
further refinements to build
git-svn-id: svn+q:///qpdf/trunk@759 71b93d88-0707-0410-a8cf-f5a4172ac649
-rw-r--r--Makefile2
-rw-r--r--README.windows5
-rw-r--r--libqpdf/build.mk3
-rw-r--r--make/gcc-linux.mk29
-rw-r--r--make/libtool.mk8
-rw-r--r--make/mingw.mk10
6 files changed, 39 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index e5a4ad99..a0207f5b 100644
--- a/Makefile
+++ b/Makefile
@@ -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 \
diff --git a/README.windows b/README.windows
index f6c2030b..29a717d1 100644
--- a/README.windows
+++ b/README.windows
@@ -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.
diff --git a/libqpdf/build.mk b/libqpdf/build.mk
index df1227df..5696a3b5 100644
--- a/libqpdf/build.mk
+++ b/libqpdf/build.mk
@@ -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
diff --git a/make/gcc-linux.mk b/make/gcc-linux.mk
index 41978402..d773de4e 100644
--- a/make/gcc-linux.mk
+++ b/make/gcc-linux.mk
@@ -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
diff --git a/make/libtool.mk b/make/libtool.mk
index 3287d5aa..b9fda1d5 100644
--- a/make/libtool.mk
+++ b/make/libtool.mk
@@ -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
diff --git a/make/mingw.mk b/make/mingw.mk
index 04798c55..21c3cb56 100644
--- a/make/mingw.mk
+++ b/make/mingw.mk
@@ -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 \