summaryrefslogtreecommitdiffstats
path: root/make
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 /make
parent6e193e31265f2c1c936d7110b956a2422bf707b1 (diff)
downloadqpdf-7398ef88b78d04b1428ed6336325a89f55117841.tar.zst
further refinements to build
git-svn-id: svn+q:///qpdf/trunk@759 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'make')
-rw-r--r--make/gcc-linux.mk29
-rw-r--r--make/libtool.mk8
-rw-r--r--make/mingw.mk10
3 files changed, 32 insertions, 15 deletions
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 \