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.
This commit is contained in:
Jay Berkenbilt 2018-02-04 14:01:57 -05:00
parent 3b2a3cdd77
commit 95ba7125ff
2 changed files with 3 additions and 3 deletions

View File

@ -43,4 +43,4 @@ $(foreach B,$(BINS_libtests),$(eval \
$(foreach B,$(BINS_libtests),$(eval \
libtests/$(OUTPUT_DIR)/$(call binname,$(B)): $(OBJS_$(B)) ; \
$(call makebin,$(OBJS_$(B)),$$@,$(LDFLAGS_libqpdf) $(LDFLAGS),$(LIBS) $(LIBS_libqpdf))))
$(call makebin,$(OBJS_$(B)),$$@,$(LDFLAGS_libqpdf) $(LDFLAGS),$(LIBS_libqpdf) $(LIBS))))

View File

@ -94,14 +94,14 @@ endef
define makelib
$(LIBTOOL) --mode=link \
$(CXX) $(CXXFLAGS) $(LD_VERSION_FLAGS) \
-o $(2) $(1) $(4) $(3) \
-o $(2) $(1) $(3) $(4) \
-rpath $(libdir) -version-info $(5):$(6):$(7) -no-undefined
endef
# 1 2 3 4
# Usage: $(call makebin,objs,binary,ldflags,libs)
define makebin
$(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(1) -o $(2) $(4) $(3)
$(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(1) -o $(2) $(3) $(4)
endef
# Install target