mirror of
https://github.com/qpdf/qpdf.git
synced 2024-05-29 08:20:53 +00:00
6299c64cf3
Make sure to link from the source tree before linking from the system. In many environments, this is necessary to allow a newly built qpdf to link properly instead of trying to link or resolve libraries from an older installed version.
34 lines
1.1 KiB
Makefile
34 lines
1.1 KiB
Makefile
BINS_qpdf = qpdf test_driver pdf_from_scratch test_large_file
|
|
CBINS_qpdf = qpdf-ctest
|
|
|
|
TARGETS_qpdf = $(foreach B,$(BINS_qpdf) $(CBINS_qpdf),qpdf/$(OUTPUT_DIR)/$(call binname,$(B)))
|
|
|
|
$(TARGETS_qpdf): $(TARGETS_libqpdf)
|
|
|
|
INCLUDES_qpdf = include
|
|
|
|
TC_SRCS_qpdf = $(wildcard libqpdf/*.cc) $(wildcard qpdf/*.cc)
|
|
|
|
# -----
|
|
|
|
$(foreach B,$(BINS_qpdf),$(eval \
|
|
OBJS_$(B) = $(call src_to_obj,qpdf/$(B).cc)))
|
|
$(foreach B,$(CBINS_qpdf),$(eval \
|
|
OBJS_$(B) = $(call c_src_to_obj,qpdf/$(B).c)))
|
|
|
|
ifeq ($(GENDEPS),1)
|
|
-include $(foreach B,$(BINS_qpdf) $(CBINS_qpdf),$(call obj_to_dep,$(OBJS_$(B))))
|
|
endif
|
|
|
|
$(foreach B,$(BINS_qpdf),$(eval \
|
|
$(OBJS_$(B)): qpdf/$(OUTPUT_DIR)/%.$(OBJ): qpdf/$(B).cc ; \
|
|
$(call compile,qpdf/$(B).cc,$(INCLUDES_qpdf))))
|
|
|
|
$(foreach B,$(CBINS_qpdf),$(eval \
|
|
$(OBJS_$(B)): qpdf/$(OUTPUT_DIR)/%.$(OBJ): qpdf/$(B).c ; \
|
|
$(call c_compile,qpdf/$(B).c,$(INCLUDES_qpdf))))
|
|
|
|
$(foreach B,$(BINS_qpdf) $(CBINS_qpdf),$(eval \
|
|
qpdf/$(OUTPUT_DIR)/$(call binname,$(B)): $(OBJS_$(B)) ; \
|
|
$(call makebin,$(OBJS_$(B)),$$@,$(LDFLAGS_libqpdf) $(LDFLAGS),$(LIBS_libqpdf) $(LIBS))))
|