summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2008-05-06 17:23:28 +0200
committerJay Berkenbilt <ejb@ql.org>2008-05-06 17:23:28 +0200
commit1f5f55924489c44700fcaef7ebb510da2ba2277c (patch)
treecd473ac7330a326ec9e2ab3561bd9f7f47d90fd8 /make
parent7665fc3d81974529b91702f76e4756a25a90f725 (diff)
downloadqpdf-1f5f55924489c44700fcaef7ebb510da2ba2277c.tar.zst
fix deps with libtool
git-svn-id: svn+q:///qpdf/trunk@623 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'make')
-rw-r--r--make/rules.mk18
1 files changed, 15 insertions, 3 deletions
diff --git a/make/rules.mk b/make/rules.mk
index 901534cd..335c6fce 100644
--- a/make/rules.mk
+++ b/make/rules.mk
@@ -26,6 +26,17 @@ else
depflags=
endif
+# Usage: $(call libdepflags,$(basename obj))
+# Usage: $(call fixdeps,$(basename obj))
+ifeq ($(GENDEPS),1)
+libdepflags=-MD -MF $(1).tdep -MP
+fixdeps=sed -e 's/\.o:/.lo:/' < $(1).tdep > $(1).dep
+
+else
+libdepflags=
+fixdeps=
+endif
+
# 1 2
# Usage: $(call compile,src,includes)
define compile
@@ -38,11 +49,12 @@ endef
# 1 2
# Usage: $(call libcompile,src,includes)
define libcompile
- $(LIBTOOL) --mode=compile \
+ $(LIBTOOL) --quiet --mode=compile \
$(CXX) $(CPPFLAGS) $(CXXFLAGS) \
- $(call depflags,$(basename $(call src_to_obj,$(1)))) \
+ $(call libdepflags,$(basename $(call src_to_obj,$(1)))) \
$(foreach I,$(2),-I$(I)) \
- -c $(1) -o $(call src_to_obj,$(1))
+ -c $(1) -o $(call src_to_obj,$(1)); \
+ $(call fixdeps,$(basename $(call src_to_obj,$(1))))
endef
# 1 2 3 4 5