Commit 95ba7125ffa4efd4022fd27ab61ff739b0864258
1 parent
3b2a3cdd
Fix link order (fixes #176)
Specify qpdf libraries before external ones. Specify LDFLAGS before libraries. This should eliminate remaining cases of qpdf builds favoring previously installed versions.
Showing
2 changed files
with
3 additions
and
3 deletions
libtests/build.mk
| @@ -43,4 +43,4 @@ $(foreach B,$(BINS_libtests),$(eval \ | @@ -43,4 +43,4 @@ $(foreach B,$(BINS_libtests),$(eval \ | ||
| 43 | 43 | ||
| 44 | $(foreach B,$(BINS_libtests),$(eval \ | 44 | $(foreach B,$(BINS_libtests),$(eval \ |
| 45 | libtests/$(OUTPUT_DIR)/$(call binname,$(B)): $(OBJS_$(B)) ; \ | 45 | libtests/$(OUTPUT_DIR)/$(call binname,$(B)): $(OBJS_$(B)) ; \ |
| 46 | - $(call makebin,$(OBJS_$(B)),$$@,$(LDFLAGS_libqpdf) $(LDFLAGS),$(LIBS) $(LIBS_libqpdf)))) | 46 | + $(call makebin,$(OBJS_$(B)),$$@,$(LDFLAGS_libqpdf) $(LDFLAGS),$(LIBS_libqpdf) $(LIBS)))) |
make/libtool.mk
| @@ -94,14 +94,14 @@ endef | @@ -94,14 +94,14 @@ endef | ||
| 94 | define makelib | 94 | define makelib |
| 95 | $(LIBTOOL) --mode=link \ | 95 | $(LIBTOOL) --mode=link \ |
| 96 | $(CXX) $(CXXFLAGS) $(LD_VERSION_FLAGS) \ | 96 | $(CXX) $(CXXFLAGS) $(LD_VERSION_FLAGS) \ |
| 97 | - -o $(2) $(1) $(4) $(3) \ | 97 | + -o $(2) $(1) $(3) $(4) \ |
| 98 | -rpath $(libdir) -version-info $(5):$(6):$(7) -no-undefined | 98 | -rpath $(libdir) -version-info $(5):$(6):$(7) -no-undefined |
| 99 | endef | 99 | endef |
| 100 | 100 | ||
| 101 | # 1 2 3 4 | 101 | # 1 2 3 4 |
| 102 | # Usage: $(call makebin,objs,binary,ldflags,libs) | 102 | # Usage: $(call makebin,objs,binary,ldflags,libs) |
| 103 | define makebin | 103 | define makebin |
| 104 | - $(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(1) -o $(2) $(4) $(3) | 104 | + $(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(1) -o $(2) $(3) $(4) |
| 105 | endef | 105 | endef |
| 106 | 106 | ||
| 107 | # Install target | 107 | # Install target |