1DIST_SUBDIRS				+= @IVYKIS_SUBDIRS@ @JSON_SUBDIRS@
2
3include lib/ack-tracker/Makefile.am
4include lib/eventlog/src/Makefile.am
5include lib/eventlog/tests/Makefile.am
6include lib/transport/Makefile.am
7include lib/logproto/Makefile.am
8include lib/rewrite/Makefile.am
9include lib/parser/Makefile.am
10include lib/filter/Makefile.am
11include lib/template/Makefile.am
12include lib/value-pairs/Makefile.am
13include lib/stats/Makefile.am
14include lib/control/Makefile.am
15include lib/debugger/Makefile.am
16include lib/compat/Makefile.am
17include lib/logmsg/Makefile.am
18include lib/scanner/csv-scanner/Makefile.am
19include lib/scanner/list-scanner/Makefile.am
20include lib/scanner/kv-scanner/Makefile.am
21include lib/scanner/xml-scanner/Makefile.am
22include lib/str-repr/Makefile.am
23include lib/timeutils/Makefile.am
24include lib/secret-storage/Makefile.am
25include lib/logthrsource/Makefile.am
26include lib/logthrdest/Makefile.am
27include lib/signal-slot-connector/Makefile.am
28
29LSNG_RELEASE		= $(shell echo @PACKAGE_VERSION@ | cut -d. -f1,2)
30
31# * Start with version information of ‘0:0:0’ for each libtool
32#   library.
33# * Update the version information only immediately before a public
34#   release of your software. More frequent updates are unnecessary,
35#   and only guarantee that the current interface number gets larger
36#   faster.
37# * If the library source code has changed at all since the last
38#   update, then increment revision (‘c:r:a’ becomes ‘c:r+1:a’).
39# * If any interfaces have been added, removed, or changed since the
40#   last update, increment current, and set revision to 0.
41# * If any interfaces have been added since the last public release,
42#   then increment age.
43# * If any interfaces have been removed or changed since the last
44#   public release, then set age to 0.
45LSNG_CURRENT		= 0
46LSNG_REVISION		= 0
47LSNG_AGE		= 0
48
49lib_LTLIBRARIES				+= lib/libsyslog-ng.la
50lib_libsyslog_ng_la_LIBADD		= @CORE_DEPS_LIBS@ $(libsystemd_LIBS) $(top_builddir)/lib/secret-storage/libsecret-storage.la
51lib_libsyslog_ng_la_LDFLAGS		= -no-undefined -release ${LSNG_RELEASE} \
52					  -version-info ${LSNG_CURRENT}:${LSNG_REVISION}:${LSNG_AGE}
53
54lib_test_subdirs			= lib_filter lib_logproto lib_parser lib_rewrite lib_template lib_stats lib_control
55
56lib_libsyslog_ng_la_DEPENDENCIES       = lib/eventlog/src/libevtlog.la lib/secret-storage/libsecret-storage.la
57
58if IVYKIS_INTERNAL
59lib_libsyslog_ng_la_DEPENDENCIES	+= lib/ivykis/src/libivykis.la
60
61lib/ivykis/src/libivykis.la:
62	${MAKE} CFLAGS="${CFLAGS} -Wno-error" -C lib/ivykis
63
64CLEAN_SUBDIRS				+= @IVYKIS_SUBDIRS@
65
66EXTRA_DIST += \
67	lib/ivykis/configure.gnu	\
68	lib/CMakeLists.txt
69
70install-ivykis:
71	${MAKE} -C lib/ivykis/src \
72		install-includeHEADERS \
73		install-nodist_includeHEADERS \
74		includedir="${pkgincludedir}/ivykis"
75
76uninstall-ivykis:
77	${MAKE} -C lib/ivykis/src \
78		uninstall-includeHEADERS \
79		uninstall-nodist_includeHEADERS \
80		includedir="${pkgincludedir}/ivykis"
81
82INSTALL_EXEC_HOOKS			+= install-ivykis
83UNINSTALL_HOOKS				+= uninstall-ivykis
84endif
85
86
87
88if JSON_INTERNAL
89lib/jsonc/libjson-c.la:
90	${MAKE} CFLAGS="${CFLAGS} -Wno-error" -C lib/jsonc
91
92CLEAN_SUBDIRS				+= @JSON_SUBDIRS@
93endif
94
95# this is intentionally formatted so conflicts are less likely to arise. one name in every line.
96pkginclude_HEADERS			+= \
97	lib/afinter.h			\
98	lib/alarms.h			\
99	lib/apphook.h			\
100	lib/atomic.h			\
101	lib/atomic-gssize.h \
102	lib/block-ref-parser.h		\
103	lib/cache.h			\
104	lib/cfg.h			\
105	lib/cfg-grammar.h		\
106	lib/cfg-grammar-internal.h	\
107	lib/cfg-lexer.h			\
108	lib/cfg-lexer-subst.h		\
109	lib/cfg-args.h			\
110	lib/cfg-block.h			\
111	lib/cfg-block-generator.h	\
112	lib/cfg-parser.h		\
113	lib/cfg-path.h			\
114	lib/cfg-tree.h			\
115	lib/cfg-walker.h		\
116	lib/children.h			\
117	lib/crypto.h			\
118	lib/dnscache.h			\
119	lib/driver.h			\
120	lib/dynamic-window-pool.h \
121	lib/dynamic-window.h \
122	lib/fdhelpers.h			\
123	lib/file-perms.h		\
124	lib/find-crlf.h			\
125	lib/gprocess.h			\
126	lib/gsockaddr.h			\
127	lib/gsocket.h			\
128	lib/hostname.h			\
129	lib/host-resolve.h		\
130	lib/list-adt.h \
131	lib/logmatcher.h		\
132	lib/logmpx.h			\
133	lib/logpipe.h			\
134	lib/logqueue-fifo.h		\
135	lib/logqueue.h			\
136	lib/logreader.h			\
137	lib/logsource.h			\
138	lib/logwriter.h			\
139	lib/mainloop.h			\
140	lib/mainloop-call.h		\
141	lib/mainloop-worker.h		\
142	lib/mainloop-io-worker.h	\
143	lib/mainloop-control.h		\
144	lib/module-config.h		\
145	lib/memtrace.h			\
146	lib/messages.h			\
147	lib/ml-batched-timer.h		\
148	lib/msg-format.h		\
149	lib/msg-stats.h			\
150	lib/parse-number.h		\
151	lib/pathutils.h         \
152	lib/persist-state.h		\
153	lib/persistable-state-header.h  \
154	lib/persistable-state-presenter.h		\
155	lib/plugin.h			\
156	lib/plugin-types.h		\
157	lib/poll-events.h		\
158	lib/poll-fd-events.h		\
159	lib/pragma-parser.h		\
160	lib/presented-persistable-state.h			\
161	lib/reloc.h			\
162	lib/rcptid.h			\
163	lib/run-id.h			\
164	lib/scratch-buffers.h		\
165	lib/serialize.h			\
166	lib/service-management.h	\
167	lib/seqnum.h			\
168	lib/signal-handler.h		\
169	lib/str-format.h		\
170	lib/str-utils.h			\
171	lib/syslog-names.h		\
172	lib/syslog-ng.h			\
173	lib/misc.h                      \
174	lib/string-list.h		\
175	lib/tls-support.h		\
176	lib/thread-utils.h		\
177	lib/tlscontext.h  		\
178	lib/type-hinting.h		\
179	lib/uuid.h			\
180	lib/userdb.h			\
181	lib/utf8utils.h			\
182	lib/versioning.h		\
183	lib/ringbuffer.h		\
184	lib/host-id.h			\
185	lib/resolved-configurable-paths.h \
186	lib/pe-versioning.h \
187	lib/window-size-counter.h
188
189# this is intentionally formatted so conflicts are less likely to arise. one name in every line.
190lib_libsyslog_ng_la_SOURCES		= \
191	lib/afinter.c			\
192	lib/alarms.c			\
193	lib/apphook.c			\
194	lib/block-ref-parser.c		\
195	lib/cache.c			\
196	lib/cfg.c			\
197	lib/cfg-args.c			\
198	lib/cfg-block.c			\
199	lib/cfg-block-generator.c	\
200	lib/cfg-lexer.c			\
201	lib/cfg-lexer-subst.c		\
202	lib/cfg-parser.c		\
203	lib/cfg-path.c			\
204	lib/cfg-tree.c			\
205	lib/cfg-walker.c		\
206	lib/children.c			\
207	lib/dnscache.c			\
208	lib/driver.c			\
209	lib/dynamic-window.c \
210	lib/dynamic-window-pool.c \
211	lib/fdhelpers.c			\
212	lib/file-perms.c		\
213	lib/find-crlf.c			\
214	lib/globals.c			\
215	lib/gprocess.c			\
216	lib/gsockaddr.c			\
217	lib/gsocket.c			\
218	lib/hostname.c			\
219	lib/host-resolve.c		\
220	lib/logmatcher.c		\
221	lib/logmpx.c			\
222	lib/logpipe.c			\
223	lib/logqueue.c			\
224	lib/logqueue-fifo.c		\
225	lib/logreader.c			\
226	lib/logsource.c			\
227	lib/logwriter.c			\
228	lib/mainloop.c			\
229	lib/signal-handler.c		\
230	lib/mainloop-call.c		\
231	lib/mainloop-worker.c		\
232	lib/mainloop-io-worker.c	\
233	lib/mainloop-control.c		\
234	lib/module-config.c		\
235	lib/memtrace.c			\
236	lib/messages.c			\
237	lib/ml-batched-timer.c		\
238	lib/msg-format.c		\
239	lib/msg-stats.c			\
240	lib/parse-number.c		\
241	lib/pathutils.c         \
242	lib/persist-state.c		\
243	lib/plugin.c			\
244	lib/poll-events.c		\
245	lib/poll-fd-events.c		\
246	lib/pragma-parser.c		\
247	lib/persistable-state-presenter.c		\
248	lib/rcptid.c			\
249	lib/reloc.c			\
250	lib/run-id.c			\
251	lib/scratch-buffers.c		\
252	lib/serialize.c			\
253	lib/service-management.c	\
254	lib/str-format.c		\
255	lib/str-utils.c			\
256	lib/syslog-names.c		\
257	lib/string-list.c		\
258	lib/type-hinting.c		\
259	lib/ringbuffer.c		\
260	lib/crypto.c			\
261	lib/tlscontext.c		\
262	lib/uuid.c			\
263	lib/userdb.c			\
264	lib/utf8utils.c			\
265	$(transport_crypto_sources)	\
266	lib/host-id.c			\
267	lib/resolved-configurable-paths.c \
268	lib/window-size-counter.c       \
269	lib/cfg-lex.l			\
270	lib/cfg-grammar.y		\
271	lib/cfg-grammar-internal.c	\
272	lib/block-ref-grammar.y		\
273	lib/pragma-grammar.y		\
274	$(ack_tracker_sources) \
275	$(csvscanner_sources)		\
276	$(kvscanner_sources)		\
277	$(listscanner_sources)		\
278	$(xmlscanner_sources)		\
279	$(transport_sources)		\
280	$(logproto_sources)		\
281	$(filter_sources)		\
282	$(parser_sources)		\
283	$(rewrite_sources)		\
284	$(template_sources)		\
285	$(value_pairs_sources)		\
286	$(stats_sources)		\
287	$(control_sources)		\
288	$(debugger_sources)		\
289	$(compat_sources)     		\
290	$(logmsg_sources)		\
291	$(str_repr_sources)		\
292	$(timeutils_sources)		\
293	$(logthrsource_sources)		\
294	$(logthrdest_sources) \
295	$(signal_slot_connector_sources)
296
297lib_libsyslog_ng_la_CFLAGS		= \
298	$(AM_CFLAGS) \
299	$(libsystemd_CFLAGS)
300lib_libsyslog_ng_la_LIBADD		+= @OPENSSL_LIBS@
301
302# each line with closely related files (e.g. the ones generated from the same source)
303BUILT_SOURCES += lib/cfg-lex.c lib/cfg-lex.h						\
304	lib/cfg-grammar.c lib/cfg-grammar.h						\
305	lib/block-ref-grammar.y lib/block-ref-grammar.c lib/block-ref-grammar.h		\
306	lib/pragma-grammar.y lib/pragma-grammar.h lib/pragma-grammar.c
307
308EXTRA_DIST += \
309	lib/block-ref-grammar.ym	\
310	lib/pragma-grammar.ym		\
311	lib/merge-grammar.py		\
312	lib/hostname-unix.c
313
314lib/plugin-types.h: lib/cfg-grammar.h
315
316lib/ libsyslog-ng: lib/libsyslog-ng.la
317if IVYKIS_INTERNAL
318lib/ivykis/ ivykis: lib/ivykis/src/libivykis.la
319endif
320
321if JSON_INTERNAL
322lib/jsonc/ jsonc: lib/jsonc/libjson-c.la
323endif
324
325.PHONY: lib/ libsyslog-ng ivykis lib/ivykis/ lib/jsonc/ jsonc
326
327include lib/tests/Makefile.am
328