2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 19:08:59 +00:00
qpdf/examples/build.mk
Jay Berkenbilt d6d36b6ced C linearization example
git-svn-id: svn+q:///qpdf/trunk@739 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-09-27 20:59:16 +00:00

35 lines
1.0 KiB
Makefile

BINS_examples = pdf-bookmarks pdf-mod-info pdf-npages
CBINS_examples = pdf-linearize
TARGETS_examples = $(foreach B,$(BINS_examples) $(CBINS_examples),examples/$(OUTPUT_DIR)/$(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)/%.o: examples/$(B).cc ; \
$(call compile,examples/$(B).cc,$(INCLUDES_examples))))
$(foreach B,$(CBINS_examples),$(eval \
$(OBJS_$(B)): examples/$(OUTPUT_DIR)/%.o: examples/$(B).c ; \
$(call c_compile,examples/$(B).c,$(INCLUDES_examples))))
$(foreach B,$(BINS_examples) $(CBINS_examples),$(eval \
examples/$(OUTPUT_DIR)/$(B): $(OBJS_$(B)) ; \
$(call makebin,$(OBJS_$(B)),$$@)))