2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-11 07:30:57 +00:00
qpdf/examples/build.mk

54 lines
1.4 KiB
Makefile
Raw Normal View History

BINS_examples = \
2021-02-18 01:14:04 +00:00
pdf-attach-file \
pdf-bookmarks \
2020-12-26 16:13:00 +00:00
pdf-count-strings \
pdf-create \
pdf-custom-filter \
pdf-double-page-size \
2020-12-26 16:13:00 +00:00
pdf-filter-tokens \
2012-06-23 02:07:58 +00:00
pdf-invert-images \
2020-12-26 16:13:00 +00:00
pdf-mod-info \
pdf-name-number-tree \
2020-12-26 16:13:00 +00:00
pdf-npages \
pdf-overlay-page \
pdf-parse-content \
2019-01-26 22:33:06 +00:00
pdf-set-form-values \
2022-02-01 12:18:23 +00:00
pdf-split-pages \
qpdf-job
CBINS_examples = \
pdf-c-objects \
pdf-linearize \
qpdfjob-c
TARGETS_examples = $(foreach B,$(BINS_examples) $(CBINS_examples),examples/$(OUTPUT_DIR)/$(call binname,$(B)))
$(TARGETS_examples): $(TARGETS_qpdf)
INCLUDES_examples = include
TC_SRCS_examples = $(wildcard examples/*.cc)
# -----
$(foreach B,$(BINS_examples),$(eval \
OBJS_$(B) = $(call src_to_obj,examples/$(B).cc)))
$(foreach B,$(CBINS_examples),$(eval \
OBJS_$(B) = $(call c_src_to_obj,examples/$(B).c)))
ifeq ($(GENDEPS),1)
-include $(foreach B,$(BINS_examples) $(CBINS_examples),$(call obj_to_dep,$(OBJS_$(B))))
endif
$(foreach B,$(BINS_examples),$(eval \
$(OBJS_$(B)): examples/$(OUTPUT_DIR)/%.$(OBJ): examples/$(B).cc ; \
$(call compile,examples/$(B).cc,$(INCLUDES_examples))))
$(foreach B,$(CBINS_examples),$(eval \
$(OBJS_$(B)): examples/$(OUTPUT_DIR)/%.$(OBJ): examples/$(B).c ; \
$(call c_compile,examples/$(B).c,$(INCLUDES_examples))))
$(foreach B,$(BINS_examples) $(CBINS_examples),$(eval \
examples/$(OUTPUT_DIR)/$(call binname,$(B)): $(OBJS_$(B)) ; \
$(call makebin,$(OBJS_$(B)),$$@,$(LDFLAGS_libqpdf) $(LDFLAGS),$(LIBS_libqpdf) $(LIBS))))