mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 10:58:58 +00:00
Fix order of build flags.
Place user-specified CPPFLAGS and LDFLAGS later so that user-specified non-standard paths that have old versions of qpdf don't cause the build to fail.
This commit is contained in:
parent
81e8752362
commit
30dbf94f53
@ -1,5 +1,11 @@
|
||||
2012-06-21 Jay Berkenbilt <ejb@ql.org>
|
||||
|
||||
* make/libtool.mk: Place user-specified CPPFLAGS and LDFLAGS later
|
||||
in the compilation so that if a user installs things in a
|
||||
non-standard place that they have to tell the build about, earlier
|
||||
versions of qpdf installed there won't break the build. Thanks to
|
||||
Macports for reporting this. (Fixes bug 3468860.)
|
||||
|
||||
* Instead of using off_t in the public APIs, use qpdf_offset_t
|
||||
instead. This is defined as long long in qpdf/Types.h. If your
|
||||
system doesn't support long long, you can redefine it.
|
||||
|
@ -40,18 +40,20 @@ endif
|
||||
# 1 2
|
||||
# Usage: $(call compile,src,includes)
|
||||
define compile
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) \
|
||||
$(CXX) $(CXXFLAGS) \
|
||||
$(call depflags,$(basename $(call src_to_obj,$(1)))) \
|
||||
$(foreach I,$(2),-I$(I)) \
|
||||
$(CPPFLAGS) \
|
||||
-c $(1) -o $(call src_to_obj,$(1))
|
||||
endef
|
||||
|
||||
# 1 2
|
||||
# Usage: $(call c_compile,src,includes)
|
||||
define c_compile
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) \
|
||||
$(CC) $(CFLAGS) \
|
||||
$(call depflags,$(basename $(call c_src_to_obj,$(1)))) \
|
||||
$(foreach I,$(2),-I$(I)) \
|
||||
$(CPPFLAGS) \
|
||||
-c $(1) -o $(call c_src_to_obj,$(1))
|
||||
endef
|
||||
|
||||
@ -59,9 +61,10 @@ endef
|
||||
# Usage: $(call libcompile,src,includes)
|
||||
define libcompile
|
||||
$(LIBTOOL) --quiet --mode=compile \
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) \
|
||||
$(CXX) $(CXXFLAGS) \
|
||||
$(call libdepflags,$(basename $(call src_to_obj,$(1)))) \
|
||||
$(foreach I,$(2),-I$(I)) \
|
||||
$(CPPFLAGS) \
|
||||
-c $(1) -o $(call src_to_obj,$(1)); \
|
||||
$(call fixdeps,$(basename $(call src_to_obj,$(1))))
|
||||
endef
|
||||
@ -70,9 +73,10 @@ endef
|
||||
# Usage: $(call libcompile,src,includes)
|
||||
define c_libcompile
|
||||
$(LIBTOOL) --quiet --mode=compile \
|
||||
$(CC) $(CPPFLAGS) $(CXXFLAGS) \
|
||||
$(CC) $(CXXFLAGS) \
|
||||
$(call libdepflags,$(basename $(call c_src_to_obj,$(1)))) \
|
||||
$(foreach I,$(2),-I$(I)) \
|
||||
$(CPPFLAGS) \
|
||||
-c $(1) -o $(call c_src_to_obj,$(1)); \
|
||||
$(call fixdeps,$(basename $(call src_to_obj,$(1))))
|
||||
endef
|
||||
@ -90,14 +94,14 @@ endef
|
||||
define makelib
|
||||
$(LIBTOOL) --mode=link \
|
||||
$(CXX) $(CXXFLAGS) $(LD_VERSION_FLAGS) \
|
||||
-o $(2) $(1) $(3) $(4) \
|
||||
-o $(2) $(1) $(4) $(3) \
|
||||
-rpath $(libdir) -version-info $(5):$(6):$(7)
|
||||
endef
|
||||
|
||||
# 1 2 3 4
|
||||
# Usage: $(call makebin,objs,binary,ldflags,libs)
|
||||
define makebin
|
||||
$(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(1) -o $(2) $(3) $(4)
|
||||
$(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(1) -o $(2) $(4) $(3)
|
||||
endef
|
||||
|
||||
# Install target
|
||||
|
Loading…
Reference in New Issue
Block a user