1EXAMPLE_LDADD = libmongoc-1.0.la
2if EXPLICIT_LIBS
3EXAMPLE_LDADD += $(BSON_LIBS)
4endif
5EXAMPLE_CFLAGS = \
6	-I$(top_srcdir)/src/mongoc \
7	-I$(top_builddir)/src/mongoc \
8	$(BSON_CFLAGS)
9
10noinst_PROGRAMS += example-gridfs
11example_gridfs_SOURCES = examples/example-gridfs.c
12example_gridfs_CFLAGS = $(EXAMPLE_CFLAGS)
13example_gridfs_LDADD = $(EXAMPLE_LDADD)
14
15noinst_PROGRAMS += mongoc-dump
16mongoc_dump_SOURCES = examples/mongoc-dump.c
17mongoc_dump_CFLAGS = $(EXAMPLE_CFLAGS)
18mongoc_dump_LDADD = $(EXAMPLE_LDADD)
19
20noinst_PROGRAMS += filter-bsondump
21filter_bsondump_SOURCES = examples/filter-bsondump.c
22filter_bsondump_CFLAGS = -Wno-deprecated-declarations $(EXAMPLE_CFLAGS)
23filter_bsondump_LDADD = $(EXAMPLE_LDADD)
24
25noinst_PROGRAMS += example-command-monitoring
26example_command_monitoring_SOURCES = examples/example-command-monitoring.c
27example_command_monitoring_CFLAGS = $(EXAMPLE_CFLAGS)
28example_command_monitoring_LDADD = $(EXAMPLE_LDADD)
29
30noinst_PROGRAMS += example-sdam-monitoring
31example_sdam_monitoring_SOURCES = examples/example-sdam-monitoring.c
32example_sdam_monitoring_CFLAGS = $(EXAMPLE_CFLAGS)
33example_sdam_monitoring_LDADD = $(EXAMPLE_LDADD)
34
35noinst_PROGRAMS += example-client
36example_client_SOURCES = examples/example-client.c
37example_client_CFLAGS = $(EXAMPLE_CFLAGS)
38example_client_LDADD = $(EXAMPLE_LDADD)
39
40noinst_PROGRAMS += example-create-indexes
41example_create_indexes_SOURCES = examples/example-create-indexes.c
42example_create_indexes_CFLAGS = $(EXAMPLE_CFLAGS)
43example_create_indexes_LDADD = $(EXAMPLE_LDADD)
44
45EXAMPLE_POOL_LDADD =
46EXAMPLE_POOL_CFLAGS =
47if EXPLICIT_LIBS
48EXAMPLE_POOL_LDADD += $(PTHREAD_LIBS)
49EXAMPLE_POOL_CFLAGS += $(PTHREAD_CFLAGS)
50endif
51
52noinst_PROGRAMS += example-pool
53example_pool_SOURCES = examples/example-pool.c
54example_pool_CFLAGS = $(EXAMPLE_CFLAGS) $(EXAMPLE_POOL_CFLAGS)
55example_pool_LDADD = $(EXAMPLE_LDADD) $(EXAMPLE_POOL_LDADD)
56
57noinst_PROGRAMS += example-command-with-opts
58example_command_with_opts_SOURCES = examples/example-command-with-opts.c
59example_command_with_opts_CFLAGS = $(EXAMPLE_CFLAGS)
60example_command_with_opts_LDADD = $(EXAMPLE_LDADD)
61
62noinst_PROGRAMS += example-scram
63example_scram_SOURCES = examples/example-scram.c
64example_scram_CFLAGS = $(EXAMPLE_CFLAGS)
65example_scram_LDADD = $(EXAMPLE_LDADD)
66
67noinst_PROGRAMS += mongoc-ping
68mongoc_ping_SOURCES = examples/mongoc-ping.c
69mongoc_ping_CFLAGS = $(EXAMPLE_CFLAGS)
70mongoc_ping_LDADD = $(EXAMPLE_LDADD)
71
72noinst_PROGRAMS += mongoc-tail
73mongoc_tail_SOURCES = examples/mongoc-tail.c
74mongoc_tail_CFLAGS = $(EXAMPLE_CFLAGS)
75mongoc_tail_LDADD = $(EXAMPLE_LDADD)
76
77noinst_PROGRAMS += find-and-modify
78find_and_modify_SOURCES = examples/find-and-modify.c
79find_and_modify_CFLAGS = $(EXAMPLE_CFLAGS)
80find_and_modify_LDADD = $(EXAMPLE_LDADD)
81
82noinst_PROGRAMS += example-matcher
83example_matcher_SOURCES = examples/example-matcher.c
84example_matcher_CFLAGS = -Wno-deprecated-declarations $(EXAMPLE_CFLAGS)
85example_matcher_LDADD = $(EXAMPLE_LDADD)
86
87noinst_PROGRAMS += bulk1
88bulk1_SOURCES = examples/bulk/bulk1.c
89bulk1_CFLAGS = $(EXAMPLE_CFLAGS)
90bulk1_LDADD = $(EXAMPLE_LDADD)
91
92noinst_PROGRAMS += bulk2
93bulk2_SOURCES = examples/bulk/bulk2.c
94bulk2_CFLAGS = $(EXAMPLE_CFLAGS)
95bulk2_LDADD = $(EXAMPLE_LDADD)
96
97noinst_PROGRAMS += bulk3
98bulk3_SOURCES = examples/bulk/bulk3.c
99bulk3_CFLAGS = $(EXAMPLE_CFLAGS)
100bulk3_LDADD = $(EXAMPLE_LDADD)
101
102noinst_PROGRAMS += bulk4
103bulk4_SOURCES = examples/bulk/bulk4.c
104bulk4_CFLAGS = $(EXAMPLE_CFLAGS)
105bulk4_LDADD = $(EXAMPLE_LDADD)
106
107noinst_PROGRAMS += bulk5
108bulk5_SOURCES = examples/bulk/bulk5.c
109bulk5_CFLAGS = $(EXAMPLE_CFLAGS)
110bulk5_LDADD = $(EXAMPLE_LDADD)
111
112noinst_PROGRAMS += bulk6
113bulk6_SOURCES = examples/bulk/bulk6.c
114bulk6_CFLAGS = $(EXAMPLE_CFLAGS)
115bulk6_LDADD = $(EXAMPLE_LDADD)
116
117noinst_PROGRAMS += bulk-collation
118bulk_collation_SOURCES = examples/bulk/bulk-collation.c
119bulk_collation_CFLAGS = $(EXAMPLE_CFLAGS)
120bulk_collation_LDADD = $(EXAMPLE_LDADD)
121
122noinst_PROGRAMS += aggregation1
123aggregation1_SOURCES = examples/aggregation/aggregation1.c
124aggregation1_CFLAGS = $(EXAMPLE_CFLAGS)
125aggregation1_LDADD = $(EXAMPLE_LDADD)
126
127noinst_PROGRAMS += fam
128fam_SOURCES = examples/find_and_modify_with_opts/fam.c
129fam_CFLAGS = $(EXAMPLE_CFLAGS)
130fam_LDADD = $(EXAMPLE_LDADD)
131
132EXTRA_DIST += \
133	examples/doc-common-insert.c \
134	examples/basic_aggregation/map-reduce-basic.c \
135	examples/basic_aggregation/map-reduce-advanced.c \
136	examples/basic_aggregation/distinct.c \
137	examples/basic_aggregation/basic-aggregation.c \
138	examples/basic_aggregation/constants.c \
139	examples/common_operations/explain.c \
140	examples/common_operations/copydb.c \
141	examples/common_operations/common-operations.c \
142	examples/common_operations/clone-collection.c \
143	examples/find_and_modify_with_opts/bypass.c \
144	examples/find_and_modify_with_opts/fields.c \
145	examples/find_and_modify_with_opts/flags.c \
146	examples/find_and_modify_with_opts/opts.c \
147	examples/find_and_modify_with_opts/sort.c \
148	examples/find_and_modify_with_opts/update.c
149
150# These files are included when we generate docs from tutorial.rst
151EXTRA_DIST += \
152	examples/hello_mongoc.c \
153	examples/compile-with-pkg-config.sh \
154	examples/compile-with-pkg-config-static.sh \
155	examples/cmake/find_package/CMakeLists.txt \
156	examples/cmake/find_package_static/CMakeLists.txt
157