chiark / gitweb /
Add new function to filter fstab options
[elogind.git] / Makefile.am
1 #  -*- Mode: makefile; indent-tabs-mode: t -*-
2 #
3 #  This file is part of systemd.
4 #
5 #  Copyright 2010-2012 Lennart Poettering
6 #  Copyright 2010-2012 Kay Sievers
7 #  Copyright 2013 Zbigniew JÄ™drzejewski-Szmek
8 #  Copyright 2013 David Strauss
9 #
10 #  systemd is free software; you can redistribute it and/or modify it
11 #  under the terms of the GNU Lesser General Public License as published by
12 #  the Free Software Foundation; either version 2.1 of the License, or
13 #  (at your option) any later version.
14 #
15 #  systemd is distributed in the hope that it will be useful, but
16 #  WITHOUT ANY WARRANTY; without even the implied warranty of
17 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 #  Lesser General Public License for more details.
19 #
20 #  You should have received a copy of the GNU Lesser General Public License
21 #  along with systemd; If not, see <http://www.gnu.org/licenses/>.
22
23 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
24 AM_MAKEFLAGS = --no-print-directory
25 AUTOMAKE_OPTIONS = color-tests parallel-tests
26
27 GCC_COLORS ?= 'ooh, shiny!'
28 export GCC_COLORS
29
30 SUBDIRS = . po
31
32 # remove targets if the command fails
33 .DELETE_ON_ERROR:
34
35 # keep intermediate files
36 .SECONDARY:
37
38 # Keep the test-suite.log
39 .PRECIOUS: $(TEST_SUITE_LOG) Makefile
40
41 LIBUDEV_CURRENT=7
42 LIBUDEV_REVISION=2
43 LIBUDEV_AGE=6
44
45 LIBGUDEV_CURRENT=2
46 LIBGUDEV_REVISION=0
47 LIBGUDEV_AGE=2
48
49 LIBSYSTEMD_CURRENT=5
50 LIBSYSTEMD_REVISION=1
51 LIBSYSTEMD_AGE=5
52
53 # The following four libraries only exist for compatibility reasons,
54 # their version info should not be bumped anymore
55 LIBSYSTEMD_LOGIN_CURRENT=9
56 LIBSYSTEMD_LOGIN_REVISION=3
57 LIBSYSTEMD_LOGIN_AGE=9
58
59 LIBSYSTEMD_DAEMON_CURRENT=0
60 LIBSYSTEMD_DAEMON_REVISION=12
61 LIBSYSTEMD_DAEMON_AGE=0
62
63 LIBSYSTEMD_ID128_CURRENT=0
64 LIBSYSTEMD_ID128_REVISION=28
65 LIBSYSTEMD_ID128_AGE=0
66
67 LIBSYSTEMD_JOURNAL_CURRENT=11
68 LIBSYSTEMD_JOURNAL_REVISION=5
69 LIBSYSTEMD_JOURNAL_AGE=11
70
71 # Dirs of external packages
72 dbuspolicydir=@dbuspolicydir@
73 dbussessionservicedir=@dbussessionservicedir@
74 dbussystemservicedir=@dbussystemservicedir@
75 pamlibdir=@pamlibdir@
76 pamconfdir=@pamconfdir@
77 pkgconfiglibdir=$(libdir)/pkgconfig
78 polkitpolicydir=$(datadir)/polkit-1/actions
79 bashcompletiondir=@bashcompletiondir@
80 zshcompletiondir=@zshcompletiondir@
81 rpmmacrosdir=$(prefix)/lib/rpm/macros.d
82 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
83 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
84 varlogdir=$(localstatedir)/log
85 systemdstatedir=$(localstatedir)/lib/systemd
86 catalogstatedir=$(systemdstatedir)/catalog
87 xinitrcdir=$(sysconfdir)/X11/xinit/xinitrc.d
88
89 # Our own, non-special dirs
90 pkgsysconfdir=$(sysconfdir)/systemd
91 userunitdir=$(prefix)/lib/systemd/user
92 userpresetdir=$(prefix)/lib/systemd/user-preset
93 tmpfilesdir=$(prefix)/lib/tmpfiles.d
94 sysusersdir=$(prefix)/lib/sysusers.d
95 sysctldir=$(prefix)/lib/sysctl.d
96 binfmtdir=$(prefix)/lib/binfmt.d
97 modulesloaddir=$(prefix)/lib/modules-load.d
98 networkdir=$(rootprefix)/lib/systemd/network
99 pkgincludedir=$(includedir)/systemd
100 systemgeneratordir=$(rootlibexecdir)/system-generators
101 usergeneratordir=$(prefix)/lib/systemd/user-generators
102 systemshutdowndir=$(rootlibexecdir)/system-shutdown
103 systemsleepdir=$(rootlibexecdir)/system-sleep
104 systemunitdir=$(rootprefix)/lib/systemd/system
105 systempresetdir=$(rootprefix)/lib/systemd/system-preset
106 udevlibexecdir=$(rootprefix)/lib/udev
107 udevhomedir=$(udevlibexecdir)
108 udevrulesdir=$(udevlibexecdir)/rules.d
109 udevhwdbdir=$(udevlibexecdir)/hwdb.d
110 catalogdir=$(prefix)/lib/systemd/catalog
111 kernelinstalldir = $(prefix)/lib/kernel/install.d
112 factory_etcdir = $(prefix)/share/factory/etc
113 factory_pamdir = $(prefix)/share/factory/etc/pam.d
114
115 # And these are the special ones for /
116 rootprefix=@rootprefix@
117 rootbindir=$(rootprefix)/bin
118 rootlibexecdir=$(rootprefix)/lib/systemd
119
120 CLEANFILES = $(BUILT_SOURCES)
121 DISTCLEANFILES =
122 EXTRA_DIST =
123 BUILT_SOURCES =
124 INSTALL_EXEC_HOOKS =
125 UNINSTALL_EXEC_HOOKS =
126 INSTALL_DATA_HOOKS =
127 UNINSTALL_DATA_HOOKS =
128 DISTCLEAN_LOCAL_HOOKS =
129 CLEAN_LOCAL_HOOKS =
130 pkginclude_HEADERS =
131 noinst_LTLIBRARIES =
132 lib_LTLIBRARIES =
133 include_HEADERS =
134 noinst_DATA =
135 pkgconfiglib_DATA =
136 polkitpolicy_in_in_files =
137 polkitpolicy_in_files =
138 polkitpolicy_files =
139 dist_udevrules_DATA =
140 nodist_udevrules_DATA =
141 dist_pkgsysconf_DATA =
142 nodist_pkgsysconf_DATA =
143 dist_pkgdata_DATA =
144 dist_dbuspolicy_DATA =
145 dist_dbussystemservice_DATA =
146 dist_systemunit_DATA_busnames =
147 check_PROGRAMS =
148 check_DATA =
149 tests=
150 manual_tests =
151 if ENABLE_TESTS
152 noinst_PROGRAMS = $(manual_tests) $(tests)
153 TESTS = $(tests)
154 else
155 noinst_PROGRAMS =
156 TESTS =
157 endif
158 udevlibexec_PROGRAMS =
159
160 .PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
161         $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
162         $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
163
164 AM_CPPFLAGS = \
165         -include $(top_builddir)/config.h \
166         -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
167         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
168         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
169         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
170         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
171         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
172         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
173         -DCERTIFICATE_ROOT=\"$(CERTIFICATEROOT)\" \
174         -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
175         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
176         -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
177         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
178         -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
179         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
180         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
181         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
182         -DROOTPREFIX=\"$(rootprefix)\" \
183         -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" \
184         -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \
185         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
186         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
187         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
188         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
189         -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
190         -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
191         -DX_SERVER=\"$(bindir)/X\" \
192         -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
193         -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
194         -DQUOTACHECK=\"$(QUOTACHECK)\" \
195         -DKEXEC=\"$(KEXEC)\" \
196         -DLIBDIR=\"$(libdir)\" \
197         -DROOTLIBDIR=\"$(rootlibdir)\" \
198         -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
199         -I $(top_srcdir)/src \
200         -I $(top_builddir)/src/shared \
201         -I $(top_srcdir)/src/shared \
202         -I $(top_srcdir)/src/network \
203         -I $(top_srcdir)/src/login \
204         -I $(top_srcdir)/src/journal \
205         -I $(top_srcdir)/src/timedate \
206         -I $(top_srcdir)/src/timesync \
207         -I $(top_srcdir)/src/resolve \
208         -I $(top_builddir)/src/resolve \
209         -I $(top_srcdir)/src/systemd \
210         -I $(top_builddir)/src/core \
211         -I $(top_srcdir)/src/core \
212         -I $(top_srcdir)/src/libudev \
213         -I $(top_srcdir)/src/udev \
214         -I $(top_srcdir)/src/udev/net \
215         -I $(top_builddir)/src/udev \
216         -I $(top_srcdir)/src/libsystemd/sd-bus \
217         -I $(top_srcdir)/src/libsystemd/sd-event \
218         -I $(top_srcdir)/src/libsystemd/sd-rtnl \
219         -I $(top_srcdir)/src/libsystemd/sd-network \
220         -I $(top_srcdir)/src/libsystemd/sd-hwdb \
221         -I $(top_srcdir)/src/libsystemd-network \
222         -I $(top_srcdir)/src/libsystemd-terminal \
223         $(OUR_CPPFLAGS)
224
225 AM_CFLAGS = $(OUR_CFLAGS)
226 AM_LDFLAGS = $(OUR_LDFLAGS)
227
228 # ------------------------------------------------------------------------------
229 define move-to-rootlibdir
230         if test "$(libdir)" != "$(rootlibdir)"; then \
231                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
232                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
233                 rm -f $(DESTDIR)$(libdir)/$$libname && \
234                 $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
235                 mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
236         fi
237 endef
238
239 INSTALL_DIRS =
240
241 RUNLEVEL1_TARGET_WANTS =
242 RUNLEVEL2_TARGET_WANTS =
243 RUNLEVEL3_TARGET_WANTS =
244 RUNLEVEL4_TARGET_WANTS =
245 RUNLEVEL5_TARGET_WANTS =
246 SHUTDOWN_TARGET_WANTS =
247 LOCAL_FS_TARGET_WANTS =
248 MULTI_USER_TARGET_WANTS =
249 SYSINIT_TARGET_WANTS =
250 SOCKETS_TARGET_WANTS =
251 BUSNAMES_TARGET_WANTS =
252 TIMERS_TARGET_WANTS =
253 USER_SOCKETS_TARGET_WANTS =
254 USER_DEFAULT_TARGET_WANTS =
255 USER_BUSNAMES_TARGET_WANTS =
256
257 SYSTEM_UNIT_ALIASES =
258 USER_UNIT_ALIASES =
259 GENERAL_ALIASES =
260
261 install-target-wants-hook:
262         what="$(RUNLEVEL1_TARGET_WANTS)" && wants=runlevel1.target && dir=$(systemunitdir) && $(add-wants)
263         what="$(RUNLEVEL2_TARGET_WANTS)" && wants=runlevel2.target && dir=$(systemunitdir) && $(add-wants)
264         what="$(RUNLEVEL3_TARGET_WANTS)" && wants=runlevel3.target && dir=$(systemunitdir) && $(add-wants)
265         what="$(RUNLEVEL4_TARGET_WANTS)" && wants=runlevel4.target && dir=$(systemunitdir) && $(add-wants)
266         what="$(RUNLEVEL5_TARGET_WANTS)" && wants=runlevel5.target && dir=$(systemunitdir) && $(add-wants)
267         what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && dir=$(systemunitdir) && $(add-wants)
268         what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && dir=$(systemunitdir) && $(add-wants)
269         what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
270         what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
271         what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
272         what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
273         what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
274         what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
275         what="$(USER_DEFAULT_TARGET_WANTS)" && wants=default.target && dir=$(userunitdir) && $(add-wants)
276
277 install-busnames-target-wants-hook:
278         what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
279         what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
280
281 define add-wants
282         [ -z "$$what" ] || ( \
283           dir=$(DESTDIR)$$dir/$$wants.wants && \
284           $(MKDIR_P) -m 0755 $$dir && \
285           cd $$dir && \
286           rm -f $$what && \
287           for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
288 endef
289
290 install-directories-hook:
291         $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
292
293 install-aliases-hook:
294         set -- $(SYSTEM_UNIT_ALIASES) && \
295                 dir=$(systemunitdir) && $(install-aliases)
296         set -- $(USER_UNIT_ALIASES) && \
297                 dir=$(userunitdir) && $(install-relative-aliases)
298         set -- $(GENERAL_ALIASES) && \
299                 dir= && $(install-relative-aliases)
300
301 define install-aliases
302         while [ -n "$$1" ]; do \
303                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
304                 rm -f $(DESTDIR)$$dir/$$2 && \
305                 $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
306                 shift 2 || exit $$?; \
307         done
308 endef
309
310 define install-relative-aliases
311         while [ -n "$$1" ]; do \
312                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
313                 rm -f $(DESTDIR)$$dir/$$2 && \
314                 $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
315                 shift 2 || exit $$?; \
316         done
317 endef
318
319 install-touch-usr-hook:
320         touch -c $(DESTDIR)/$(prefix)
321
322 INSTALL_EXEC_HOOKS += \
323         install-target-wants-hook \
324         install-directories-hook \
325         install-aliases-hook \
326         install-touch-usr-hook
327
328 if ENABLE_KDBUS
329 INSTALL_EXEC_HOOKS += \
330         install-busnames-target-wants-hook
331 endif
332
333 # ------------------------------------------------------------------------------
334 AM_V_M4 = $(AM_V_M4_$(V))
335 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
336 AM_V_M4_0 = @echo "  M4      " $@;
337
338 AM_V_XSLT = $(AM_V_XSLT_$(V))
339 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
340 AM_V_XSLT_0 = @echo "  XSLT    " $@;
341
342 AM_V_GPERF = $(AM_V_GPERF_$(V))
343 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
344 AM_V_GPERF_0 = @echo "  GPERF   " $@;
345
346 AM_V_LN = $(AM_V_LN_$(V))
347 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
348 AM_V_LN_0 = @echo "  LN      " $@;
349
350 AM_V_RM = $(AM_V_RM_$(V))
351 AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY))
352 AM_V_RM_0 = @echo "  RM      " $@;
353
354 # ------------------------------------------------------------------------------
355 rootbin_PROGRAMS = \
356         systemctl \
357         systemd-notify \
358         systemd-ask-password \
359         systemd-tty-ask-password-agent \
360         systemd-machine-id-setup \
361         systemd-escape
362
363 bin_PROGRAMS = \
364         systemd-cgls \
365         systemd-cgtop \
366         systemd-nspawn \
367         systemd-detect-virt \
368         systemd-delta \
369         systemd-analyze \
370         systemd-run \
371         systemd-path
372
373 dist_bin_SCRIPTS = \
374         src/kernel-install/kernel-install
375
376 dist_kernelinstall_SCRIPTS = \
377         src/kernel-install/50-depmod.install \
378         src/kernel-install/90-loaderentry.install
379
380 rootlibexec_PROGRAMS = \
381         systemd \
382         systemd-cgroups-agent \
383         systemd-initctl \
384         systemd-shutdownd \
385         systemd-shutdown \
386         systemd-remount-fs \
387         systemd-reply-password \
388         systemd-fsck \
389         systemd-machine-id-commit \
390         systemd-ac-power \
391         systemd-sysctl \
392         systemd-sleep \
393         systemd-bus-proxyd \
394         systemd-socket-proxyd \
395         systemd-update-done
396
397 if HAVE_UTMP
398 rootlibexec_PROGRAMS += \
399         systemd-update-utmp
400 endif
401
402 systemgenerator_PROGRAMS = \
403         systemd-getty-generator \
404         systemd-fstab-generator \
405         systemd-system-update-generator \
406         systemd-debug-generator
407
408 dist_bashcompletion_DATA = \
409         shell-completion/bash/busctl \
410         shell-completion/bash/journalctl \
411         shell-completion/bash/systemd-analyze \
412         shell-completion/bash/systemd-cat \
413         shell-completion/bash/systemd-cgls \
414         shell-completion/bash/systemd-cgtop \
415         shell-completion/bash/systemd-delta \
416         shell-completion/bash/systemd-detect-virt \
417         shell-completion/bash/systemd-nspawn \
418         shell-completion/bash/systemd-run \
419         shell-completion/bash/udevadm \
420         shell-completion/bash/kernel-install
421
422 nodist_bashcompletion_DATA = \
423         shell-completion/bash/systemctl
424
425 dist_zshcompletion_DATA = \
426         shell-completion/zsh/_journalctl \
427         shell-completion/zsh/_udevadm \
428         shell-completion/zsh/_kernel-install \
429         shell-completion/zsh/_systemd-nspawn \
430         shell-completion/zsh/_systemd-analyze \
431         shell-completion/zsh/_systemd-run \
432         shell-completion/zsh/_sd_hosts_or_user_at_host \
433         shell-completion/zsh/_sd_outputmodes \
434         shell-completion/zsh/_sd_unit_files \
435         shell-completion/zsh/_systemd-delta \
436         shell-completion/zsh/_systemd
437
438 nodist_zshcompletion_DATA = \
439         shell-completion/zsh/_systemctl
440
441 EXTRA_DIST += \
442         shell-completion/bash/systemctl.in \
443         shell-completion/zsh/_systemctl.in
444
445 CLEANFILES += \
446         $(nodist_bashcompletion_DATA) \
447         $(nodist_zshcompletion_DATA)
448
449 dist_sysctl_DATA = \
450         sysctl.d/50-default.conf
451
452 dist_systemunit_DATA = \
453         units/graphical.target \
454         units/multi-user.target \
455         units/emergency.target \
456         units/sysinit.target \
457         units/basic.target \
458         units/getty.target \
459         units/halt.target \
460         units/kexec.target \
461         units/local-fs.target \
462         units/local-fs-pre.target \
463         units/initrd.target \
464         units/initrd-fs.target \
465         units/initrd-root-fs.target \
466         units/remote-fs.target \
467         units/remote-fs-pre.target \
468         units/network.target \
469         units/network-pre.target \
470         units/network-online.target \
471         units/nss-lookup.target \
472         units/nss-user-lookup.target \
473         units/poweroff.target \
474         units/reboot.target \
475         units/rescue.target \
476         units/rpcbind.target \
477         units/time-sync.target \
478         units/shutdown.target \
479         units/final.target \
480         units/umount.target \
481         units/sigpwr.target \
482         units/sleep.target \
483         units/sockets.target \
484         units/timers.target \
485         units/paths.target \
486         units/suspend.target \
487         units/swap.target \
488         units/slices.target \
489         units/system.slice \
490         units/x-.slice \
491         units/systemd-initctl.socket \
492         units/systemd-shutdownd.socket \
493         units/syslog.socket \
494         units/dev-hugepages.mount \
495         units/dev-mqueue.mount \
496         units/sys-kernel-config.mount \
497         units/sys-kernel-debug.mount \
498         units/sys-fs-fuse-connections.mount \
499         units/tmp.mount \
500         units/printer.target \
501         units/sound.target \
502         units/bluetooth.target \
503         units/smartcard.target \
504         units/systemd-ask-password-wall.path \
505         units/systemd-ask-password-console.path \
506         units/systemd-udevd-control.socket \
507         units/systemd-udevd-kernel.socket \
508         units/system-update.target \
509         units/initrd-switch-root.target \
510         units/machines.target
511
512 if ENABLE_KDBUS
513 dist_systemunit_DATA += \
514         $(dist_systemunit_DATA_busnames)
515 endif
516
517 dist_systemunit_DATA_busnames += \
518         units/busnames.target
519
520 nodist_systemunit_DATA = \
521         units/getty@.service \
522         units/serial-getty@.service \
523         units/console-shell.service \
524         units/console-getty.service \
525         units/container-getty@.service \
526         units/systemd-initctl.service \
527         units/systemd-shutdownd.service \
528         units/systemd-remount-fs.service \
529         units/systemd-ask-password-wall.service \
530         units/systemd-ask-password-console.service \
531         units/systemd-sysctl.service \
532         units/emergency.service \
533         units/rescue.service \
534         units/user@.service \
535         units/systemd-suspend.service \
536         units/systemd-halt.service \
537         units/systemd-poweroff.service \
538         units/systemd-reboot.service \
539         units/systemd-kexec.service \
540         units/systemd-fsck@.service \
541         units/systemd-fsck-root.service \
542         units/systemd-machine-id-commit.service \
543         units/systemd-udevd.service \
544         units/systemd-udev-trigger.service \
545         units/systemd-udev-settle.service \
546         units/systemd-hwdb-update.service \
547         units/debug-shell.service \
548         units/initrd-parse-etc.service \
549         units/initrd-cleanup.service \
550         units/initrd-udevadm-cleanup-db.service \
551         units/initrd-switch-root.service \
552         units/systemd-nspawn@.service \
553         units/systemd-update-done.service
554
555 if HAVE_UTMP
556 nodist_systemunit_DATA += \
557         units/systemd-update-utmp.service \
558         units/systemd-update-utmp-runlevel.service
559 endif
560
561 dist_userunit_DATA = \
562         units/user/basic.target \
563         units/user/default.target \
564         units/user/exit.target
565
566 nodist_userunit_DATA = \
567         units/user/systemd-exit.service
568
569 dist_systempreset_DATA = \
570         system-preset/90-systemd.preset
571
572 EXTRA_DIST += \
573         units/getty@.service.m4 \
574         units/serial-getty@.service.m4 \
575         units/console-shell.service.m4.in \
576         units/console-getty.service.m4.in \
577         units/container-getty@.service.m4.in \
578         units/rescue.service.in \
579         units/systemd-initctl.service.in \
580         units/systemd-shutdownd.service.in \
581         units/systemd-remount-fs.service.in \
582         units/systemd-update-utmp.service.in \
583         units/systemd-update-utmp-runlevel.service.in \
584         units/systemd-ask-password-wall.service.in \
585         units/systemd-ask-password-console.service.in \
586         units/systemd-sysctl.service.in \
587         units/emergency.service.in \
588         units/systemd-halt.service.in \
589         units/systemd-poweroff.service.in \
590         units/systemd-reboot.service.in \
591         units/systemd-kexec.service.in \
592         units/user/systemd-exit.service.in \
593         units/systemd-fsck@.service.in \
594         units/systemd-fsck-root.service.in \
595         units/systemd-machine-id-commit.service.in \
596         units/user@.service.m4.in \
597         units/debug-shell.service.in \
598         units/systemd-suspend.service.in \
599         units/quotaon.service.in \
600         units/initrd-parse-etc.service.in \
601         units/initrd-cleanup.service.in \
602         units/initrd-udevadm-cleanup-db.service.in \
603         units/initrd-switch-root.service.in \
604         units/systemd-nspawn@.service.in \
605         units/systemd-update-done.service.in
606
607 CLEANFILES += \
608         units/console-shell.service.m4 \
609         units/console-getty.service.m4 \
610         units/container-getty@.service.m4 \
611         units/user@.service.m4
612
613 if HAVE_SYSV_COMPAT
614 nodist_systemunit_DATA += \
615         units/rc-local.service \
616         units/halt-local.service
617
618 systemgenerator_PROGRAMS += \
619         systemd-sysv-generator \
620         systemd-rc-local-generator
621 endif
622
623 EXTRA_DIST += \
624         units/rc-local.service.in \
625         units/halt-local.service.in
626
627 # automake is broken and can't handle files with a dash in front
628 # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14728#8
629 units-install-hook:
630         mv $(DESTDIR)$(systemunitdir)/x-.slice $(DESTDIR)/$(systemunitdir)/-.slice
631
632 units-uninstall-hook:
633         rm -f $(DESTDIR)/$(systemunitdir)/-.slice
634
635 INSTALL_DATA_HOOKS += units-install-hook
636 UNINSTALL_DATA_HOOKS += units-uninstall-hook
637
638 dist_doc_DATA = \
639         README \
640         NEWS \
641         LICENSE.LGPL2.1 \
642         LICENSE.GPL2 \
643         LICENSE.MIT \
644         DISTRO_PORTING \
645         src/libsystemd/sd-bus/PORTING-DBUS1 \
646         src/libsystemd/sd-bus/DIFFERENCES \
647         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
648
649 @INTLTOOL_POLICY_RULE@
650
651 # ------------------------------------------------------------------------------
652
653 MANPAGES =
654 MANPAGES_ALIAS =
655
656 include Makefile-man.am
657
658 .PHONY: man update-man-list
659 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
660
661 XML_FILES = \
662         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
663 HTML_FILES = \
664         ${XML_FILES:.xml=.html}
665 HTML_ALIAS = \
666         ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
667
668 if ENABLE_MANPAGES
669 man_MANS = \
670         $(MANPAGES) \
671         $(MANPAGES_ALIAS)
672
673 noinst_DATA += \
674         $(HTML_FILES) \
675         $(HTML_ALIAS)
676
677 CLEANFILES += \
678         $(man_MANS) \
679         $(HTML_FILES) \
680         $(HTML_ALIAS)
681
682 docs/html/man:
683         $(AM_V_at)$(MKDIR_P) $(dir $@)
684         $(AM_V_LN)$(LN_S) -f ../../man $@
685
686 noinst_DATA += \
687         docs/html/man
688
689 CLEANFILES += \
690         docs/html/man
691
692 if HAVE_PYTHON
693 man/index.html: man/systemd.index.html
694         $(AM_V_LN)$(LN_S) -f systemd.index.html $@
695
696 noinst_DATA += \
697         man/index.html
698
699 CLEANFILES += \
700         man/index.html
701
702 XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_builddir)/man/*.xml)
703 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
704 SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
705
706 update-man-list: $(top_srcdir)/tools/make-man-rules.py $(XML_GLOB)
707         $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
708         $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
709         @echo "Makefile-man.am has been regenerated"
710
711 man/systemd.index.xml: $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES)
712         $(AM_V_at)$(MKDIR_P) $(dir $@)
713         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
714
715 man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py $(SOURCE_XML_FILES)
716         $(AM_V_at)$(MKDIR_P) $(dir $@)
717         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
718
719 EXTRA_DIST += \
720         man/systemd.index.xml \
721         man/index.html \
722         man/systemd.directives.xml \
723         man/glib-event-glue.c
724
725 CLEANFILES += \
726         man/systemd.index.xml \
727         man/systemd.directives.xml
728
729 endif
730
731 endif
732
733 EXTRA_DIST += \
734         $(XML_FILES) \
735         $(HTML_FILES) \
736         $(HTML_ALIAS) \
737         $(man_MANS) \
738         tools/make-man-index.py \
739         tools/make-directive-index.py \
740         tools/xml_helper.py
741
742 # ------------------------------------------------------------------------------
743 noinst_LTLIBRARIES += \
744         libsystemd-shared.la
745
746 libsystemd_shared_la_SOURCES = \
747         src/shared/capability.c \
748         src/shared/capability.h \
749         src/shared/linux/auto_dev-ioctl.h \
750         src/shared/ioprio.h \
751         src/shared/missing.h \
752         src/shared/initreq.h \
753         src/shared/securebits.h \
754         src/shared/special.h \
755         src/shared/list.h \
756         src/shared/unaligned.h \
757         src/shared/macro.h \
758         src/shared/def.h \
759         src/shared/sparse-endian.h \
760         src/shared/refcnt.h \
761         src/shared/udev-util.h \
762         src/shared/device-nodes.c \
763         src/shared/device-nodes.h \
764         src/shared/util.c \
765         src/shared/util.h \
766         src/shared/virt.c \
767         src/shared/virt.h \
768         src/shared/architecture.c \
769         src/shared/architecture.h \
770         src/shared/efivars.c \
771         src/shared/efivars.h \
772         src/shared/fstab-util.c \
773         src/shared/fstab-util.h \
774         src/shared/path-util.c \
775         src/shared/path-util.h \
776         src/shared/time-util.c \
777         src/shared/time-util.h \
778         src/shared/locale-util.c \
779         src/shared/locale-util.h \
780         src/shared/mempool.c \
781         src/shared/mempool.h \
782         src/shared/hashmap.c \
783         src/shared/hashmap.h \
784         src/shared/siphash24.c \
785         src/shared/siphash24.h \
786         src/shared/set.h \
787         src/shared/fdset.c \
788         src/shared/fdset.h \
789         src/shared/prioq.c \
790         src/shared/prioq.h \
791         src/shared/sleep-config.c \
792         src/shared/sleep-config.h \
793         src/shared/strv.c \
794         src/shared/strv.h \
795         src/shared/env-util.c \
796         src/shared/env-util.h \
797         src/shared/strbuf.c \
798         src/shared/strbuf.h \
799         src/shared/strxcpyx.c \
800         src/shared/strxcpyx.h \
801         src/shared/conf-parser.c \
802         src/shared/conf-parser.h \
803         src/shared/log.c \
804         src/shared/log.h \
805         src/shared/ratelimit.h \
806         src/shared/ratelimit.c \
807         src/shared/exit-status.c \
808         src/shared/exit-status.h \
809         src/shared/utf8.c \
810         src/shared/utf8.h \
811         src/shared/gunicode.c \
812         src/shared/gunicode.h \
813         src/shared/pager.c \
814         src/shared/pager.h \
815         src/shared/socket-util.c \
816         src/shared/socket-util.h \
817         src/shared/in-addr-util.c \
818         src/shared/in-addr-util.h \
819         src/shared/ether-addr-util.h \
820         src/shared/conf-files.c \
821         src/shared/conf-files.h \
822         src/shared/cgroup-util.c \
823         src/shared/cgroup-util.h \
824         src/shared/cgroup-show.c \
825         src/shared/cgroup-show.h \
826         src/shared/unit-name.c \
827         src/shared/unit-name.h \
828         src/shared/utmp-wtmp.h \
829         src/shared/watchdog.c \
830         src/shared/watchdog.h \
831         src/shared/spawn-ask-password-agent.c \
832         src/shared/spawn-ask-password-agent.h \
833         src/shared/replace-var.c \
834         src/shared/replace-var.h \
835         src/shared/spawn-polkit-agent.c \
836         src/shared/spawn-polkit-agent.h \
837         src/shared/clock-util.c \
838         src/shared/clock-util.h \
839         src/shared/time-dst.c \
840         src/shared/time-dst.h \
841         src/shared/calendarspec.c \
842         src/shared/calendarspec.h \
843         src/shared/fileio.c \
844         src/shared/fileio.h \
845         src/shared/output-mode.h \
846         src/shared/MurmurHash2.c \
847         src/shared/MurmurHash2.h \
848         src/shared/acpi-fpdt.h \
849         src/shared/acpi-fpdt.c \
850         src/shared/boot-timestamps.h \
851         src/shared/boot-timestamps.c \
852         src/shared/mkdir.c \
853         src/shared/mkdir.h \
854         src/shared/smack-util.c \
855         src/shared/smack-util.h \
856         src/shared/apparmor-util.c \
857         src/shared/apparmor-util.h \
858         src/shared/ima-util.c \
859         src/shared/ima-util.h \
860         src/shared/ptyfwd.c \
861         src/shared/ptyfwd.h \
862         src/shared/errno-list.c \
863         src/shared/errno-list.h \
864         src/shared/af-list.c \
865         src/shared/af-list.h \
866         src/shared/arphrd-list.c \
867         src/shared/arphrd-list.h \
868         src/shared/cap-list.c \
869         src/shared/cap-list.h \
870         src/shared/audit.c \
871         src/shared/audit.h \
872         src/shared/xml.c \
873         src/shared/xml.h \
874         src/shared/json.c \
875         src/shared/json.h \
876         src/shared/bus-label.c \
877         src/shared/bus-label.h \
878         src/shared/gpt.h \
879         src/shared/clean-ipc.h \
880         src/shared/clean-ipc.c \
881         src/shared/login-shared.c \
882         src/shared/login-shared.h \
883         src/shared/ring.c \
884         src/shared/ring.h \
885         src/shared/barrier.c \
886         src/shared/barrier.h \
887         src/shared/pty.c \
888         src/shared/pty.h \
889         src/shared/async.c \
890         src/shared/async.h \
891         src/shared/base-filesystem.c \
892         src/shared/base-filesystem.h \
893         src/shared/memfd-util.c \
894         src/shared/memfd-util.h \
895         src/shared/uid-range.c \
896         src/shared/uid-range.h \
897         src/shared/nss-util.h \
898         src/shared/verbs.c \
899         src/shared/verbs.h \
900         src/shared/sigbus.c \
901         src/shared/sigbus.h \
902         src/shared/build.h
903
904 if HAVE_UTMP
905 libsystemd_shared_la_SOURCES += \
906         src/shared/utmp-wtmp.c
907 endif
908
909 nodist_libsystemd_shared_la_SOURCES = \
910         src/shared/errno-from-name.h \
911         src/shared/errno-to-name.h \
912         src/shared/af-from-name.h \
913         src/shared/af-to-name.h \
914         src/shared/arphrd-from-name.h \
915         src/shared/arphrd-to-name.h \
916         src/shared/cap-from-name.h \
917         src/shared/cap-to-name.h
918
919 libsystemd_shared_la_CFLAGS = \
920         $(AM_CFLAGS) \
921         $(CAP_CFLAGS) \
922         $(SECCOMP_CFLAGS) \
923         -pthread
924
925 libsystemd_shared_la_LIBADD = \
926         $(CAP_LIBS) \
927         -lm
928
929 # ------------------------------------------------------------------------------
930 noinst_LTLIBRARIES += \
931         libsystemd-units.la
932
933 libsystemd_units_la_SOURCES = \
934         src/shared/install.c \
935         src/shared/install.h \
936         src/shared/install-printf.c \
937         src/shared/install-printf.h \
938         src/shared/path-lookup.c \
939         src/shared/path-lookup.h \
940         src/shared/specifier.c \
941         src/shared/specifier.h
942
943 # ------------------------------------------------------------------------------
944 noinst_LTLIBRARIES += \
945         libsystemd-label.la
946
947 libsystemd_label_la_SOURCES = \
948         src/shared/socket-label.c \
949         src/shared/label.c \
950         src/shared/label.h \
951         src/shared/selinux-util.c \
952         src/shared/selinux-util.h \
953         src/shared/mkdir-label.c \
954         src/shared/ask-password-api.c \
955         src/shared/ask-password-api.h \
956         src/shared/switch-root.h \
957         src/shared/switch-root.c \
958         src/shared/fileio-label.c \
959         src/shared/fileio-label.h \
960         src/shared/dev-setup.c \
961         src/shared/dev-setup.h \
962         src/shared/dropin.c \
963         src/shared/dropin.h \
964         src/shared/condition.c \
965         src/shared/condition.h \
966         src/shared/generator.h \
967         src/shared/generator.c \
968         src/shared/btrfs-util.c \
969         src/shared/btrfs-util.h \
970         src/shared/btrfs-ctree.h \
971         src/shared/machine-image.c \
972         src/shared/machine-image.h \
973         src/shared/copy.c \
974         src/shared/copy.h
975
976 libsystemd_label_la_CFLAGS = \
977         $(AM_CFLAGS) \
978         $(SELINUX_CFLAGS)
979
980 libsystemd_label_la_LIBADD = \
981         $(SELINUX_LIBS)
982
983 # -----------------------------------------------------------------------------
984
985 if ENABLE_LDCONFIG
986 dist_systemunit_DATA += \
987         units/ldconfig.service
988
989 SYSINIT_TARGET_WANTS += \
990         ldconfig.service
991 endif
992
993 # ------------------------------------------------------------------------------
994
995 if HAVE_SECCOMP
996 noinst_LTLIBRARIES += \
997         libsystemd-seccomp.la
998
999 libsystemd_seccomp_la_SOURCES = \
1000         src/shared/seccomp-util.h \
1001         src/shared/seccomp-util.c
1002
1003 libsystemd_seccomp_la_CFLAGS = \
1004         $(AM_CFLAGS) \
1005         $(SECCOMP_CFLAGS)
1006
1007 libsystemd_seccomp_la_LIBADD = \
1008         $(SECCOMP_LIBS)
1009 endif
1010
1011 # ------------------------------------------------------------------------------
1012 noinst_LTLIBRARIES += \
1013         libsystemd-logs.la
1014
1015 libsystemd_logs_la_SOURCES = \
1016         src/shared/logs-show.c \
1017         src/shared/logs-show.h
1018
1019 # ------------------------------------------------------------------------------
1020 if HAVE_ACL
1021 noinst_LTLIBRARIES += \
1022         libsystemd-acl.la
1023
1024 libsystemd_acl_la_SOURCES = \
1025         src/shared/acl-util.c \
1026         src/shared/acl-util.h
1027
1028 libsystemd_acl_la_CFLAGS = \
1029         $(AM_CFLAGS) \
1030         $(ACL_CFLAGS)
1031
1032 libsystemd_acl_la_LIBADD = \
1033         $(ACL_LIBS)
1034 endif
1035
1036 # ------------------------------------------------------------------------------
1037 noinst_LTLIBRARIES += \
1038         libsystemd-core.la
1039
1040 libsystemd_core_la_SOURCES = \
1041         src/core/unit.c \
1042         src/core/unit.h \
1043         src/core/unit-printf.c \
1044         src/core/unit-printf.h \
1045         src/core/job.c \
1046         src/core/job.h \
1047         src/core/manager.c \
1048         src/core/manager.h \
1049         src/core/transaction.c \
1050         src/core/transaction.h \
1051         src/core/load-fragment.c \
1052         src/core/load-fragment.h \
1053         src/core/service.c \
1054         src/core/service.h \
1055         src/core/socket.c \
1056         src/core/socket.h \
1057         src/core/busname.c \
1058         src/core/busname.h \
1059         src/core/bus-endpoint.c \
1060         src/core/bus-endpoint.h \
1061         src/core/bus-policy.c \
1062         src/core/bus-policy.h \
1063         src/core/target.c \
1064         src/core/target.h \
1065         src/core/snapshot.c \
1066         src/core/snapshot.h \
1067         src/core/device.c \
1068         src/core/device.h \
1069         src/core/mount.c \
1070         src/core/mount.h \
1071         src/core/automount.c \
1072         src/core/automount.h \
1073         src/core/swap.c \
1074         src/core/swap.h \
1075         src/core/timer.c \
1076         src/core/timer.h \
1077         src/core/path.c \
1078         src/core/path.h \
1079         src/core/slice.c \
1080         src/core/slice.h \
1081         src/core/scope.c \
1082         src/core/scope.h \
1083         src/core/load-dropin.c \
1084         src/core/load-dropin.h \
1085         src/core/execute.c \
1086         src/core/execute.h \
1087         src/core/kill.c \
1088         src/core/kill.h \
1089         src/core/dbus.c \
1090         src/core/dbus.h \
1091         src/core/dbus-manager.c \
1092         src/core/dbus-manager.h \
1093         src/core/dbus-unit.c \
1094         src/core/dbus-unit.h \
1095         src/core/dbus-job.c \
1096         src/core/dbus-job.h \
1097         src/core/dbus-service.c \
1098         src/core/dbus-service.h \
1099         src/core/dbus-socket.c \
1100         src/core/dbus-socket.h \
1101         src/core/dbus-busname.c \
1102         src/core/dbus-busname.h \
1103         src/core/dbus-target.c \
1104         src/core/dbus-target.h \
1105         src/core/dbus-snapshot.c \
1106         src/core/dbus-snapshot.h \
1107         src/core/dbus-device.c \
1108         src/core/dbus-device.h \
1109         src/core/dbus-mount.c \
1110         src/core/dbus-mount.h \
1111         src/core/dbus-automount.c \
1112         src/core/dbus-automount.h \
1113         src/core/dbus-swap.c \
1114         src/core/dbus-swap.h \
1115         src/core/dbus-timer.c \
1116         src/core/dbus-timer.h \
1117         src/core/dbus-path.c \
1118         src/core/dbus-path.h \
1119         src/core/dbus-slice.c \
1120         src/core/dbus-slice.h \
1121         src/core/dbus-scope.c \
1122         src/core/dbus-scope.h \
1123         src/core/dbus-execute.c \
1124         src/core/dbus-execute.h \
1125         src/core/dbus-kill.c \
1126         src/core/dbus-kill.h \
1127         src/core/dbus-cgroup.c \
1128         src/core/dbus-cgroup.h \
1129         src/core/cgroup.c \
1130         src/core/cgroup.h \
1131         src/core/selinux-access.c \
1132         src/core/selinux-access.h \
1133         src/core/selinux-setup.c \
1134         src/core/selinux-setup.h \
1135         src/core/smack-setup.c \
1136         src/core/smack-setup.h \
1137         src/core/ima-setup.c \
1138         src/core/ima-setup.h \
1139         src/core/locale-setup.h \
1140         src/core/locale-setup.c \
1141         src/core/hostname-setup.c \
1142         src/core/hostname-setup.h \
1143         src/core/machine-id-setup.c \
1144         src/core/machine-id-setup.h \
1145         src/core/mount-setup.c \
1146         src/core/mount-setup.h \
1147         src/core/kmod-setup.c \
1148         src/core/kmod-setup.h \
1149         src/core/loopback-setup.h \
1150         src/core/loopback-setup.c \
1151         src/core/namespace.c \
1152         src/core/namespace.h \
1153         src/core/killall.h \
1154         src/core/killall.c \
1155         src/core/audit-fd.c \
1156         src/core/audit-fd.h \
1157         src/core/show-status.c \
1158         src/core/show-status.h \
1159         src/core/failure-action.c \
1160         src/core/failure-action.h
1161
1162 nodist_libsystemd_core_la_SOURCES = \
1163         src/core/load-fragment-gperf.c \
1164         src/core/load-fragment-gperf-nulstr.c
1165
1166 libsystemd_core_la_CFLAGS = \
1167         $(AM_CFLAGS) \
1168         $(PAM_CFLAGS) \
1169         $(AUDIT_CFLAGS) \
1170         $(KMOD_CFLAGS) \
1171         $(APPARMOR_CFLAGS) \
1172         $(SECCOMP_CFLAGS) \
1173         $(MOUNT_CFLAGS) \
1174         -pthread
1175
1176 libsystemd_core_la_LIBADD = \
1177         libsystemd-units.la \
1178         libsystemd-label.la \
1179         libudev-internal.la \
1180         libsystemd-shared.la \
1181         libsystemd-internal.la \
1182         $(PAM_LIBS) \
1183         $(AUDIT_LIBS) \
1184         $(KMOD_LIBS) \
1185         $(APPARMOR_LIBS) \
1186         $(SECCOMP_LIBS) \
1187         $(MOUNT_LIBS)
1188
1189 if HAVE_SECCOMP
1190 libsystemd_core_la_LIBADD += \
1191         libsystemd-seccomp.la
1192 endif
1193
1194 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1195         $(AM_V_at)$(MKDIR_P) $(dir $@)
1196         $(AM_V_GEN)$(AWK) 'BEGIN{ keywords=0 ; FS="," ; print "extern const char load_fragment_gperf_nulstr[];" ; print "const char load_fragment_gperf_nulstr[] ="} ; keyword==1 { print "\"" $$1 "\\0\"" } ; /%%/ { keyword=1} ; END { print ";" }' < $< > $@
1197
1198 EXTRA_DIST += \
1199         src/core/load-fragment-gperf.gperf.m4
1200
1201 CLEANFILES += \
1202         src/core/load-fragment-gperf.gperf \
1203         src/core/load-fragment-gperf.c \
1204         src/core/load-fragment-gperf-nulstr.c \
1205         src/shared/errno-list.txt \
1206         src/shared/errno-from-name.gperf \
1207         src/shared/af-list.txt \
1208         src/shared/af-from-name.gperf \
1209         src/shared/arphrd-list.txt \
1210         src/shared/arphrd-from-name.gperf \
1211         src/shared/cap-list.txt \
1212         src/shared/cap-from-name.gperf \
1213         src/resolve/dns_type-list.txt \
1214         src/resolve/dns_type-from-name.gperf
1215
1216 BUILT_SOURCES += \
1217         src/shared/errno-from-name.h \
1218         src/shared/errno-to-name.h \
1219         src/shared/af-from-name.h \
1220         src/shared/af-to-name.h \
1221         src/shared/arphrd-from-name.h \
1222         src/shared/arphrd-to-name.h \
1223         src/shared/cap-from-name.h \
1224         src/shared/cap-to-name.h \
1225         src/resolve/dns_type-from-name.h \
1226         src/resolve/dns_type-to-name.h
1227
1228 %-from-name.gperf: %-list.txt
1229         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
1230
1231 %-from-name.h: %-from-name.gperf
1232         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
1233
1234
1235 src/shared/errno-list.txt:
1236         $(AM_V_at)$(MKDIR_P) $(dir $@)
1237         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
1238
1239 src/shared/errno-to-name.h: src/shared/errno-list.txt
1240         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1241
1242
1243 src/shared/af-list.txt:
1244         $(AM_V_at)$(MKDIR_P) $(dir $@)
1245         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/socket.h - </dev/null | grep -v AF_UNSPEC | grep -v AF_MAX | $(AWK) '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $$2; }' >$@
1246
1247 src/shared/af-to-name.h: src/shared/af-list.txt
1248         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const af_names[] = { "} !/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1249
1250
1251 src/shared/arphrd-list.txt:
1252         $(AM_V_at)$(MKDIR_P) $(dir $@)
1253         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include net/if_arp.h - </dev/null | $(AWK) '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $$2; }' | sed -e 's/ARPHRD_//' >$@
1254
1255 src/shared/arphrd-to-name.h: src/shared/arphrd-list.txt
1256         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1257
1258 src/shared/arphrd-from-name.gperf: src/shared/arphrd-list.txt
1259         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct arphrd_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, ARPHRD_%s\n", $$1, $$1 }' <$< >$@
1260
1261
1262 src/shared/cap-list.txt:
1263         $(AM_V_at)$(MKDIR_P) $(dir $@)
1264         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/capability.h -include missing.h - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@
1265
1266 src/shared/cap-to-name.h: src/shared/cap-list.txt
1267         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@
1268
1269 src/shared/cap-from-name.gperf: src/shared/cap-list.txt
1270         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct capability_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
1271
1272 src/shared/cap-from-name.h: src/shared/cap-from-name.gperf
1273         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@
1274
1275
1276 src/resolve/dns_type-list.txt: src/resolve/dns-type.h
1277         $(AM_V_at)$(MKDIR_P) $(dir $@)
1278         $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@
1279
1280 src/resolve/dns_type-to-name.h: src/resolve/dns_type-list.txt
1281         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *dns_type_to_string(int type) {\n\tswitch(type) {" } {printf "        case DNS_TYPE_%s: return ", $$1; sub(/_/, "-"); printf "\"%s\";\n", $$1 } END{ print "\ndefault: return NULL;\n\t}\n}\n" }' <$< >$@
1282
1283 src/resolve/dns_type-from-name.gperf: src/resolve/dns_type-list.txt
1284         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct dns_type_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { s=$$1; sub(/_/, "-", s); printf "%s, ", $$s; printf "DNS_TYPE_%s\n", $$1 }' <$< >$@
1285
1286 # ------------------------------------------------------------------------------
1287 systemd_SOURCES = \
1288         src/core/main.c
1289
1290 systemd_CFLAGS = \
1291         $(AM_CFLAGS) \
1292         $(SECCOMP_CFLAGS)
1293
1294 systemd_LDADD = \
1295         libsystemd-core.la \
1296         $(RT_LIBS)
1297
1298 dist_pkgsysconf_DATA += \
1299         src/core/system.conf \
1300         src/core/user.conf
1301
1302 dist_dbuspolicy_DATA += \
1303         src/core/org.freedesktop.systemd1.conf
1304
1305 dist_dbussystemservice_DATA += \
1306         src/core/org.freedesktop.systemd1.service
1307
1308 polkitpolicy_in_in_files += \
1309         src/core/org.freedesktop.systemd1.policy.in.in
1310
1311 pkgconfiglib_DATA += \
1312         src/core/systemd.pc
1313
1314 nodist_rpmmacros_DATA = \
1315         src/core/macros.systemd
1316
1317 EXTRA_DIST += \
1318         src/core/systemd.pc.in \
1319         src/core/macros.systemd.in
1320
1321 CLEANFILES += \
1322         src/core/macros.systemd \
1323         src/core/org.freedesktop.systemd1.policy.in
1324
1325 # ------------------------------------------------------------------------------
1326
1327 manual_tests += \
1328         test-ns \
1329         test-loopback \
1330         test-hostname \
1331         test-daemon \
1332         test-cgroup \
1333         test-install \
1334         test-watchdog \
1335         test-log \
1336         test-ipcrm \
1337         test-btrfs
1338
1339 if HAVE_KMOD
1340 manual_tests += \
1341         test-rtnl-manual
1342 endif
1343
1344 tests += \
1345         test-engine \
1346         test-cgroup-mask \
1347         test-job-type \
1348         test-env-replace \
1349         test-strbuf \
1350         test-strv \
1351         test-path \
1352         test-path-util \
1353         test-strxcpyx \
1354         test-unit-name \
1355         test-unit-file \
1356         test-utf8 \
1357         test-ellipsize \
1358         test-util \
1359         test-path-lookup \
1360         test-ring \
1361         test-barrier \
1362         test-pty \
1363         test-tmpfiles \
1364         test-namespace \
1365         test-date \
1366         test-sleep \
1367         test-replace-var \
1368         test-sched-prio \
1369         test-calendarspec \
1370         test-strip-tab-ansi \
1371         test-cgroup-util \
1372         test-fstab-util \
1373         test-prioq \
1374         test-fileio \
1375         test-time \
1376         test-hashmap \
1377         test-set \
1378         test-list \
1379         test-unaligned \
1380         test-tables \
1381         test-device-nodes \
1382         test-xml \
1383         test-json \
1384         test-architecture \
1385         test-socket-util \
1386         test-fdset \
1387         test-conf-files \
1388         test-capability \
1389         test-async \
1390         test-ratelimit \
1391         test-condition \
1392         test-uid-range \
1393         test-bus-policy \
1394         test-locale-util \
1395         test-execute \
1396         test-copy \
1397         test-cap-list \
1398         test-sigbus \
1399         test-verbs
1400
1401 EXTRA_DIST += \
1402         test/a.service \
1403         test/basic.target \
1404         test/b.service \
1405         test/c.service \
1406         test/daughter.service \
1407         test/d.service \
1408         test/end.service \
1409         test/e.service \
1410         test/f.service \
1411         test/grandchild.service \
1412         test/g.service \
1413         test/hello-after-sleep.target \
1414         test/hello.service \
1415         test/h.service \
1416         test/parent-deep.slice \
1417         test/parent.slice \
1418         test/paths.target \
1419         test/sched_idle_bad.service \
1420         test/sched_idle_ok.service \
1421         test/sched_rr_bad.service \
1422         test/sched_rr_change.service \
1423         test/sched_rr_ok.service \
1424         test/shutdown.target \
1425         test/sleep.service \
1426         test/sockets.target \
1427         test/son.service \
1428         test/sysinit.target \
1429         test/testsuite.target \
1430         test/timers.target \
1431         test/unstoppable.service \
1432         test/path-changed.service \
1433         test/path-directorynotempty.service \
1434         test/path-existsglob.service \
1435         test/path-exists.service \
1436         test/path-makedirectory.service \
1437         test/path-modified.service \
1438         test/path-mycustomunit.service \
1439         test/path-service.service \
1440         test/path-changed.path \
1441         test/path-directorynotempty.path \
1442         test/path-existsglob.path \
1443         test/path-exists.path \
1444         test/path-makedirectory.path \
1445         test/path-modified.path \
1446         test/path-unit.path \
1447         test/exec-environment-empty.service \
1448         test/exec-environment-multiple.service \
1449         test/exec-environment.service \
1450         test/exec-group.service \
1451         test/exec-ignoresigpipe-no.service \
1452         test/exec-ignoresigpipe-yes.service \
1453         test/exec-personality-x86-64.service \
1454         test/exec-personality-x86.service \
1455         test/exec-privatedevices-no.service \
1456         test/exec-privatedevices-yes.service \
1457         test/exec-privatetmp-no.service \
1458         test/exec-privatetmp-yes.service \
1459         test/exec-systemcallerrornumber.service \
1460         test/exec-systemcallfilter-failing2.service \
1461         test/exec-systemcallfilter-failing.service \
1462         test/exec-systemcallfilter-not-failing2.service \
1463         test/exec-systemcallfilter-not-failing.service \
1464         test/exec-user.service \
1465         test/exec-workingdirectory.service \
1466         test/exec-umask-0177.service \
1467         test/exec-umask-default.service \
1468         test/bus-policy/hello.conf \
1469         test/bus-policy/methods.conf \
1470         test/bus-policy/ownerships.conf \
1471         test/bus-policy/signals.conf \
1472         test/bus-policy/check-own-rules.conf \
1473         test/bus-policy/many-rules.conf \
1474         test/bus-policy/test.conf
1475
1476
1477 EXTRA_DIST += \
1478         src/test/test-helper.h
1479
1480 test_device_nodes_SOURCES = \
1481         src/test/test-device-nodes.c
1482
1483 test_device_nodes_LDADD = \
1484         libsystemd-shared.la
1485
1486 test_engine_SOURCES = \
1487         src/test/test-engine.c
1488
1489 test_engine_CFLAGS = \
1490         $(AM_CFLAGS) \
1491         $(SECCOMP_CFLAGS)
1492
1493 test_engine_LDADD = \
1494         libsystemd-core.la \
1495         $(RT_LIBS)
1496
1497 test_job_type_SOURCES = \
1498         src/test/test-job-type.c
1499
1500 test_job_type_CFLAGS = \
1501         $(AM_CFLAGS) \
1502         $(SECCOMP_CFLAGS)
1503
1504 test_job_type_LDADD = \
1505         libsystemd-core.la \
1506         $(RT_LIBS)
1507
1508 test_ns_SOURCES = \
1509         src/test/test-ns.c
1510
1511 test_ns_CFLAGS = \
1512         $(AM_CFLAGS) \
1513         $(SECCOMP_CFLAGS)
1514
1515 test_ns_LDADD = \
1516         libsystemd-core.la
1517
1518 test_loopback_SOURCES = \
1519         src/test/test-loopback.c
1520
1521 test_loopback_LDADD = \
1522         libsystemd-core.la
1523
1524 test_hostname_SOURCES = \
1525         src/test/test-hostname.c
1526
1527 test_hostname_LDADD = \
1528         libsystemd-core.la
1529
1530 if ENABLE_EFI
1531 manual_tests += \
1532         test-boot-timestamp
1533
1534 test_boot_timestamp_SOURCES = \
1535         src/test/test-boot-timestamps.c
1536
1537 test_boot_timestamp_LDADD = \
1538         libsystemd-shared.la
1539 endif
1540
1541 test_unit_name_SOURCES = \
1542         src/test/test-unit-name.c
1543
1544 test_unit_name_CFLAGS = \
1545         $(AM_CFLAGS) \
1546         $(SECCOMP_CFLAGS)
1547
1548 test_unit_name_LDADD = \
1549         libsystemd-core.la \
1550         $(RT_LIBS)
1551
1552 test_unit_file_SOURCES = \
1553         src/test/test-unit-file.c
1554
1555 test_unit_file_CFLAGS = \
1556         $(AM_CFLAGS) \
1557         $(SECCOMP_CFLAGS)
1558
1559 test_unit_file_LDADD = \
1560         libsystemd-core.la \
1561         $(RT_LIBS)
1562
1563 test_utf8_SOURCES = \
1564         src/test/test-utf8.c
1565
1566 test_utf8_LDADD = \
1567         libsystemd-shared.la
1568
1569 test_capability_SOURCES = \
1570         src/test/test-capability.c
1571
1572 test_capability_LDADD = \
1573         libsystemd-shared.la
1574
1575 test_async_SOURCES = \
1576         src/test/test-async.c
1577
1578 test_async_LDADD = \
1579         libsystemd-shared.la
1580
1581 test_locale_util_SOURCES = \
1582         src/test/test-locale-util.c
1583
1584 test_locale_util_LDADD = \
1585         libsystemd-shared.la
1586
1587 test_copy_SOURCES = \
1588         src/test/test-copy.c
1589
1590 test_copy_LDADD = \
1591         libsystemd-label.la \
1592         libsystemd-shared.la
1593
1594 test_sigbus_SOURCES = \
1595         src/test/test-sigbus.c
1596
1597 test_sigbus_LDADD = \
1598         libsystemd-shared.la
1599
1600 test_condition_SOURCES = \
1601         src/test/test-condition.c
1602
1603 test_condition_LDADD = \
1604         libsystemd-label.la \
1605         libsystemd-internal.la \
1606         libsystemd-shared.la
1607
1608 test_fdset_SOURCES = \
1609         src/test/test-fdset.c
1610
1611 test_fdset_LDADD = \
1612         libsystemd-shared.la \
1613         libsystemd-internal.la
1614
1615 test_fstab_util_SOURCES = \
1616         src/test/test-fstab-util.c
1617
1618 test_fstab_util_LDADD = \
1619         libsystemd-shared.la
1620
1621 test_ratelimit_SOURCES = \
1622         src/test/test-ratelimit.c
1623
1624 test_ratelimit_LDADD = \
1625         libsystemd-shared.la
1626
1627 test_util_SOURCES = \
1628         src/test/test-util.c
1629
1630 test_util_LDADD = \
1631         libsystemd-shared.la
1632
1633 test_path_lookup_SOURCES = \
1634         src/test/test-path-lookup.c
1635
1636 test_path_lookup_LDADD = \
1637         -lm \
1638         libsystemd-units.la \
1639         libsystemd-shared.la
1640
1641 test_uid_range_SOURCES = \
1642         src/test/test-uid-range.c
1643
1644 test_uid_range_LDADD = \
1645         libsystemd-shared.la
1646
1647 test_cap_list_SOURCES = \
1648         src/test/test-cap-list.c
1649
1650 test_cap_list_LDADD = \
1651         libsystemd-shared.la
1652
1653 test_socket_util_SOURCES = \
1654         src/test/test-socket-util.c
1655
1656 test_socket_util_LDADD = \
1657         libsystemd-shared.la
1658
1659 test_ring_SOURCES = \
1660         src/test/test-ring.c
1661
1662 test_ring_LDADD = \
1663         libsystemd-shared.la
1664
1665 test_barrier_SOURCES = \
1666         src/test/test-barrier.c
1667
1668 test_barrier_LDADD = \
1669         libsystemd-shared.la
1670
1671 test_pty_SOURCES = \
1672         src/test/test-pty.c
1673
1674 test_pty_LDADD = \
1675         libsystemd-core.la
1676
1677 test_tmpfiles_SOURCES = \
1678         src/test/test-tmpfiles.c
1679
1680 test_tmpfiles_LDADD = \
1681         libsystemd-shared.la
1682
1683 test_namespace_SOURCES = \
1684         src/test/test-namespace.c
1685
1686 test_verbs_SOURCES = \
1687         src/test/test-verbs.c
1688
1689 test_verbs_LDADD = \
1690         libsystemd-shared.la
1691
1692 test_namespace_LDADD = \
1693         libsystemd-core.la
1694
1695 CLEANFILES += \
1696         src/test/test-hashmap-ordered.c
1697
1698 BUILT_SOURCES += \
1699         src/test/test-hashmap-ordered.c
1700
1701 src/test/test-hashmap-ordered.c: src/test/test-hashmap-plain.c
1702         $(AM_V_at)$(MKDIR_P) $(dir $@)
1703         $(AM_V_GEN)$(AWK) 'BEGIN { print "/* GENERATED FILE */\n#define ORDERED" } \
1704                            { if (!match($$0, "^#include"))          \
1705                                  gsub(/hashmap/, "ordered_hashmap"); \
1706                              gsub(/HASHMAP/, "ORDERED_HASHMAP");     \
1707                              gsub(/Hashmap/, "OrderedHashmap");      \
1708                              print }' <$< >$@
1709
1710 nodist_test_hashmap_SOURCES = \
1711         src/test/test-hashmap-ordered.c
1712
1713 test_hashmap_SOURCES = \
1714         src/test/test-hashmap.c \
1715         src/test/test-hashmap-plain.c
1716
1717 test_hashmap_LDADD = \
1718         libsystemd-shared.la
1719
1720 test_set_SOURCES = \
1721         src/test/test-set.c
1722
1723 test_set_LDADD = \
1724         libsystemd-shared.la
1725
1726 test_xml_SOURCES = \
1727         src/test/test-xml.c
1728
1729 test_xml_LDADD = \
1730         libsystemd-shared.la
1731
1732 test_json_SOURCES = \
1733         src/test/test-json.c
1734
1735 test_json_LDADD = \
1736         libsystemd-shared.la
1737
1738 test_list_SOURCES = \
1739         src/test/test-list.c
1740
1741 test_list_LDADD = \
1742         libsystemd-shared.la
1743
1744 test_unaligned_LDADD = \
1745         libsystemd-shared.la
1746
1747 test_unaligned_SOURCES = \
1748         src/test/test-unaligned.c
1749
1750 test_tables_SOURCES = \
1751         src/test/test-tables.c \
1752         src/shared/test-tables.h \
1753         src/bus-proxyd/bus-xml-policy.c \
1754         src/bus-proxyd/bus-xml-policy.h \
1755         src/journal/journald-server.c \
1756         src/journal/journald-server.h
1757
1758 test_tables_CPPFLAGS = \
1759         $(AM_CPPFLAGS) \
1760         -I$(top_srcdir)/src/bus-proxyd
1761
1762 test_tables_CFLAGS = \
1763         $(AM_CFLAGS) \
1764         $(SECCOMP_CFLAGS)
1765
1766 test_tables_LDADD = \
1767         libsystemd-logs.la \
1768         libsystemd-journal-internal.la \
1769         libsystemd-journal-core.la \
1770         libsystemd-core.la \
1771         libudev-core.la \
1772         $(RT_LIBS)
1773
1774 test_prioq_SOURCES = \
1775         src/test/test-prioq.c
1776
1777 test_prioq_LDADD = \
1778         libsystemd-shared.la
1779
1780 test_fileio_SOURCES = \
1781         src/test/test-fileio.c
1782
1783 test_fileio_LDADD = \
1784         libsystemd-shared.la
1785
1786 test_time_SOURCES = \
1787         src/test/test-time.c
1788
1789 test_time_LDADD = \
1790         libsystemd-shared.la
1791
1792 test_architecture_SOURCES = \
1793         src/test/test-architecture.c
1794
1795 test_architecture_LDADD = \
1796         libsystemd-shared.la
1797
1798 test_log_SOURCES = \
1799         src/test/test-log.c
1800
1801 test_log_LDADD = \
1802         libsystemd-shared.la
1803
1804 test_ipcrm_SOURCES = \
1805         src/test/test-ipcrm.c
1806
1807 test_ipcrm_LDADD = \
1808         libsystemd-shared.la \
1809         -lrt
1810
1811 test_btrfs_SOURCES = \
1812         src/test/test-btrfs.c
1813
1814 test_btrfs_LDADD = \
1815         libsystemd-label.la \
1816         libsystemd-shared.la
1817
1818 test_rtnl_manual_SOURCES = \
1819         src/test/test-rtnl-manual.c
1820
1821 test_rtnl_manual_CFLAGS = \
1822         $(AM_CFLAGS) \
1823         $(KMOD_CFLAGS)
1824
1825 test_rtnl_manual_LDADD = \
1826         libsystemd-internal.la \
1827         libsystemd-shared.la \
1828         $(KMOD_LIBS)
1829
1830 test_ellipsize_SOURCES = \
1831         src/test/test-ellipsize.c
1832
1833 test_ellipsize_LDADD = \
1834         libsystemd-shared.la
1835
1836 test_date_SOURCES = \
1837         src/test/test-date.c
1838
1839 test_date_LDADD = \
1840         libsystemd-shared.la
1841
1842 test_sleep_SOURCES = \
1843         src/test/test-sleep.c
1844
1845 test_sleep_LDADD = \
1846         libsystemd-core.la
1847
1848 test_replace_var_SOURCES = \
1849         src/test/test-replace-var.c
1850
1851 test_replace_var_LDADD = \
1852         libsystemd-shared.la
1853
1854 test_calendarspec_SOURCES = \
1855         src/test/test-calendarspec.c
1856
1857 test_calendarspec_LDADD = \
1858         libsystemd-shared.la
1859
1860 test_strip_tab_ansi_SOURCES = \
1861         src/test/test-strip-tab-ansi.c
1862
1863 test_strip_tab_ansi_LDADD = \
1864         libsystemd-shared.la
1865
1866 test_daemon_SOURCES = \
1867         src/test/test-daemon.c
1868
1869 test_daemon_LDADD = \
1870         libsystemd-internal.la \
1871         libsystemd-shared.la
1872
1873 test_cgroup_SOURCES = \
1874         src/test/test-cgroup.c
1875
1876 test_cgroup_LDADD = \
1877         libsystemd-label.la \
1878         libsystemd-shared.la \
1879         libsystemd-internal.la
1880
1881 test_cgroup_mask_SOURCES = \
1882         src/test/test-cgroup-mask.c
1883
1884 test_cgroup_mask_CPPFLAGS = \
1885         $(AM_CPPFLAGS)
1886
1887 test_cgroup_mask_CFLAGS = \
1888         $(AM_CFLAGS) \
1889         $(SECCOMP_CFLAGS)
1890
1891 test_cgroup_mask_LDADD = \
1892         libsystemd-core.la \
1893         $(RT_LIBS)
1894
1895 test_cgroup_util_SOURCES = \
1896         src/test/test-cgroup-util.c
1897
1898 test_cgroup_util_LDADD = \
1899         libsystemd-label.la \
1900         libsystemd-internal.la \
1901         libsystemd-shared.la
1902
1903 test_env_replace_SOURCES = \
1904         src/test/test-env-replace.c
1905
1906 test_env_replace_LDADD = \
1907         libsystemd-shared.la
1908
1909 test_strbuf_SOURCES = \
1910         src/test/test-strbuf.c
1911
1912 test_strbuf_LDADD = \
1913         libsystemd-shared.la
1914
1915 test_strv_SOURCES = \
1916         src/test/test-strv.c
1917
1918 test_strv_LDADD = \
1919         libsystemd-units.la \
1920         libsystemd-internal.la \
1921         libsystemd-shared.la
1922
1923 test_path_util_SOURCES = \
1924         src/test/test-path-util.c
1925
1926 test_path_util_LDADD = \
1927         libsystemd-shared.la
1928
1929 test_path_SOURCES = \
1930         src/test/test-path.c
1931
1932 test_path_CFLAGS = \
1933         $(AM_CFLAGS)
1934
1935 test_path_LDADD = \
1936         libsystemd-core.la
1937
1938 test_execute_SOURCES = \
1939         src/test/test-execute.c
1940
1941 test_execute_CFLAGS = \
1942         $(AM_CFLAGS)
1943
1944 test_execute_LDADD = \
1945         libsystemd-core.la
1946
1947 test_strxcpyx_SOURCES = \
1948         src/test/test-strxcpyx.c
1949
1950 test_strxcpyx_LDADD = \
1951         libsystemd-shared.la
1952
1953 test_install_SOURCES = \
1954         src/test/test-install.c
1955
1956 test_install_LDADD = \
1957         libsystemd-units.la \
1958         libsystemd-label.la \
1959         libsystemd-shared.la \
1960         libsystemd-internal.la
1961
1962 test_watchdog_SOURCES = \
1963         src/test/test-watchdog.c
1964
1965 test_watchdog_LDADD = \
1966         libsystemd-shared.la
1967
1968 test_sched_prio_SOURCES = \
1969         src/test/test-sched-prio.c
1970
1971 test_sched_prio_CPPFLAGS = \
1972         $(AM_CPPFLAGS)
1973
1974 test_sched_prio_CFLAGS = \
1975         $(AM_CFLAGS) \
1976         $(SECCOMP_CFLAGS)
1977
1978 test_sched_prio_LDADD = \
1979         libsystemd-core.la \
1980         $(RT_LIBS)
1981
1982 test_conf_files_SOURCES = \
1983         src/test/test-conf-files.c
1984
1985 test_conf_files_LDADD = \
1986         libsystemd-shared.la
1987
1988 test_bus_policy_SOURCES = \
1989         src/bus-proxyd/test-bus-xml-policy.c \
1990         src/bus-proxyd/bus-xml-policy.c \
1991         src/bus-proxyd/bus-xml-policy.h
1992
1993 test_bus_policy_LDADD = \
1994         libsystemd-internal.la \
1995         libsystemd-shared.la
1996
1997 # ------------------------------------------------------------------------------
1998 ## .PHONY so it always rebuilds it
1999 .PHONY: coverage lcov-run lcov-report coverage-sync
2000
2001 # run lcov from scratch, always
2002 coverage: all
2003         $(MAKE) lcov-run
2004         $(MAKE) lcov-report
2005
2006 coverage_dir = coverage
2007 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
2008
2009 if ENABLE_COVERAGE
2010 # reset run coverage tests
2011 lcov-run:
2012         @rm -rf $(coverage_dir)
2013         lcov $(coverage_opts) --zerocounters
2014         -$(MAKE) check
2015
2016 # generate report based on current coverage data
2017 lcov-report:
2018         $(MKDIR_P) $(coverage_dir)
2019         lcov $(coverage_opts) --compat-libtool --capture --no-external \
2020                 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
2021         lcov --remove $(coverage_dir)/.lcov.info --output-file $(coverage_dir)/.lcov-clean.info 'test-*'
2022         genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov-clean.info
2023         @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
2024
2025 # lcov doesn't work properly with vpath builds, make sure that bad
2026 # output is not uploaded by mistake.
2027 coverage-sync: coverage
2028         test "$(builddir)" = "$(srcdir)"
2029         rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
2030
2031 else
2032 lcov-run lcov-report:
2033         echo "Need to reconfigure with --enable-coverage"
2034 endif
2035
2036 # ------------------------------------------------------------------------------
2037 systemd_analyze_SOURCES = \
2038         src/analyze/analyze.c \
2039         src/analyze/analyze-verify.c \
2040         src/analyze/analyze-verify.h
2041
2042 systemd_verify_CFLAGS = \
2043         $(AM_CFLAGS) \
2044         $(SECCOMP_CFLAGS)
2045
2046 systemd_analyze_LDADD = \
2047         libsystemd-core.la \
2048         libsystemd-internal.la \
2049         libsystemd-shared.la \
2050         $(RT_LIBS)
2051
2052 # ------------------------------------------------------------------------------
2053 systemd_initctl_SOURCES = \
2054         src/initctl/initctl.c
2055
2056 systemd_initctl_LDADD = \
2057         libsystemd-internal.la \
2058         libsystemd-shared.la
2059
2060 # ------------------------------------------------------------------------------
2061 systemd_update_utmp_SOURCES = \
2062         src/update-utmp/update-utmp.c
2063
2064 systemd_update_utmp_CFLAGS = \
2065         $(AM_CFLAGS) \
2066         $(AUDIT_CFLAGS)
2067
2068 systemd_update_utmp_LDADD = \
2069         libsystemd-internal.la \
2070         libsystemd-shared.la \
2071         $(AUDIT_LIBS)
2072
2073 # ------------------------------------------------------------------------------
2074 systemd_update_done_SOURCES = \
2075         src/update-done/update-done.c
2076
2077 systemd_update_done_LDADD = \
2078         libsystemd-internal.la \
2079         libsystemd-label.la \
2080         libsystemd-shared.la
2081
2082 # ------------------------------------------------------------------------------
2083 systemd_shutdownd_SOURCES = \
2084         src/shutdownd/shutdownd.c
2085
2086 systemd_shutdownd_LDADD = \
2087         libsystemd-label.la \
2088         libsystemd-internal.la \
2089         libsystemd-shared.la
2090
2091 dist_doc_DATA += \
2092         src/systemd/sd-shutdown.h
2093
2094 # ------------------------------------------------------------------------------
2095 systemd_shutdown_SOURCES = \
2096         src/core/umount.c \
2097         src/core/umount.h \
2098         src/core/shutdown.c \
2099         src/core/mount-setup.c \
2100         src/core/mount-setup.h \
2101         src/core/killall.h \
2102         src/core/killall.c
2103
2104 systemd_shutdown_LDADD = \
2105         libsystemd-label.la \
2106         libudev-internal.la \
2107         libsystemd-shared.la
2108
2109 # ------------------------------------------------------------------------------
2110 if HAVE_KMOD
2111 systemd_modules_load_SOURCES = \
2112         src/modules-load/modules-load.c
2113
2114 systemd_modules_load_CFLAGS = \
2115         $(AM_CFLAGS) \
2116         $(KMOD_CFLAGS)
2117
2118 systemd_modules_load_LDADD = \
2119         libsystemd-shared.la \
2120         $(KMOD_LIBS)
2121
2122 rootlibexec_PROGRAMS += \
2123         systemd-modules-load
2124
2125 nodist_systemunit_DATA += \
2126         units/systemd-modules-load.service
2127
2128 SYSINIT_TARGET_WANTS += \
2129         systemd-modules-load.service
2130
2131 if ENABLE_TMPFILES
2132 nodist_systemunit_DATA += \
2133         units/kmod-static-nodes.service
2134
2135 SYSINIT_TARGET_WANTS += \
2136         kmod-static-nodes.service
2137 endif
2138 endif
2139
2140 EXTRA_DIST += \
2141         units/systemd-modules-load.service.in \
2142         units/kmod-static-nodes.service.in
2143
2144 # ------------------------------------------------------------------------------
2145 if ENABLE_TMPFILES
2146 systemd_tmpfiles_SOURCES = \
2147         src/tmpfiles/tmpfiles.c
2148
2149 systemd_tmpfiles_LDADD = \
2150         libsystemd-units.la \
2151         libsystemd-label.la \
2152         libsystemd-internal.la \
2153         libsystemd-shared.la
2154
2155 rootbin_PROGRAMS += \
2156         systemd-tmpfiles
2157
2158 dist_systemunit_DATA += \
2159         units/systemd-tmpfiles-clean.timer
2160
2161 nodist_systemunit_DATA += \
2162         units/systemd-tmpfiles-setup-dev.service \
2163         units/systemd-tmpfiles-setup.service \
2164         units/systemd-tmpfiles-clean.service
2165
2166 nodist_tmpfiles_DATA = \
2167         tmpfiles.d/etc.conf
2168
2169 dist_tmpfiles_DATA = \
2170         tmpfiles.d/systemd.conf \
2171         tmpfiles.d/systemd-nologin.conf \
2172         tmpfiles.d/tmp.conf \
2173         tmpfiles.d/x11.conf \
2174         tmpfiles.d/var.conf
2175
2176 if HAVE_SYSV_COMPAT
2177 dist_tmpfiles_DATA += \
2178         tmpfiles.d/legacy.conf
2179 endif
2180
2181 SYSINIT_TARGET_WANTS += \
2182         systemd-tmpfiles-setup-dev.service \
2183         systemd-tmpfiles-setup.service
2184
2185 dist_zshcompletion_DATA += \
2186         shell-completion/zsh/_systemd-tmpfiles
2187
2188 TIMERS_TARGET_WANTS += \
2189         systemd-tmpfiles-clean.timer
2190
2191 INSTALL_DIRS += \
2192         $(tmpfilesdir) \
2193         $(sysconfdir)/tmpfiles.d
2194 endif
2195
2196 EXTRA_DIST += \
2197         tmpfiles.d/etc.conf.m4 \
2198         units/systemd-tmpfiles-setup-dev.service.in \
2199         units/systemd-tmpfiles-setup.service.in \
2200         units/systemd-tmpfiles-clean.service.in
2201
2202 CLEANFILES += \
2203         tmpfiles.d/etc.conf
2204
2205 # ------------------------------------------------------------------------------
2206 if ENABLE_SYSUSERS
2207 systemd_sysusers_SOURCES = \
2208         src/sysusers/sysusers.c
2209
2210 systemd_sysusers_LDADD = \
2211         libsystemd-units.la \
2212         libsystemd-label.la \
2213         libsystemd-internal.la \
2214         libsystemd-shared.la
2215
2216 rootbin_PROGRAMS += \
2217         systemd-sysusers
2218
2219 nodist_systemunit_DATA += \
2220         units/systemd-sysusers.service
2221
2222 SYSINIT_TARGET_WANTS += \
2223         systemd-sysusers.service
2224
2225 dist_sysusers_DATA = \
2226         sysusers.d/systemd.conf
2227
2228 nodist_sysusers_DATA = \
2229         sysusers.d/basic.conf
2230
2231 EXTRA_DIST += \
2232         units/systemd-sysusers.service.in \
2233         sysusers.d/basic.conf.in
2234
2235 CLEANFILES += \
2236         sysusers.d/basic.conf
2237
2238 INSTALL_DIRS += \
2239         $(sysusersdir)
2240 endif
2241
2242 # ------------------------------------------------------------------------------
2243 dist_factory_etc_DATA = \
2244         factory/etc/nsswitch.conf
2245
2246 if HAVE_PAM
2247 dist_factory_pam_DATA = \
2248         factory/etc/pam.d/system-auth \
2249         factory/etc/pam.d/other
2250 endif
2251
2252 # ------------------------------------------------------------------------------
2253 if ENABLE_FIRSTBOOT
2254 systemd_firstboot_SOURCES = \
2255         src/firstboot/firstboot.c
2256
2257 systemd_firstboot_LDADD = \
2258         libsystemd-units.la \
2259         libsystemd-label.la \
2260         libsystemd-internal.la \
2261         libsystemd-shared.la \
2262         -lcrypt
2263
2264 rootbin_PROGRAMS += \
2265         systemd-firstboot
2266
2267 nodist_systemunit_DATA += \
2268         units/systemd-firstboot.service
2269
2270 EXTRA_DIST += \
2271         units/systemd-firstboot.service.in
2272
2273 SYSINIT_TARGET_WANTS += \
2274         systemd-firstboot.service
2275 endif
2276
2277 # ------------------------------------------------------------------------------
2278 systemd_machine_id_setup_SOURCES = \
2279         src/machine-id-setup/machine-id-setup-main.c \
2280         src/core/machine-id-setup.c \
2281         src/core/machine-id-setup.h
2282
2283 systemd_machine_id_setup_LDADD = \
2284         libsystemd-label.la \
2285         libsystemd-internal.la \
2286         libsystemd-shared.la
2287
2288 # ------------------------------------------------------------------------------
2289 systemd_sysctl_SOURCES = \
2290         src/sysctl/sysctl.c
2291
2292 systemd_sysctl_LDADD = \
2293         libsystemd-shared.la
2294
2295 # ------------------------------------------------------------------------------
2296 systemd_sleep_SOURCES = \
2297         src/sleep/sleep.c
2298
2299 systemd_sleep_LDADD = \
2300         libsystemd-shared.la
2301
2302 # ------------------------------------------------------------------------------
2303 systemd_fsck_SOURCES = \
2304         src/fsck/fsck.c
2305
2306 systemd_fsck_LDADD = \
2307         libsystemd-internal.la \
2308         libudev-internal.la \
2309         libsystemd-shared.la
2310
2311 # ------------------------------------------------------------------------------
2312 systemd_machine_id_commit_SOURCES = \
2313         src/machine-id-commit/machine-id-commit.c \
2314         src/core/machine-id-setup.c \
2315         src/core/machine-id-setup.h
2316
2317 systemd_machine_id_commit_LDADD = \
2318         libsystemd-label.la \
2319         libsystemd-internal.la \
2320         libsystemd-shared.la
2321
2322 SYSINIT_TARGET_WANTS += \
2323         systemd-machine-id-commit.service
2324
2325 # ------------------------------------------------------------------------------
2326 systemd_ac_power_SOURCES = \
2327         src/ac-power/ac-power.c
2328
2329 systemd_ac_power_LDADD = \
2330         libudev-internal.la \
2331         libsystemd-shared.la
2332
2333 # ------------------------------------------------------------------------------
2334 systemd_detect_virt_SOURCES = \
2335         src/detect-virt/detect-virt.c
2336
2337 systemd_detect_virt_LDADD = \
2338         libsystemd-shared.la
2339
2340 INSTALL_EXEC_HOOKS += \
2341         systemd-detect-virt-install-hook
2342
2343 # ------------------------------------------------------------------------------
2344 systemd_delta_SOURCES = \
2345         src/delta/delta.c
2346
2347 systemd_delta_LDADD = \
2348         libsystemd-shared.la
2349
2350 # ------------------------------------------------------------------------------
2351 systemd_getty_generator_SOURCES = \
2352         src/getty-generator/getty-generator.c
2353
2354 systemd_getty_generator_LDADD = \
2355         libsystemd-label.la \
2356         libsystemd-shared.la
2357
2358 # ------------------------------------------------------------------------------
2359 systemd_debug_generator_SOURCES = \
2360         src/debug-generator/debug-generator.c
2361
2362 systemd_debug_generator_LDADD = \
2363         libsystemd-label.la \
2364         libsystemd-shared.la
2365
2366 # ------------------------------------------------------------------------------
2367 systemd_fstab_generator_SOURCES = \
2368         src/fstab-generator/fstab-generator.c \
2369         src/core/mount-setup.c
2370
2371 systemd_fstab_generator_LDADD = \
2372         libsystemd-label.la \
2373         libsystemd-shared.la
2374
2375 # ------------------------------------------------------------------------------
2376 systemd_system_update_generator_SOURCES = \
2377         src/system-update-generator/system-update-generator.c
2378
2379 systemd_system_update_generator_LDADD = \
2380         libsystemd-label.la \
2381         libsystemd-shared.la
2382
2383 # ------------------------------------------------------------------------------
2384 if ENABLE_HIBERNATE
2385 systemgenerator_PROGRAMS += \
2386         systemd-hibernate-resume-generator
2387
2388 rootlibexec_PROGRAMS += \
2389         systemd-hibernate-resume
2390
2391 systemd_hibernate_resume_SOURCES = \
2392         src/hibernate-resume/hibernate-resume.c
2393
2394 systemd_hibernate_resume_LDADD = \
2395         libsystemd-internal.la \
2396         libsystemd-shared.la
2397
2398 systemd_hibernate_resume_generator_SOURCES = \
2399         src/hibernate-resume/hibernate-resume-generator.c
2400
2401 systemd_hibernate_resume_generator_LDADD = \
2402         libsystemd-label.la \
2403         libsystemd-shared.la
2404
2405 EXTRA_DIST += \
2406         units/systemd-hibernate.service.in \
2407         units/systemd-hibernate-resume@.service.in \
2408         units/systemd-hybrid-sleep.service.in
2409
2410 dist_systemunit_DATA += \
2411         units/hibernate.target \
2412         units/hybrid-sleep.target
2413
2414 nodist_systemunit_DATA += \
2415         units/systemd-hibernate.service \
2416         units/systemd-hibernate-resume@.service \
2417         units/systemd-hybrid-sleep.service
2418 endif
2419
2420 # ------------------------------------------------------------------------------
2421 if ENABLE_EFI
2422 systemgenerator_PROGRAMS +=  \
2423         systemd-efi-boot-generator
2424
2425 systemd_efi_boot_generator_SOURCES = \
2426         src/efi-boot-generator/efi-boot-generator.c
2427
2428 systemd_efi_boot_generator_LDADD = \
2429         libsystemd-label.la \
2430         libsystemd-shared.la
2431
2432 # ------------------------------------------------------------------------------
2433 bootctl_SOURCES = \
2434         src/boot/boot.h \
2435         src/boot/boot-loader.h \
2436         src/boot/bootctl.c \
2437         src/boot/boot-loader.c \
2438         src/boot/boot-efi.c
2439
2440 bootctl_LDADD = \
2441         libsystemd-shared.la \
2442         libsystemd-internal.la
2443
2444 bin_PROGRAMS += \
2445         bootctl
2446
2447 dist_bashcompletion_DATA += \
2448         shell-completion/bash/bootctl
2449
2450 dist_zshcompletion_DATA += \
2451         shell-completion/zsh/_bootctl
2452
2453 endif
2454
2455 # ------------------------------------------------------------------------------
2456 if HAVE_BLKID
2457 systemgenerator_PROGRAMS +=  \
2458         systemd-gpt-auto-generator
2459
2460 systemd_gpt_auto_generator_SOURCES = \
2461         src/gpt-auto-generator/gpt-auto-generator.c \
2462         src/shared/blkid-util.h
2463
2464 systemd_gpt_auto_generator_LDADD = \
2465         libsystemd-label.la \
2466         libsystemd-internal.la \
2467         libudev-internal.la \
2468         libsystemd-shared.la \
2469         $(BLKID_LIBS)
2470
2471 systemd_gpt_auto_generator_CFLAGS = \
2472         $(AM_CFLAGS) \
2473         $(BLKID_CFLAGS)
2474 endif
2475
2476 # ------------------------------------------------------------------------------
2477 if ENABLE_KDBUS
2478 systemgenerator_PROGRAMS +=  \
2479         systemd-dbus1-generator
2480
2481 systemd_dbus1_generator_SOURCES = \
2482         src/dbus1-generator/dbus1-generator.c
2483
2484 systemd_dbus1_generator_LDADD = \
2485         libsystemd-label.la \
2486         libsystemd-internal.la \
2487         libsystemd-shared.la
2488
2489 dbus1-generator-install-hook:
2490         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
2491         $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2492         $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2493
2494 dbus1-generator-uninstall-hook:
2495         rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2496
2497 dist_xinitrc_SCRIPTS = \
2498         xorg/50-systemd-user.sh
2499
2500 INSTALL_EXEC_HOOKS += dbus1-generator-install-hook
2501 UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook
2502 endif
2503
2504 # ------------------------------------------------------------------------------
2505 systemd_sysv_generator_SOURCES = \
2506         src/sysv-generator/sysv-generator.c
2507
2508 systemd_sysv_generator_LDADD = \
2509         libsystemd-core.la \
2510         libsystemd-label.la \
2511         libsystemd-shared.la
2512
2513 # ------------------------------------------------------------------------------
2514 systemd_rc_local_generator_SOURCES = \
2515         src/rc-local-generator/rc-local-generator.c
2516
2517 systemd_rc_local_generator_LDADD = \
2518         libsystemd-label.la \
2519         libsystemd-shared.la
2520
2521 # ------------------------------------------------------------------------------
2522 systemd_remount_fs_SOURCES = \
2523         src/remount-fs/remount-fs.c \
2524         src/core/mount-setup.c \
2525         src/core/mount-setup.h
2526
2527 systemd_remount_fs_LDADD = \
2528         libsystemd-label.la \
2529         libsystemd-shared.la
2530
2531 # ------------------------------------------------------------------------------
2532 systemd_cgroups_agent_SOURCES = \
2533         src/cgroups-agent/cgroups-agent.c
2534
2535 systemd_cgroups_agent_LDADD = \
2536         libsystemd-internal.la \
2537         libsystemd-shared.la
2538
2539 # ------------------------------------------------------------------------------
2540 systemd_escape_SOURCES = \
2541         src/escape/escape.c
2542
2543 systemd_escape_LDADD = \
2544         libsystemd-shared.la
2545
2546 # -----------------------------------------------------------------------------
2547 systemctl_SOURCES = \
2548         src/systemctl/systemctl.c
2549
2550 systemctl_LDADD = \
2551         libsystemd-units.la \
2552         libsystemd-label.la \
2553         libsystemd-internal.la \
2554         libsystemd-logs.la \
2555         libsystemd-journal-internal.la \
2556         libsystemd-shared.la
2557
2558 # ------------------------------------------------------------------------------
2559 systemd_notify_SOURCES = \
2560         src/notify/notify.c
2561
2562 systemd_notify_LDADD = \
2563         libsystemd-internal.la \
2564         libsystemd-shared.la
2565
2566 # ------------------------------------------------------------------------------
2567 systemd_path_SOURCES = \
2568         src/path/path.c
2569
2570 systemd_path_LDADD = \
2571         libsystemd-internal.la \
2572         libsystemd-shared.la
2573
2574 # ------------------------------------------------------------------------------
2575 systemd_ask_password_SOURCES = \
2576         src/ask-password/ask-password.c
2577
2578 systemd_ask_password_LDADD = \
2579         libsystemd-label.la \
2580         libsystemd-shared.la
2581
2582 # ------------------------------------------------------------------------------
2583 systemd_reply_password_SOURCES = \
2584         src/reply-password/reply-password.c
2585
2586 systemd_reply_password_LDADD = \
2587         libsystemd-shared.la
2588
2589 # ------------------------------------------------------------------------------
2590 systemd_cgls_SOURCES = \
2591         src/cgls/cgls.c
2592
2593 systemd_cgls_LDADD = \
2594         libsystemd-internal.la \
2595         libsystemd-shared.la
2596
2597 # ------------------------------------------------------------------------------
2598 systemd_cgtop_SOURCES = \
2599         src/cgtop/cgtop.c
2600
2601 systemd_cgtop_LDADD = \
2602         libsystemd-shared.la
2603
2604 # ------------------------------------------------------------------------------
2605 systemd_nspawn_SOURCES = \
2606         src/nspawn/nspawn.c \
2607         src/core/mount-setup.c \
2608         src/core/mount-setup.h \
2609         src/core/loopback-setup.c \
2610         src/core/loopback-setup.h
2611
2612 systemd_nspawn_CFLAGS = \
2613         $(AM_CFLAGS) \
2614         $(SECCOMP_CFLAGS) \
2615         $(BLKID_CFLAGS)
2616
2617 systemd_nspawn_LDADD = \
2618         libsystemd-label.la \
2619         libsystemd-internal.la \
2620         libudev-internal.la \
2621         libsystemd-shared.la \
2622         $(BLKID_LIBS)
2623
2624 if HAVE_SECCOMP
2625 systemd_nspawn_LDADD += \
2626         libsystemd-seccomp.la \
2627         $(SECCOMP_LIBS)
2628 endif
2629
2630 # ------------------------------------------------------------------------------
2631 systemd_run_SOURCES = \
2632         src/run/run.c
2633
2634 systemd_run_LDADD = \
2635         libsystemd-label.la \
2636         libsystemd-internal.la \
2637         libsystemd-shared.la
2638
2639 # ------------------------------------------------------------------------------
2640 systemd_bus_proxyd_SOURCES = \
2641         src/bus-proxyd/bus-proxyd.c \
2642         src/bus-proxyd/bus-xml-policy.c \
2643         src/bus-proxyd/bus-xml-policy.h
2644
2645 systemd_bus_proxyd_LDADD = \
2646         libsystemd-internal.la \
2647         libsystemd-shared.la
2648
2649 bus-proxyd-install-hook:
2650         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir)
2651         $(AM_V_RM)rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
2652         $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
2653
2654 bus-proxyd-uninstall-hook:
2655         rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
2656
2657 INSTALL_EXEC_HOOKS += bus-proxyd-install-hook
2658 UNINSTALL_EXEC_HOOKS += bus-proxyd-uninstall-hook
2659
2660 if ENABLE_KDBUS
2661 nodist_systemunit_DATA += \
2662         units/systemd-bus-proxyd@.service
2663
2664 dist_systemunit_DATA += \
2665         units/systemd-bus-proxyd.socket
2666
2667 nodist_userunit_DATA += \
2668         units/user/systemd-bus-proxyd@.service
2669
2670 dist_userunit_DATA += \
2671         units/user/systemd-bus-proxyd.socket
2672 endif
2673
2674 EXTRA_DIST += \
2675         units/systemd-bus-proxyd@.service.m4.in \
2676         units/user/systemd-bus-proxyd@.service.in
2677
2678 CLEANFILES += \
2679         units/systemd-bus-proxyd@.service.m4
2680
2681 if HAVE_SMACK
2682 bus-proxyd-set-cap-hook:
2683         -$(SETCAP) cap_mac_admin+ei $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd
2684
2685 INSTALL_EXEC_HOOKS += bus-proxyd-set-cap-hook
2686 endif
2687
2688 # ------------------------------------------------------------------------------
2689 systemd_tty_ask_password_agent_SOURCES = \
2690         src/tty-ask-password-agent/tty-ask-password-agent.c
2691
2692 systemd_tty_ask_password_agent_LDADD = \
2693         libsystemd-label.la \
2694         libsystemd-shared.la
2695
2696 # ------------------------------------------------------------------------------
2697 libsystemd_internal_la_SOURCES = \
2698         src/systemd/sd-bus.h \
2699         src/systemd/sd-bus-protocol.h \
2700         src/systemd/sd-bus-vtable.h \
2701         src/systemd/sd-utf8.h \
2702         src/systemd/sd-event.h \
2703         src/systemd/sd-rtnl.h \
2704         src/systemd/sd-resolve.h \
2705         src/systemd/sd-login.h \
2706         src/systemd/sd-id128.h \
2707         src/systemd/sd-daemon.h \
2708         src/systemd/sd-path.h \
2709         src/systemd/sd-network.h \
2710         src/systemd/sd-hwdb.h \
2711         src/libsystemd/sd-bus/sd-bus.c \
2712         src/libsystemd/sd-bus/bus-control.c \
2713         src/libsystemd/sd-bus/bus-control.h \
2714         src/libsystemd/sd-bus/bus-error.c \
2715         src/libsystemd/sd-bus/bus-error.h \
2716         src/libsystemd/sd-bus/bus-common-errors.h \
2717         src/libsystemd/sd-bus/bus-common-errors.c \
2718         src/libsystemd/sd-bus/bus-internal.c \
2719         src/libsystemd/sd-bus/bus-internal.h \
2720         src/libsystemd/sd-bus/bus-socket.c \
2721         src/libsystemd/sd-bus/bus-socket.h \
2722         src/libsystemd/sd-bus/bus-kernel.c \
2723         src/libsystemd/sd-bus/bus-kernel.h \
2724         src/libsystemd/sd-bus/bus-container.c \
2725         src/libsystemd/sd-bus/bus-container.h \
2726         src/libsystemd/sd-bus/bus-message.c \
2727         src/libsystemd/sd-bus/bus-message.h \
2728         src/libsystemd/sd-bus/bus-creds.c \
2729         src/libsystemd/sd-bus/bus-creds.h \
2730         src/libsystemd/sd-bus/bus-signature.c \
2731         src/libsystemd/sd-bus/bus-signature.h \
2732         src/libsystemd/sd-bus/bus-type.c \
2733         src/libsystemd/sd-bus/bus-type.h \
2734         src/libsystemd/sd-bus/bus-match.c \
2735         src/libsystemd/sd-bus/bus-match.h \
2736         src/libsystemd/sd-bus/bus-bloom.c \
2737         src/libsystemd/sd-bus/bus-bloom.h \
2738         src/libsystemd/sd-bus/bus-introspect.c \
2739         src/libsystemd/sd-bus/bus-introspect.h \
2740         src/libsystemd/sd-bus/bus-objects.c \
2741         src/libsystemd/sd-bus/bus-objects.h \
2742         src/libsystemd/sd-bus/bus-gvariant.c \
2743         src/libsystemd/sd-bus/bus-gvariant.h \
2744         src/libsystemd/sd-bus/bus-convenience.c \
2745         src/libsystemd/sd-bus/bus-track.c \
2746         src/libsystemd/sd-bus/bus-track.h \
2747         src/libsystemd/sd-bus/bus-util.c \
2748         src/libsystemd/sd-bus/bus-util.h \
2749         src/libsystemd/sd-bus/bus-slot.c \
2750         src/libsystemd/sd-bus/bus-slot.h \
2751         src/libsystemd/sd-bus/bus-protocol.h \
2752         src/libsystemd/sd-bus/kdbus.h \
2753         src/libsystemd/sd-utf8/sd-utf8.c \
2754         src/libsystemd/sd-event/sd-event.c \
2755         src/libsystemd/sd-event/event-util.h \
2756         src/libsystemd/sd-rtnl/sd-rtnl.c \
2757         src/libsystemd/sd-rtnl/rtnl-internal.h \
2758         src/libsystemd/sd-rtnl/rtnl-message.c \
2759         src/libsystemd/sd-rtnl/rtnl-types.h \
2760         src/libsystemd/sd-rtnl/rtnl-types.c \
2761         src/libsystemd/sd-rtnl/rtnl-util.h \
2762         src/libsystemd/sd-rtnl/rtnl-util.c \
2763         src/libsystemd/sd-rtnl/local-addresses.h \
2764         src/libsystemd/sd-rtnl/local-addresses.c \
2765         src/libsystemd/sd-id128/sd-id128.c \
2766         src/libsystemd/sd-daemon/sd-daemon.c \
2767         src/libsystemd/sd-login/sd-login.c \
2768         src/libsystemd/sd-path/sd-path.c \
2769         src/libsystemd/sd-network/sd-network.c \
2770         src/libsystemd/sd-network/network-util.h \
2771         src/libsystemd/sd-network/network-util.c \
2772         src/libsystemd/sd-hwdb/sd-hwdb.c \
2773         src/libsystemd/sd-hwdb/hwdb-util.h \
2774         src/libsystemd/sd-hwdb/hwdb-internal.h
2775
2776 nodist_libsystemd_internal_la_SOURCES = \
2777         src/libsystemd/libsystemd.sym
2778
2779 libsystemd_internal_la_CFLAGS = \
2780         $(AM_CFLAGS) \
2781         -pthread
2782
2783 libsystemd_internal_la_LIBADD = \
2784         $(RT_LIBS)
2785
2786 libsystemd_resolve_la_SOURCES = \
2787         src/libsystemd/sd-resolve/sd-resolve.c \
2788         src/libsystemd/sd-resolve/resolve-util.h
2789
2790 libsystemd_resolve_la_CFLAGS = \
2791         $(AM_CFLAGS) \
2792         -pthread
2793
2794 libsystemd_resolve_la_LIBADD = \
2795         -lresolv
2796
2797 noinst_LTLIBRARIES += \
2798         libsystemd-internal.la \
2799         libsystemd-resolve.la
2800
2801 libsystemd_dump_la_SOURCES = \
2802         src/libsystemd/sd-bus/bus-dump.c \
2803         src/libsystemd/sd-bus/bus-dump.h
2804
2805 noinst_LTLIBRARIES += \
2806         libsystemd-dump.la
2807
2808 EXTRA_DIST += \
2809         src/libsystemd/libsystemd.sym.m4 \
2810         src/libsystemd/libsystemd.pc.in \
2811         src/libsystemd/sd-bus/DIFFERENCES \
2812         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
2813
2814 CLEANFILES += \
2815         src/libsystemd/libsystemd.sym
2816
2817 BUILT_SOURCES += \
2818         src/libsystemd/libsystemd.sym
2819
2820 libsystemd_la_SOURCES = \
2821         $(libsystemd_internal_la_SOURCES) \
2822         $(libsystemd_resolve_la_SOURCES) \
2823         $(libsystemd_journal_internal_la_SOURCES)
2824
2825 nodist_libsystemd_la_SOURCES = \
2826         $(nodist_libsystemd_internal_la_SOURCES)
2827
2828 libsystemd_la_CFLAGS = \
2829         $(libsystemd_internal_la_CFLAGS) \
2830         $(libsystemd_resolve_la_CFLAGS) \
2831         $(libsystemd_journal_internal_la_CFLAGS)
2832
2833 libsystemd_la_LDFLAGS = \
2834         $(AM_LDFLAGS) \
2835         -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
2836         -Wl,--version-script=$(top_builddir)/src/libsystemd/libsystemd.sym
2837
2838 libsystemd_la_LIBADD = \
2839         libsystemd-shared.la \
2840         $(libsystemd_internal_la_LIBADD) \
2841         $(libsystemd_journal_internal_la_LIBADD) \
2842         $(libsystemd_resolve_la_LIBADD)
2843
2844 libsystemd-install-hook:
2845         libname=libsystemd.so && $(move-to-rootlibdir)
2846
2847 libsystemd-uninstall-hook:
2848         rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
2849
2850 INSTALL_EXEC_HOOKS += libsystemd-install-hook
2851 UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
2852
2853 pkgconfiglib_DATA += \
2854         src/libsystemd/libsystemd.pc
2855
2856 pkginclude_HEADERS += \
2857         src/systemd/sd-login.h \
2858         src/systemd/sd-id128.h \
2859         src/systemd/sd-daemon.h
2860
2861 if ENABLE_KDBUS
2862 pkginclude_HEADERS += \
2863         src/systemd/sd-bus.h \
2864         src/systemd/sd-bus-protocol.h \
2865         src/systemd/sd-bus-vtable.h \
2866         src/systemd/sd-utf8.h \
2867         src/systemd/sd-event.h \
2868         src/systemd/sd-rtnl.h \
2869         src/systemd/sd-resolve.h \
2870         src/systemd/sd-path.h
2871 endif
2872
2873 lib_LTLIBRARIES += \
2874         libsystemd.la
2875
2876 tests += \
2877         test-bus-marshal \
2878         test-bus-signature \
2879         test-bus-chat \
2880         test-bus-cleanup \
2881         test-bus-server \
2882         test-bus-match \
2883         test-bus-kernel \
2884         test-bus-kernel-bloom \
2885         test-bus-kernel-benchmark \
2886         test-bus-zero-copy \
2887         test-bus-introspect \
2888         test-bus-objects \
2889         test-bus-error \
2890         test-bus-creds \
2891         test-bus-gvariant \
2892         test-event \
2893         test-rtnl \
2894         test-local-addresses \
2895         test-resolve
2896
2897 bin_PROGRAMS += \
2898         busctl
2899
2900 test_bus_marshal_SOURCES = \
2901         src/libsystemd/sd-bus/test-bus-marshal.c
2902
2903 test_bus_marshal_LDADD = \
2904         libsystemd-dump.la \
2905         libsystemd-internal.la \
2906         libsystemd-shared.la \
2907         $(GLIB_LIBS) \
2908         $(DBUS_LIBS)
2909
2910 test_bus_marshal_CFLAGS = \
2911         $(AM_CFLAGS) \
2912         $(GLIB_CFLAGS) \
2913         $(DBUS_CFLAGS)
2914
2915 test_bus_signature_SOURCES = \
2916         src/libsystemd/sd-bus/test-bus-signature.c
2917
2918 test_bus_signature_LDADD = \
2919         libsystemd-internal.la \
2920         libsystemd-shared.la
2921
2922 test_bus_chat_SOURCES = \
2923         src/libsystemd/sd-bus/test-bus-chat.c
2924
2925 test_bus_chat_CFLAGS = \
2926         $(AM_CFLAGS) \
2927         -pthread
2928
2929 test_bus_chat_LDADD = \
2930         libsystemd-internal.la \
2931         libsystemd-shared.la
2932
2933 test_bus_cleanup_SOURCES = \
2934         src/libsystemd/sd-bus/test-bus-cleanup.c
2935
2936 test_bus_cleanup_CFLAGS = \
2937         $(AM_CFLAGS) \
2938         $(SECCOMP_CFLAGS)
2939
2940 test_bus_cleanup_LDADD = \
2941         libsystemd-internal.la \
2942         libsystemd-shared.la
2943
2944 test_bus_server_SOURCES = \
2945         src/libsystemd/sd-bus/test-bus-server.c
2946
2947 test_bus_server_CFLAGS = \
2948         $(AM_CFLAGS) \
2949         -pthread
2950
2951 test_bus_server_LDADD = \
2952         libsystemd-internal.la \
2953         libsystemd-shared.la
2954
2955 test_bus_objects_SOURCES = \
2956         src/libsystemd/sd-bus/test-bus-objects.c
2957
2958 test_bus_objects_CFLAGS = \
2959         $(AM_CFLAGS) \
2960         -pthread
2961
2962 test_bus_objects_LDADD = \
2963         libsystemd-dump.la \
2964         libsystemd-internal.la \
2965         libsystemd-shared.la
2966
2967 test_bus_error_SOURCES = \
2968         src/libsystemd/sd-bus/test-bus-error.c
2969
2970 test_bus_error_LDADD = \
2971         libsystemd-internal.la \
2972         libsystemd-shared.la
2973
2974 test_bus_gvariant_SOURCES = \
2975         src/libsystemd/sd-bus/test-bus-gvariant.c
2976
2977 test_bus_gvariant_LDADD = \
2978         libsystemd-dump.la \
2979         libsystemd-internal.la \
2980         libsystemd-shared.la \
2981         $(GLIB_LIBS)
2982
2983 test_bus_gvariant_CFLAGS = \
2984         $(AM_CFLAGS) \
2985         $(GLIB_CFLAGS)
2986
2987 test_bus_creds_SOURCES = \
2988         src/libsystemd/sd-bus/test-bus-creds.c
2989
2990 test_bus_creds_LDADD = \
2991         libsystemd-dump.la \
2992         libsystemd-internal.la \
2993         libsystemd-shared.la
2994
2995 test_bus_match_SOURCES = \
2996         src/libsystemd/sd-bus/test-bus-match.c
2997
2998 test_bus_match_LDADD = \
2999         libsystemd-internal.la \
3000         libsystemd-shared.la
3001
3002 test_bus_kernel_SOURCES = \
3003         src/libsystemd/sd-bus/test-bus-kernel.c
3004
3005 test_bus_kernel_LDADD = \
3006         libsystemd-dump.la \
3007         libsystemd-internal.la \
3008         libsystemd-shared.la
3009
3010 test_bus_kernel_bloom_SOURCES = \
3011         src/libsystemd/sd-bus/test-bus-kernel-bloom.c
3012
3013 test_bus_kernel_bloom_LDADD = \
3014         libsystemd-internal.la \
3015         libsystemd-shared.la
3016
3017 test_bus_kernel_benchmark_SOURCES = \
3018         src/libsystemd/sd-bus/test-bus-kernel-benchmark.c
3019
3020 test_bus_kernel_benchmark_LDADD = \
3021         libsystemd-internal.la \
3022         libsystemd-shared.la
3023
3024 test_bus_zero_copy_SOURCES = \
3025         src/libsystemd/sd-bus/test-bus-zero-copy.c
3026
3027 test_bus_zero_copy_LDADD = \
3028         libsystemd-dump.la \
3029         libsystemd-internal.la \
3030         libsystemd-shared.la
3031
3032 test_bus_introspect_SOURCES = \
3033         src/libsystemd/sd-bus/test-bus-introspect.c
3034
3035 test_bus_introspect_LDADD = \
3036         libsystemd-internal.la \
3037         libsystemd-shared.la
3038
3039 test_event_SOURCES = \
3040         src/libsystemd/sd-event/test-event.c
3041
3042 test_event_LDADD = \
3043         libsystemd-internal.la \
3044         libsystemd-shared.la
3045
3046 test_rtnl_SOURCES = \
3047         src/libsystemd/sd-rtnl/test-rtnl.c
3048
3049 test_rtnl_LDADD = \
3050         libsystemd-internal.la \
3051         libsystemd-shared.la
3052
3053 test_local_addresses_SOURCES = \
3054         src/libsystemd/sd-rtnl/test-local-addresses.c
3055
3056 test_local_addresses_LDADD = \
3057         libsystemd-internal.la \
3058         libsystemd-shared.la
3059
3060 test_resolve_SOURCES = \
3061         src/libsystemd/sd-resolve/test-resolve.c
3062
3063 test_resolve_LDADD = \
3064         libsystemd-resolve.la \
3065         libsystemd-internal.la \
3066         libsystemd-shared.la
3067
3068 test_resolve_CFLAGS = \
3069         $(AM_CFLAGS) \
3070         -pthread
3071
3072 busctl_SOURCES = \
3073         src/libsystemd/sd-bus/busctl.c \
3074         src/libsystemd/sd-bus/busctl-introspect.c \
3075         src/libsystemd/sd-bus/busctl-introspect.h
3076
3077 busctl_LDADD = \
3078         libsystemd-dump.la \
3079         libsystemd-internal.la \
3080         libsystemd-shared.la
3081
3082 # ------------------------------------------------------------------------------
3083 noinst_LTLIBRARIES += \
3084         libsystemd-network.la
3085
3086 libsystemd_network_la_CFLAGS = \
3087         $(AM_CFLAGS) \
3088         $(KMOD_CFLAGS)
3089
3090 libsystemd_network_la_SOURCES = \
3091         src/systemd/sd-dhcp-client.h \
3092         src/systemd/sd-dhcp-server.h \
3093         src/systemd/sd-dhcp-lease.h \
3094         src/systemd/sd-ipv4ll.h \
3095         src/systemd/sd-icmp6-nd.h \
3096         src/systemd/sd-dhcp6-client.h \
3097         src/systemd/sd-dhcp6-lease.h \
3098         src/systemd/sd-pppoe.h \
3099         src/systemd/sd-lldp.h \
3100         src/libsystemd-network/sd-dhcp-client.c \
3101         src/libsystemd-network/sd-dhcp-server.c \
3102         src/libsystemd-network/dhcp-network.c \
3103         src/libsystemd-network/dhcp-option.c \
3104         src/libsystemd-network/dhcp-packet.c \
3105         src/libsystemd-network/dhcp-internal.h \
3106         src/libsystemd-network/dhcp-server-internal.h \
3107         src/libsystemd-network/dhcp-protocol.h \
3108         src/libsystemd-network/dhcp-lease-internal.h \
3109         src/libsystemd-network/sd-dhcp-lease.c \
3110         src/libsystemd-network/sd-ipv4ll.c \
3111         src/libsystemd-network/ipv4ll-network.c \
3112         src/libsystemd-network/ipv4ll-packet.c \
3113         src/libsystemd-network/ipv4ll-internal.h \
3114         src/libsystemd-network/sd-pppoe.c \
3115         src/libsystemd-network/network-internal.c \
3116         src/libsystemd-network/network-internal.h \
3117         src/libsystemd-network/sd-icmp6-nd.c \
3118         src/libsystemd-network/sd-dhcp6-client.c \
3119         src/libsystemd-network/dhcp6-internal.h \
3120         src/libsystemd-network/dhcp6-protocol.h \
3121         src/libsystemd-network/dhcp6-network.c \
3122         src/libsystemd-network/dhcp6-option.c \
3123         src/libsystemd-network/dhcp6-lease-internal.h \
3124         src/libsystemd-network/sd-dhcp6-lease.c \
3125         src/libsystemd-network/lldp.h \
3126         src/libsystemd-network/lldp-tlv.h \
3127         src/libsystemd-network/lldp-tlv.c \
3128         src/libsystemd-network/lldp-network.h \
3129         src/libsystemd-network/lldp-network.c \
3130         src/libsystemd-network/lldp-port.h \
3131         src/libsystemd-network/lldp-port.c \
3132         src/libsystemd-network/lldp-internal.h \
3133         src/libsystemd-network/lldp-internal.c \
3134         src/libsystemd-network/lldp-util.h \
3135         src/libsystemd-network/sd-lldp.c
3136
3137 libsystemd_network_la_LIBADD = \
3138         libudev-internal.la \
3139         libsystemd-label.la \
3140         libsystemd-internal.la \
3141         libsystemd-shared.la \
3142         $(KMOD_LIBS)
3143
3144 test_dhcp_option_SOURCES = \
3145         src/libsystemd-network/dhcp-protocol.h \
3146         src/libsystemd-network/dhcp-internal.h \
3147         src/libsystemd-network/test-dhcp-option.c
3148
3149 test_dhcp_option_LDADD = \
3150         libsystemd-network.la \
3151         libsystemd-internal.la \
3152         libsystemd-shared.la
3153
3154 test_dhcp_client_SOURCES = \
3155         src/systemd/sd-dhcp-client.h \
3156         src/libsystemd-network/dhcp-protocol.h \
3157         src/libsystemd-network/dhcp-internal.h \
3158         src/libsystemd-network/test-dhcp-client.c
3159
3160 test_dhcp_client_LDADD = \
3161         libsystemd-network.la \
3162         libsystemd-label.la \
3163         libsystemd-internal.la \
3164         libsystemd-shared.la
3165
3166 test_dhcp_server_SOURCES = \
3167         src/libsystemd-network/test-dhcp-server.c
3168
3169 test_dhcp_server_LDADD = \
3170         libsystemd-network.la \
3171         libsystemd-internal.la \
3172         libsystemd-shared.la
3173
3174 test_ipv4ll_SOURCES = \
3175         src/systemd/sd-ipv4ll.h \
3176         src/libsystemd-network/ipv4ll-internal.h \
3177         src/libsystemd-network/test-ipv4ll.c
3178
3179 test_ipv4ll_LDADD = \
3180         libsystemd-network.la \
3181         libsystemd-label.la \
3182         libsystemd-internal.la \
3183         libsystemd-shared.la
3184
3185 test_pppoe_SOURCES = \
3186         src/systemd/sd-pppoe.h \
3187         src/libsystemd-network/test-pppoe.c
3188
3189 test_pppoe_LDADD = \
3190         libsystemd-network.la \
3191         libsystemd-shared.la
3192
3193 test_icmp6_rs_SOURCES = \
3194         src/systemd/sd-dhcp6-client.h \
3195         src/systemd/sd-icmp6-nd.h \
3196         src/libsystemd-network/dhcp6-internal.h \
3197         src/libsystemd-network/test-icmp6-rs.c
3198
3199 test_icmp6_rs_LDADD = \
3200         libsystemd-network.la \
3201         libsystemd-internal.la \
3202         libsystemd-shared.la
3203
3204 test_dhcp6_client_SOURCES = \
3205         src/systemd/sd-dhcp6-client.h \
3206         src/libsystemd-network/dhcp6-internal.h \
3207         src/libsystemd-network/test-dhcp6-client.c
3208
3209 test_dhcp6_client_LDADD = \
3210         libsystemd-network.la \
3211         libsystemd-internal.la \
3212         libsystemd-shared.la
3213
3214 test_lldp_SOURCES = \
3215        src/libsystemd-network/lldp.h \
3216        src/libsystemd-network/lldp-tlv.h \
3217        src/libsystemd-network/lldp-tlv.c \
3218        src/libsystemd-network/test-lldp.c
3219
3220 test_lldp_LDADD = \
3221         libsystemd-network.la \
3222         libsystemd-internal.la \
3223         libsystemd-shared.la
3224
3225 tests += \
3226         test-dhcp-option \
3227         test-dhcp-client \
3228         test-dhcp-server \
3229         test-ipv4ll \
3230         test-icmp6-rs \
3231         test-dhcp6-client \
3232         test-lldp
3233
3234 manual_tests += \
3235         test-pppoe
3236
3237 # ------------------------------------------------------------------------------
3238 if ENABLE_TERMINAL
3239 noinst_LTLIBRARIES += \
3240         libsystemd-terminal.la
3241
3242 rootlibexec_PROGRAMS += \
3243         systemd-consoled
3244
3245 noinst_PROGRAMS += \
3246         systemd-evcat \
3247         systemd-modeset \
3248         systemd-subterm
3249
3250 dist_pkgdata_DATA += \
3251         src/libsystemd-terminal/unifont-glyph-array.bin
3252
3253 nodist_userunit_DATA += \
3254         units/user/systemd-consoled.service
3255
3256 USER_DEFAULT_TARGET_WANTS += \
3257         systemd-consoled.service
3258
3259 tests += \
3260         test-term-page \
3261         test-term-parser \
3262         test-unifont
3263 endif
3264
3265 EXTRA_DIST += \
3266         units/user/systemd-consoled.service.in
3267
3268 libsystemd_terminal_la_CFLAGS = \
3269         $(AM_CFLAGS) \
3270         $(TERMINAL_CFLAGS)
3271
3272 libsystemd_terminal_la_SOURCES = \
3273         src/libsystemd-terminal/grdev.h \
3274         src/libsystemd-terminal/grdev-internal.h \
3275         src/libsystemd-terminal/grdev.c \
3276         src/libsystemd-terminal/grdev-drm.c \
3277         src/libsystemd-terminal/idev.h \
3278         src/libsystemd-terminal/idev-internal.h \
3279         src/libsystemd-terminal/idev.c \
3280         src/libsystemd-terminal/idev-evdev.c \
3281         src/libsystemd-terminal/idev-keyboard.c \
3282         src/libsystemd-terminal/sysview.h \
3283         src/libsystemd-terminal/sysview-internal.h \
3284         src/libsystemd-terminal/sysview.c \
3285         src/libsystemd-terminal/term.h \
3286         src/libsystemd-terminal/term-internal.h \
3287         src/libsystemd-terminal/term-charset.c \
3288         src/libsystemd-terminal/term-page.c \
3289         src/libsystemd-terminal/term-parser.c \
3290         src/libsystemd-terminal/term-screen.c \
3291         src/libsystemd-terminal/term-wcwidth.c \
3292         src/libsystemd-terminal/unifont.h \
3293         src/libsystemd-terminal/unifont-def.h \
3294         src/libsystemd-terminal/unifont.c
3295
3296 libsystemd_terminal_la_LIBADD = \
3297         libudev-internal.la \
3298         libsystemd-internal.la \
3299         libsystemd-shared.la \
3300         $(TERMINAL_LIBS)
3301
3302 systemd_consoled_CFLAGS = \
3303         $(AM_CFLAGS) \
3304         $(TERMINAL_CFLAGS)
3305
3306 systemd_consoled_SOURCES = \
3307         src/console/consoled.h \
3308         src/console/consoled.c \
3309         src/console/consoled-display.c \
3310         src/console/consoled-manager.c \
3311         src/console/consoled-session.c \
3312         src/console/consoled-terminal.c \
3313         src/console/consoled-workspace.c
3314
3315 systemd_consoled_LDADD = \
3316         libsystemd-terminal.la \
3317         libsystemd-internal.la \
3318         libsystemd-shared.la \
3319         $(TERMINAL_LIBS)
3320
3321 systemd_evcat_CFLAGS = \
3322         $(AM_CFLAGS) \
3323         $(TERMINAL_CFLAGS)
3324
3325 systemd_evcat_SOURCES = \
3326         src/libsystemd-terminal/evcat.c
3327
3328 systemd_evcat_LDADD = \
3329         libsystemd-terminal.la \
3330         libsystemd-internal.la \
3331         libsystemd-shared.la \
3332         $(TERMINAL_LIBS)
3333
3334 systemd_modeset_CFLAGS = \
3335         $(AM_CFLAGS) \
3336         $(TERMINAL_CFLAGS)
3337
3338 systemd_modeset_SOURCES = \
3339         src/libsystemd-terminal/modeset.c
3340
3341 systemd_modeset_LDADD = \
3342         libsystemd-terminal.la \
3343         libsystemd-internal.la \
3344         libsystemd-shared.la \
3345         $(TERMINAL_LIBS)
3346
3347 systemd_subterm_SOURCES = \
3348         src/libsystemd-terminal/subterm.c
3349
3350 systemd_subterm_LDADD = \
3351         libsystemd-terminal.la \
3352         libsystemd-internal.la \
3353         libsystemd-shared.la
3354
3355 test_term_page_SOURCES = \
3356         src/libsystemd-terminal/test-term-page.c
3357
3358 test_term_page_LDADD = \
3359         libsystemd-terminal.la \
3360         libsystemd-internal.la \
3361         libsystemd-shared.la
3362
3363 test_term_parser_SOURCES = \
3364         src/libsystemd-terminal/test-term-parser.c
3365
3366 test_term_parser_LDADD = \
3367         libsystemd-terminal.la \
3368         libsystemd-internal.la \
3369         libsystemd-shared.la
3370
3371 test_unifont_SOURCES = \
3372         src/libsystemd-terminal/test-unifont.c
3373
3374 test_unifont_LDADD = \
3375         libsystemd-terminal.la \
3376         libsystemd-internal.la \
3377         libsystemd-shared.la
3378
3379 .PHONY: update-unifont
3380 update-unifont: tools/compile-unifont.py
3381         $(AM_V_GEN)$(PYTHON) $< \
3382                 <$(top_srcdir)/src/libsystemd-terminal/unifont.hex \
3383                 >$(top_srcdir)/src/libsystemd-terminal/unifont-glyph-array.bin
3384         @echo "unifont-glyph-array.bin has been regenerated"
3385
3386 # ------------------------------------------------------------------------------
3387 if ENABLE_GTK_DOC
3388 SUBDIRS += \
3389         docs/libudev
3390
3391 noinst_DATA += \
3392         docs/html/libudev \
3393         docs/html/gudev
3394 endif
3395
3396 include_HEADERS += \
3397         src/libudev/libudev.h
3398
3399 lib_LTLIBRARIES += \
3400         libudev.la
3401
3402 libudev_la_SOURCES =\
3403         src/libudev/libudev.sym \
3404         src/libudev/libudev-private.h \
3405         src/libudev/libudev.c \
3406         src/libudev/libudev-list.c \
3407         src/libudev/libudev-util.c \
3408         src/libudev/libudev-device.c \
3409         src/libudev/libudev-enumerate.c \
3410         src/libudev/libudev-monitor.c \
3411         src/libudev/libudev-queue.c \
3412         src/libudev/libudev-hwdb.c
3413
3414 libudev_la_CFLAGS = \
3415         $(AM_CFLAGS) \
3416         -fvisibility=hidden
3417
3418 libudev_la_LDFLAGS = \
3419         $(AM_LDFLAGS) \
3420         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
3421         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
3422
3423 libudev_la_LIBADD = \
3424         libsystemd-internal.la \
3425         libsystemd-shared.la
3426
3427 pkgconfiglib_DATA += \
3428         src/libudev/libudev.pc
3429
3430 EXTRA_DIST += \
3431         src/libudev/libudev.pc.in
3432
3433 CLEANFILES += \
3434         src/libudev/libudev.pc \
3435         docs/html/libudev \
3436         docs/html/gudev
3437
3438 docs/html/libudev:
3439         $(AM_V_at)$(MKDIR_P) $(dir $@)
3440         $(AM_V_LN)$(LN_S) -f ../libudev/html $@
3441
3442 docs/html/gudev:
3443         $(AM_V_at)$(MKDIR_P) $(dir $@)
3444         $(AM_V_LN)$(LN_S) -f ../gudev/html $@
3445
3446 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
3447 libudev-install-hook:
3448         libname=libudev.so && $(move-to-rootlibdir)
3449
3450 libudev-uninstall-hook:
3451         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
3452
3453 INSTALL_EXEC_HOOKS += libudev-install-hook
3454 UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
3455
3456 # ------------------------------------------------------------------------------
3457 noinst_LTLIBRARIES += \
3458         libudev-internal.la
3459
3460 libudev_internal_la_SOURCES =\
3461         $(libudev_la_SOURCES) \
3462         src/libudev/libudev-device-private.c
3463
3464 libudev_internal_la_CFLAGS = \
3465         $(AM_CFLAGS) \
3466         -fvisibility=default
3467
3468 # ------------------------------------------------------------------------------
3469 INSTALL_DIRS += \
3470         $(sysconfdir)/udev/rules.d
3471
3472 dist_network_DATA = \
3473         network/99-default.link \
3474         network/80-container-host0.network \
3475         network/80-container-ve.network
3476
3477 dist_udevrules_DATA += \
3478         rules/42-usb-hid-pm.rules \
3479         rules/50-udev-default.rules \
3480         rules/60-drm.rules \
3481         rules/60-keyboard.rules \
3482         rules/70-mouse.rules \
3483         rules/60-persistent-storage-tape.rules \
3484         rules/60-persistent-serial.rules \
3485         rules/60-persistent-input.rules \
3486         rules/60-persistent-alsa.rules \
3487         rules/60-persistent-storage.rules \
3488         rules/64-btrfs.rules \
3489         rules/75-net-description.rules \
3490         rules/75-tty-description.rules \
3491         rules/78-sound-card.rules \
3492         rules/80-net-setup-link.rules \
3493         rules/95-udev-late.rules
3494
3495 nodist_udevrules_DATA += \
3496         rules/99-systemd.rules
3497
3498 udevconfdir = $(sysconfdir)/udev
3499 dist_udevconf_DATA = \
3500         src/udev/udev.conf
3501
3502 sharepkgconfigdir = $(datadir)/pkgconfig
3503 sharepkgconfig_DATA = \
3504         src/udev/udev.pc
3505
3506 EXTRA_DIST += \
3507         rules/99-systemd.rules.in \
3508         src/udev/udev.pc.in
3509
3510 CLEANFILES += \
3511         rules/99-systemd.rules \
3512         src/udev/udev.pc
3513
3514 EXTRA_DIST += \
3515         units/systemd-udevd.service.in \
3516         units/systemd-udev-trigger.service.in \
3517         units/systemd-udev-settle.service.in
3518
3519 CLEANFILES += \
3520         units/systemd-udevd.service \
3521         units/systemd-udev-trigger.service \
3522         units/systemd-udev-settle.service
3523
3524 SOCKETS_TARGET_WANTS += \
3525         systemd-udevd-control.socket \
3526         systemd-udevd-kernel.socket
3527
3528 SYSINIT_TARGET_WANTS += \
3529         systemd-udevd.service \
3530         systemd-udev-trigger.service
3531
3532 rootbin_PROGRAMS += \
3533         udevadm
3534
3535 rootlibexec_PROGRAMS += \
3536         systemd-udevd
3537
3538 noinst_LTLIBRARIES += \
3539         libudev-core.la
3540
3541 src/udev/keyboard-keys.txt:
3542         $(AM_V_at)$(MKDIR_P) $(dir $@)
3543         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
3544
3545 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt
3546         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
3547
3548 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
3549         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
3550
3551 src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt
3552         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
3553
3554 libudev_core_la_SOURCES = \
3555         src/udev/udev.h \
3556         src/udev/udev-event.c \
3557         src/udev/udev-watch.c \
3558         src/udev/udev-node.c \
3559         src/udev/udev-rules.c \
3560         src/udev/udev-ctrl.c \
3561         src/udev/udev-builtin.c \
3562         src/udev/udev-builtin-btrfs.c \
3563         src/udev/udev-builtin-hwdb.c \
3564         src/udev/udev-builtin-input_id.c \
3565         src/udev/udev-builtin-keyboard.c \
3566         src/udev/udev-builtin-net_id.c \
3567         src/udev/udev-builtin-net_setup_link.c \
3568         src/udev/udev-builtin-path_id.c \
3569         src/udev/udev-builtin-usb_id.c \
3570         src/udev/net/link-config.h \
3571         src/udev/net/link-config.c \
3572         src/udev/net/ethtool-util.h \
3573         src/udev/net/ethtool-util.c
3574
3575 nodist_libudev_core_la_SOURCES = \
3576         src/udev/keyboard-keys-from-name.h \
3577         src/udev/keyboard-keys-to-name.h \
3578         src/udev/net/link-config-gperf.c
3579
3580 BUILT_SOURCES += \
3581         $(nodist_libudev_core_la_SOURCES)
3582
3583 CLEANFILES += \
3584         src/udev/keyboard-keys-from-name.gperf \
3585         src/udev/keyboard-keys.txt \
3586         src/udev/net/link-config-gperf.c
3587
3588 EXTRA_DIST += \
3589         src/udev/net/link-config-gperf.gperf
3590
3591 libudev_core_la_CFLAGS = \
3592         $(AM_CFLAGS) \
3593         $(BLKID_CFLAGS) \
3594         $(KMOD_CFLAGS)
3595
3596 libudev_core_la_LIBADD = \
3597         libudev-internal.la \
3598         libsystemd-label.la \
3599         libsystemd-internal.la \
3600         libsystemd-network.la \
3601         libsystemd-shared.la \
3602         $(BLKID_LIBS) \
3603         $(KMOD_LIBS)
3604
3605 if HAVE_KMOD
3606 libudev_core_la_SOURCES += \
3607         src/udev/udev-builtin-kmod.c
3608
3609 dist_udevrules_DATA += \
3610         rules/80-drivers.rules
3611 endif
3612
3613 if HAVE_BLKID
3614 libudev_core_la_SOURCES += \
3615         src/udev/udev-builtin-blkid.c
3616 endif
3617
3618 if HAVE_ACL
3619 libudev_core_la_SOURCES += \
3620         src/udev/udev-builtin-uaccess.c \
3621         src/login/logind-acl.c \
3622         src/libsystemd/sd-login/sd-login.c \
3623         src/systemd/sd-login.h
3624
3625 libudev_core_la_LIBADD += \
3626         libsystemd-acl.la
3627 endif
3628
3629 systemd_udevd_SOURCES = \
3630         src/udev/udevd.c
3631
3632 systemd_udevd_LDADD = \
3633         libudev-core.la
3634
3635 udevadm_SOURCES = \
3636         src/udev/udevadm.c \
3637         src/udev/udevadm-info.c \
3638         src/udev/udevadm-control.c \
3639         src/udev/udevadm-monitor.c \
3640         src/udev/udevadm-hwdb.c \
3641         src/udev/udevadm-settle.c \
3642         src/udev/udevadm-trigger.c \
3643         src/udev/udevadm-test.c \
3644         src/udev/udevadm-test-builtin.c \
3645         src/udev/udevadm-util.c \
3646         src/udev/udevadm-util.h
3647
3648 udevadm_LDADD = \
3649         libudev-core.la
3650
3651 # ------------------------------------------------------------------------------
3652 if ENABLE_HWDB
3653 INSTALL_DIRS += \
3654         $(sysconfdir)/udev/hwdb.d
3655
3656 systemd_hwdb_SOURCES = \
3657         src/libsystemd/sd-hwdb/hwdb-internal.h \
3658         src/hwdb/hwdb.c
3659
3660 systemd_hwdb_LDADD = \
3661         libsystemd-shared.la \
3662         libsystemd-internal.la \
3663         libudev-internal.la
3664
3665 rootbin_PROGRAMS += \
3666         systemd-hwdb
3667
3668 dist_udevhwdb_DATA = \
3669         hwdb/20-pci-vendor-model.hwdb \
3670         hwdb/20-pci-classes.hwdb \
3671         hwdb/20-usb-vendor-model.hwdb \
3672         hwdb/20-usb-classes.hwdb \
3673         hwdb/20-sdio-vendor-model.hwdb \
3674         hwdb/20-sdio-classes.hwdb \
3675         hwdb/20-bluetooth-vendor-product.hwdb \
3676         hwdb/20-acpi-vendor.hwdb \
3677         hwdb/20-OUI.hwdb \
3678         hwdb/20-net-ifname.hwdb \
3679         hwdb/60-keyboard.hwdb \
3680         hwdb/70-mouse.hwdb
3681
3682 EXTRA_DIST += \
3683         units/systemd-hwdb-update.service.in
3684
3685 CLEANFILES += \
3686         units/systemd-hwdb-update.service
3687
3688 SYSINIT_TARGET_WANTS += \
3689         systemd-hwdb-update.service
3690
3691 # Update hwdb on installation. Do not bother if installing
3692 # in DESTDIR, since this is likely for packaging purposes.
3693 hwdb-update-hook:
3694         -test -n "$(DESTDIR)" || $(rootbindir)/systemd-hwdb update
3695
3696 INSTALL_DATA_HOOKS += \
3697         hwdb-update-hook
3698
3699 hwdb-remove-hook:
3700         -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
3701 endif
3702
3703 # ------------------------------------------------------------------------------
3704 TESTS += \
3705         test/udev-test.pl \
3706         test/rules-test.sh
3707
3708 manual_tests += \
3709         test-libudev \
3710         test-udev
3711
3712 test_libudev_SOURCES = \
3713         src/test/test-libudev.c
3714
3715 test_libudev_LDADD = \
3716         libsystemd-label.la \
3717         libudev-internal.la \
3718         libsystemd-shared.la \
3719         libsystemd-internal.la
3720
3721 test_udev_SOURCES = \
3722         src/test/test-udev.c
3723
3724 test_udev_LDADD = \
3725         libudev-core.la  \
3726         $(BLKID_LIBS) \
3727         $(KMOD_LIBS) \
3728         $(SELINUX_LIBS)
3729
3730 if HAVE_ACL
3731 test_udev_LDADD += \
3732         libsystemd-acl.la
3733 endif
3734
3735 check_DATA += \
3736         test/sys
3737
3738 # packed sysfs test tree
3739 test/sys:
3740         $(AM_V_at)$(MKDIR_P) $(dir $@)
3741         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
3742
3743 test-sys-distclean:
3744         -rm -rf test/sys
3745 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
3746
3747 EXTRA_DIST += \
3748         test/sys.tar.xz \
3749         test/udev-test.pl \
3750         test/rules-test.sh \
3751         test/rule-syntax-check.py
3752
3753 # ------------------------------------------------------------------------------
3754 ata_id_SOURCES = \
3755         src/udev/ata_id/ata_id.c
3756
3757 ata_id_LDADD = \
3758         libudev-internal.la \
3759         libsystemd-shared.la
3760
3761 udevlibexec_PROGRAMS += \
3762         ata_id
3763
3764 # ------------------------------------------------------------------------------
3765 cdrom_id_SOURCES = \
3766         src/udev/cdrom_id/cdrom_id.c
3767
3768 cdrom_id_LDADD = \
3769         libudev-internal.la \
3770         libsystemd-shared.la
3771
3772 udevlibexec_PROGRAMS += \
3773         cdrom_id
3774
3775 dist_udevrules_DATA += \
3776         rules/60-cdrom_id.rules
3777
3778 # ------------------------------------------------------------------------------
3779 collect_SOURCES = \
3780         src/udev/collect/collect.c
3781
3782 collect_LDADD = \
3783         libudev-internal.la \
3784         libsystemd-shared.la
3785
3786 udevlibexec_PROGRAMS += \
3787         collect
3788
3789 # ------------------------------------------------------------------------------
3790 scsi_id_SOURCES =\
3791         src/udev/scsi_id/scsi_id.c \
3792         src/udev/scsi_id/scsi_serial.c \
3793         src/udev/scsi_id/scsi.h \
3794         src/udev/scsi_id/scsi_id.h
3795
3796 scsi_id_LDADD = \
3797         libudev-internal.la \
3798         libsystemd-shared.la
3799
3800 udevlibexec_PROGRAMS += \
3801         scsi_id
3802
3803 EXTRA_DIST += \
3804         src/udev/scsi_id/README
3805
3806 # ------------------------------------------------------------------------------
3807 v4l_id_SOURCES = \
3808         src/udev/v4l_id/v4l_id.c
3809
3810 v4l_id_LDADD = \
3811         libudev-internal.la \
3812         libsystemd-shared.la
3813
3814 udevlibexec_PROGRAMS += \
3815         v4l_id
3816
3817 dist_udevrules_DATA += \
3818         rules/60-persistent-v4l.rules
3819
3820 # ------------------------------------------------------------------------------
3821 accelerometer_SOURCES = \
3822         src/udev/accelerometer/accelerometer.c
3823
3824 accelerometer_LDADD = \
3825         libudev-internal.la \
3826         libsystemd-shared.la
3827
3828 udevlibexec_PROGRAMS += \
3829         accelerometer
3830
3831 dist_udevrules_DATA += \
3832         rules/61-accelerometer.rules
3833
3834 # ------------------------------------------------------------------------------
3835 if ENABLE_GUDEV
3836 if ENABLE_GTK_DOC
3837 SUBDIRS += \
3838         docs/gudev
3839 endif
3840
3841 libgudev_includedir = \
3842         $(includedir)/gudev-1.0/gudev
3843
3844 libgudev_include_HEADERS = \
3845         src/gudev/gudev.h \
3846         src/gudev/gudevenums.h \
3847         src/gudev/gudevenumtypes.h \
3848         src/gudev/gudevtypes.h \
3849         src/gudev/gudevclient.h \
3850         src/gudev/gudevdevice.h \
3851         src/gudev/gudevenumerator.h
3852
3853 lib_LTLIBRARIES += libgudev-1.0.la
3854
3855 pkgconfiglib_DATA += \
3856         src/gudev/gudev-1.0.pc
3857
3858 CLEANFILES += \
3859         src/gudev/gudev-1.0.pc
3860
3861 libgudev_1_0_la_SOURCES = \
3862         src/gudev/libgudev-1.0.sym \
3863         src/gudev/gudevenums.h \
3864         src/gudev/gudevenumtypes.h \
3865         src/gudev/gudevenumtypes.h\
3866         src/gudev/gudevtypes.h \
3867         src/gudev/gudevclient.h \
3868         src/gudev/gudevclient.c \
3869         src/gudev/gudevdevice.h \
3870         src/gudev/gudevdevice.c \
3871         src/gudev/gudevenumerator.h \
3872         src/gudev/gudevenumerator.c \
3873         src/gudev/gudevprivate.h
3874
3875 nodist_libgudev_1_0_la_SOURCES = \
3876         src/gudev/gudevmarshal.h \
3877         src/gudev/gudevmarshal.c \
3878         src/gudev/gudevenumtypes.h \
3879         src/gudev/gudevenumtypes.c
3880
3881 BUILT_SOURCES += \
3882         $(nodist_libgudev_1_0_la_SOURCES)
3883
3884 libgudev_1_0_la_CPPFLAGS = \
3885         $(AM_CPPFLAGS) \
3886         -I$(top_builddir)/src\
3887         -I$(top_srcdir)/src\
3888         -I$(top_builddir)/src/gudev \
3889         -I$(top_srcdir)/src/gudev \
3890         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
3891         -D_GUDEV_COMPILATION \
3892         -DG_LOG_DOMAIN=\"GUdev\"
3893
3894 libgudev_1_0_la_CFLAGS = \
3895         $(AM_CFLAGS) \
3896         -fvisibility=default \
3897         $(GLIB_CFLAGS)
3898
3899 libgudev_1_0_la_LIBADD = \
3900         libudev.la \
3901         $(GLIB_LIBS)
3902
3903 libgudev_1_0_la_LDFLAGS = \
3904         $(AM_LDFLAGS) \
3905         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
3906         -export-dynamic \
3907         -no-undefined \
3908         -Wl,--version-script=$(top_srcdir)/src/gudev/libgudev-1.0.sym
3909
3910 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
3911         $(AM_V_at)$(MKDIR_P) $(dir $@)
3912         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
3913
3914 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
3915         $(AM_V_at)$(MKDIR_P) $(dir $@)
3916         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
3917         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
3918
3919 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
3920         $(AM_V_at)$(MKDIR_P) $(dir $@)
3921         $(AM_V_GEN)glib-mkenums --template $^ > $@
3922
3923 if HAVE_INTROSPECTION
3924 -include $(INTROSPECTION_MAKEFILE)
3925
3926 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
3927
3928 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
3929
3930 src_gudev_GUdev_1_0_gir_CFLAGS = \
3931         $(AM_CFLAGS) \
3932         $(INCLUDES) \
3933         -D_GUDEV_COMPILATION \
3934         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
3935         -I$(top_srcdir)/src \
3936         -I$(top_builddir)/src \
3937         -I$(top_srcdir)/src/gudev \
3938         -I$(top_builddir)/src/gudev
3939
3940 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
3941
3942 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
3943         --pkg-export=gudev-1.0 \
3944         --warn-all
3945
3946 src_gudev_GUdev_1_0_gir_FILES = \
3947         src/gudev/gudev.h \
3948         src/gudev/gudevtypes.h \
3949         src/gudev/gudevenums.h \
3950         src/gudev/gudevenumtypes.h \
3951         src/gudev/gudevclient.h \
3952         src/gudev/gudevdevice.h \
3953         src/gudev/gudevenumerator.h \
3954         src/gudev/gudevclient.c \
3955         src/gudev/gudevdevice.c \
3956         src/gudev/gudevenumerator.c
3957
3958 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
3959 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
3960
3961 girdir = $(datadir)/gir-1.0
3962 gir_DATA = \
3963         src/gudev/GUdev-1.0.gir
3964
3965 typelibsdir = $(libdir)/girepository-1.0
3966 typelibs_DATA = \
3967         src/gudev/GUdev-1.0.typelib
3968
3969 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
3970 endif # HAVE_INTROSPECTION
3971 endif
3972
3973 EXTRA_DIST += \
3974         src/gudev/gudev-1.0.pc.in \
3975         src/gudev/gudevmarshal.list \
3976         src/gudev/gudevenumtypes.h.template \
3977         src/gudev/gudevenumtypes.c.template \
3978         src/gudev/gjs-example.js \
3979         src/gudev/seed-example-enum.js \
3980         src/gudev/seed-example.js
3981
3982 # ------------------------------------------------------------------------------
3983 mtd_probe_SOURCES =  \
3984         src/udev/mtd_probe/mtd_probe.c \
3985         src/udev/mtd_probe/mtd_probe.h \
3986         src/udev/mtd_probe/probe_smartmedia.c
3987
3988 dist_udevrules_DATA += \
3989         rules/75-probe_mtd.rules
3990
3991 udevlibexec_PROGRAMS += \
3992         mtd_probe
3993
3994 # ------------------------------------------------------------------------------
3995 test_id128_SOURCES = \
3996         src/test/test-id128.c
3997
3998 test_id128_LDADD = \
3999         libsystemd-internal.la \
4000         libsystemd-shared.la
4001
4002 tests += \
4003         test-id128
4004
4005 # ------------------------------------------------------------------------------
4006
4007 rootlibexec_PROGRAMS += \
4008         systemd-activate
4009
4010 systemd_activate_SOURCES = \
4011         src/activate/activate.c
4012
4013 systemd_activate_LDADD = \
4014         libsystemd-label.la \
4015         libsystemd-internal.la \
4016         libsystemd-shared.la
4017
4018 # ------------------------------------------------------------------------------
4019 systemd_journald_SOURCES = \
4020         src/journal/journald.c \
4021         src/journal/journald-server.h
4022
4023 systemd_journald_LDADD = \
4024         libsystemd-journal-core.la \
4025         libsystemd-internal.la \
4026         libsystemd-shared.la
4027
4028 systemd_cat_SOURCES = \
4029         src/journal/cat.c
4030
4031 systemd_cat_LDADD = \
4032         libsystemd-journal-core.la
4033
4034 if HAVE_MICROHTTPD
4035 rootlibexec_PROGRAMS += \
4036         systemd-journal-remote
4037
4038 systemd_journal_remote_SOURCES = \
4039         src/journal-remote/journal-remote-parse.h \
4040         src/journal-remote/journal-remote-parse.c \
4041         src/journal-remote/journal-remote-write.h \
4042         src/journal-remote/journal-remote-write.c \
4043         src/journal-remote/journal-remote.h \
4044         src/journal-remote/journal-remote.c
4045
4046 systemd_journal_remote_LDADD = \
4047         libsystemd-internal.la \
4048         libsystemd-journal-core.la
4049
4050 systemd_journal_remote_SOURCES += \
4051         src/journal-remote/microhttpd-util.h \
4052         src/journal-remote/microhttpd-util.c
4053
4054 systemd_journal_remote_CFLAGS = \
4055         $(AM_CFLAGS) \
4056         $(MICROHTTPD_CFLAGS)
4057
4058 systemd_journal_remote_LDADD += \
4059         $(MICROHTTPD_LIBS)
4060
4061 if ENABLE_SYSUSERS
4062 dist_sysusers_DATA += \
4063         sysusers.d/systemd-remote.conf
4064 endif
4065
4066 if ENABLE_TMPFILES
4067 dist_tmpfiles_DATA += \
4068         tmpfiles.d/systemd-remote.conf
4069 endif
4070
4071 if HAVE_GNUTLS
4072 systemd_journal_remote_LDADD += \
4073         $(GNUTLS_LIBS)
4074
4075 # systemd-journal-remote make sense mostly with full crypto stack
4076 dist_systemunit_DATA += \
4077         units/systemd-journal-remote.socket
4078
4079 nodist_systemunit_DATA += \
4080         units/systemd-journal-remote.service
4081
4082 EXTRA_DIST += \
4083         units/systemd-journal-remote.service.in
4084
4085 journal-remote-install-hook: journal-install-hook
4086         -$(MKDIR_P) $(DESTDIR)/var/log/journal/remote
4087         -chown 0:0 $(DESTDIR)/var/log/journal/remote
4088         -chmod 755 $(DESTDIR)/var/log/journal/remote
4089
4090 INSTALL_EXEC_HOOKS += journal-remote-install-hook
4091
4092 endif
4093
4094 nodist_pkgsysconf_DATA += \
4095         src/journal-remote/journal-remote.conf
4096
4097 EXTRA_DIST += \
4098         src/journal-remote/journal-remote.conf.in
4099
4100 CLEANFILES += \
4101         src/journal-remote/journal-remote.conf
4102 endif
4103
4104 if HAVE_LIBCURL
4105 rootlibexec_PROGRAMS += \
4106         systemd-journal-upload
4107
4108 systemd_journal_upload_SOURCES = \
4109         src/journal-remote/journal-upload.h \
4110         src/journal-remote/journal-upload.c \
4111         src/journal-remote/journal-upload-journal.c
4112
4113 systemd_journal_upload_CFLAGS = \
4114         $(AM_CFLAGS) \
4115         $(LIBCURL_CFLAGS)
4116
4117 systemd_journal_upload_LDADD = \
4118         libsystemd-internal.la \
4119         libsystemd-journal-internal.la \
4120         libsystemd-shared.la \
4121         $(LIBCURL_LIBS)
4122
4123 nodist_systemunit_DATA += \
4124         units/systemd-journal-upload.service
4125
4126 EXTRA_DIST += \
4127         units/systemd-journal-upload.service.in
4128
4129 nodist_pkgsysconf_DATA += \
4130         src/journal-remote/journal-upload.conf
4131
4132 EXTRA_DIST += \
4133         src/journal-remote/journal-upload.conf.in
4134
4135 CLEANFILES += \
4136         src/journal-remote/journal-upload.conf
4137 endif
4138
4139 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4140 journalctl_CFLAGS = \
4141         $(AM_CFLAGS)
4142
4143 journalctl_SOURCES = \
4144         src/journal/journalctl.c
4145
4146 journalctl_LDADD = \
4147         libsystemd-journal-internal.la \
4148         libsystemd-internal.la \
4149         libsystemd-logs.la \
4150         libsystemd-shared.la
4151
4152 if HAVE_ACL
4153 journalctl_LDADD += \
4154         libsystemd-acl.la
4155 endif
4156
4157 if HAVE_QRENCODE
4158 journalctl_SOURCES += \
4159         src/journal/journal-qrcode.c \
4160         src/journal/journal-qrcode.h
4161
4162 journalctl_CFLAGS += \
4163         $(QRENCODE_CFLAGS)
4164
4165 journalctl_LDADD += \
4166         $(QRENCODE_LIBS)
4167 endif
4168
4169 test_journal_SOURCES = \
4170         src/journal/test-journal.c
4171
4172 test_journal_LDADD = \
4173         libsystemd-journal-core.la
4174
4175 test_journal_send_SOURCES = \
4176         src/journal/test-journal-send.c
4177
4178 test_journal_send_LDADD = \
4179         libsystemd-journal-core.la
4180
4181 test_journal_syslog_SOURCES = \
4182         src/journal/test-journal-syslog.c
4183
4184 test_journal_syslog_LDADD = \
4185         libsystemd-journal-core.la
4186
4187 test_journal_match_SOURCES = \
4188         src/journal/test-journal-match.c
4189
4190 test_journal_match_LDADD = \
4191         libsystemd-journal-core.la
4192
4193 test_journal_enum_SOURCES = \
4194         src/journal/test-journal-enum.c
4195
4196 test_journal_enum_LDADD = \
4197         libsystemd-journal-core.la
4198
4199 test_journal_stream_SOURCES = \
4200         src/journal/test-journal-stream.c
4201
4202 test_journal_stream_LDADD = \
4203         libsystemd-journal-core.la
4204
4205 test_journal_flush_SOURCES = \
4206         src/journal/test-journal-flush.c
4207
4208 test_journal_flush_LDADD = \
4209         libsystemd-journal-core.la
4210
4211 test_journal_init_SOURCES = \
4212         src/journal/test-journal-init.c
4213
4214 test_journal_init_LDADD = \
4215         libsystemd-journal-core.la
4216
4217 test_journal_verify_SOURCES = \
4218         src/journal/test-journal-verify.c
4219
4220 test_journal_verify_LDADD = \
4221         libsystemd-journal-core.la
4222
4223 test_journal_interleaving_SOURCES = \
4224         src/journal/test-journal-interleaving.c
4225
4226 test_journal_interleaving_LDADD = \
4227         libsystemd-journal-core.la
4228
4229 test_mmap_cache_SOURCES = \
4230         src/journal/test-mmap-cache.c
4231
4232 test_mmap_cache_LDADD = \
4233         libsystemd-journal-core.la
4234
4235 test_catalog_SOURCES = \
4236         src/journal/test-catalog.c
4237
4238 test_catalog_CPPFLAGS = \
4239         $(AM_CPPFLAGS) \
4240         -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
4241
4242 test_catalog_LDADD = \
4243         libsystemd-journal-core.la
4244
4245 test_compress_SOURCES = \
4246         src/journal/test-compress.c
4247
4248 test_compress_LDADD = \
4249         libsystemd-journal-internal.la \
4250         libsystemd-shared.la
4251
4252 test_compress_benchmark_SOURCES = \
4253         src/journal/test-compress-benchmark.c
4254
4255 test_compress_benchmark_LDADD = \
4256         libsystemd-journal-internal.la \
4257         libsystemd-shared.la
4258
4259 libsystemd_journal_core_la_SOURCES = \
4260         src/journal/journald-kmsg.c \
4261         src/journal/journald-kmsg.h \
4262         src/journal/journald-syslog.c \
4263         src/journal/journald-syslog.h \
4264         src/journal/journald-stream.c \
4265         src/journal/journald-stream.h \
4266         src/journal/journald-server.c \
4267         src/journal/journald-server.h \
4268         src/journal/journald-console.c \
4269         src/journal/journald-console.h \
4270         src/journal/journald-wall.c \
4271         src/journal/journald-wall.h \
4272         src/journal/journald-native.c \
4273         src/journal/journald-native.h \
4274         src/journal/journald-audit.c \
4275         src/journal/journald-audit.h \
4276         src/journal/journald-rate-limit.c \
4277         src/journal/journald-rate-limit.h \
4278         src/journal/journal-internal.h
4279
4280 nodist_libsystemd_journal_core_la_SOURCES = \
4281         src/journal/journald-gperf.c
4282
4283 libsystemd_journal_core_la_LIBADD = \
4284         libsystemd-journal-internal.la \
4285         libudev-internal.la \
4286         libsystemd-label.la \
4287         libsystemd-internal.la \
4288         libsystemd-shared.la
4289
4290 if HAVE_ACL
4291 libsystemd_journal_core_la_LIBADD += \
4292         libsystemd-acl.la
4293 endif
4294
4295 noinst_LTLIBRARIES += \
4296         libsystemd-journal-core.la
4297
4298 journal-install-hook:
4299         -$(MKDIR_P) $(DESTDIR)/var/log/journal
4300         -chown 0:0 $(DESTDIR)/var/log/journal
4301         -chmod 755 $(DESTDIR)/var/log/journal
4302         -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
4303         -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
4304
4305 journal-uninstall-hook:
4306         -rmdir $(DESTDIR)/var/log/journal/remote
4307         -rmdir $(DESTDIR)/var/log/journal/
4308
4309 INSTALL_EXEC_HOOKS += journal-install-hook
4310 UNINSTALL_EXEC_HOOKS += journal-uninstall-hook
4311
4312 # ------------------------------------------------------------------------------
4313 # Update catalog on installation. Do not bother if installing
4314 # in DESTDIR, since this is likely for packaging purposes.
4315 catalog-update-hook:
4316         -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
4317
4318 INSTALL_DATA_HOOKS += \
4319         catalog-update-hook
4320
4321 catalog-remove-hook:
4322         -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
4323
4324 UNINSTALL_DATA_HOOKS += \
4325         catalog-remove-hook
4326
4327 manual_tests += \
4328         test-journal-enum
4329
4330 tests += \
4331         test-journal \
4332         test-journal-send \
4333         test-journal-syslog \
4334         test-journal-match \
4335         test-journal-stream \
4336         test-journal-init \
4337         test-journal-verify \
4338         test-journal-interleaving \
4339         test-journal-flush \
4340         test-mmap-cache \
4341         test-catalog
4342
4343 if HAVE_COMPRESSION
4344 tests += \
4345         test-compress \
4346         test-compress-benchmark
4347 endif
4348
4349 pkginclude_HEADERS += \
4350         src/systemd/sd-journal.h \
4351         src/systemd/sd-messages.h \
4352         src/systemd/_sd-common.h
4353
4354 libsystemd_journal_internal_la_SOURCES = \
4355         src/journal/sd-journal.c \
4356         src/systemd/sd-journal.h \
4357         src/systemd/_sd-common.h \
4358         src/journal/journal-file.c \
4359         src/journal/journal-file.h \
4360         src/journal/journal-vacuum.c \
4361         src/journal/journal-vacuum.h \
4362         src/journal/journal-verify.c \
4363         src/journal/journal-verify.h \
4364         src/journal/lookup3.c \
4365         src/journal/lookup3.h \
4366         src/journal/journal-send.c \
4367         src/journal/journal-def.h \
4368         src/journal/compress.h \
4369         src/journal/catalog.c \
4370         src/journal/catalog.h \
4371         src/journal/mmap-cache.c \
4372         src/journal/mmap-cache.h \
4373         src/journal/compress.c
4374
4375 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4376 libsystemd_journal_internal_la_CFLAGS = \
4377         $(AM_CFLAGS)
4378
4379 libsystemd_journal_internal_la_LIBADD = \
4380         libsystemd-label.la
4381
4382 if HAVE_XZ
4383 libsystemd_journal_internal_la_CFLAGS += \
4384         $(XZ_CFLAGS)
4385
4386 libsystemd_journal_internal_la_LIBADD += \
4387         $(XZ_LIBS)
4388 endif
4389
4390 if HAVE_LZ4
4391 libsystemd_journal_internal_la_LIBADD += \
4392         -llz4
4393 endif
4394
4395 if HAVE_GCRYPT
4396 libsystemd_journal_internal_la_SOURCES += \
4397         src/journal/journal-authenticate.c \
4398         src/journal/journal-authenticate.h \
4399         src/journal/fsprg.c \
4400         src/journal/fsprg.h
4401
4402 libsystemd_journal_internal_la_LIBADD += \
4403         $(GCRYPT_LIBS)
4404
4405 # fsprg.c is a drop-in file using void pointer arithmetic
4406 libsystemd_journal_internal_la_CFLAGS += \
4407         $(GCRYPT_CFLAGS) \
4408         -Wno-pointer-arith
4409 endif
4410
4411 noinst_LTLIBRARIES += \
4412         libsystemd-journal-internal.la
4413
4414 rootlibexec_PROGRAMS += \
4415         systemd-journald
4416
4417 rootbin_PROGRAMS += \
4418         journalctl
4419
4420 bin_PROGRAMS += \
4421         systemd-cat
4422
4423 dist_systemunit_DATA += \
4424         units/systemd-journald.socket \
4425         units/systemd-journald-dev-log.socket \
4426         units/systemd-journald-audit.socket
4427
4428 nodist_systemunit_DATA += \
4429         units/systemd-journald.service \
4430         units/systemd-journal-flush.service \
4431         units/systemd-journal-catalog-update.service
4432
4433 dist_pkgsysconf_DATA += \
4434         src/journal/journald.conf
4435
4436 dist_catalog_DATA = \
4437         catalog/systemd.fr.catalog \
4438         catalog/systemd.it.catalog \
4439         catalog/systemd.pl.catalog \
4440         catalog/systemd.ru.catalog \
4441         catalog/systemd.catalog
4442
4443 SOCKETS_TARGET_WANTS += \
4444         systemd-journald.socket \
4445         systemd-journald-dev-log.socket \
4446         systemd-journald-audit.socket
4447
4448 SYSINIT_TARGET_WANTS += \
4449         systemd-journald.service \
4450         systemd-journal-flush.service \
4451         systemd-journal-catalog-update.service
4452
4453 EXTRA_DIST += \
4454         units/systemd-journald.service.in \
4455         units/systemd-journal-flush.service.in \
4456         units/systemd-journal-catalog-update.service.in \
4457         src/journal/journald-gperf.gperf
4458
4459 CLEANFILES += \
4460         src/journal/journald-gperf.c
4461
4462 # ------------------------------------------------------------------------------
4463 if HAVE_MICROHTTPD
4464 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
4465
4466 rootlibexec_PROGRAMS += \
4467         systemd-journal-gatewayd
4468
4469 systemd_journal_gatewayd_SOURCES = \
4470         src/journal-remote/journal-gatewayd.c \
4471         src/journal-remote/microhttpd-util.h \
4472         src/journal-remote/microhttpd-util.c
4473
4474 systemd_journal_gatewayd_LDADD = \
4475         libsystemd-logs.la \
4476         libsystemd-journal-internal.la \
4477         libsystemd-internal.la \
4478         libsystemd-shared.la \
4479         $(MICROHTTPD_LIBS)
4480
4481 if HAVE_GNUTLS
4482 systemd_journal_gatewayd_LDADD += \
4483         $(GNUTLS_LIBS)
4484 endif
4485
4486 systemd_journal_gatewayd_CFLAGS = \
4487         $(AM_CFLAGS) \
4488         $(MICROHTTPD_CFLAGS)
4489
4490 systemd_journal_gatewayd_CPPFLAGS = \
4491         $(AM_CPPFLAGS) \
4492         -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
4493
4494 dist_systemunit_DATA += \
4495         units/systemd-journal-gatewayd.socket
4496
4497 nodist_systemunit_DATA += \
4498         units/systemd-journal-gatewayd.service
4499
4500 dist_gatewayddocumentroot_DATA = \
4501         src/journal-remote/browse.html
4502
4503 endif
4504
4505 EXTRA_DIST += \
4506         units/systemd-journal-gatewayd.service.in
4507
4508 # ------------------------------------------------------------------------------
4509
4510 systemd_socket_proxyd_SOURCES = \
4511         src/socket-proxy/socket-proxyd.c
4512
4513 systemd_socket_proxyd_LDADD = \
4514         libsystemd-logs.la \
4515         libsystemd-internal.la \
4516         libsystemd-journal-internal.la \
4517         libsystemd-shared.la \
4518         libsystemd-resolve.la
4519
4520 # ------------------------------------------------------------------------------
4521 if ENABLE_COREDUMP
4522 systemd_coredump_SOURCES = \
4523         src/journal/coredump.c \
4524         src/journal/coredump-vacuum.c \
4525         src/journal/coredump-vacuum.h
4526
4527 systemd_coredump_LDADD = \
4528         libsystemd-journal-internal.la \
4529         libsystemd-label.la \
4530         libsystemd-internal.la \
4531         libsystemd-shared.la
4532
4533 if HAVE_ELFUTILS
4534 systemd_coredump_SOURCES += \
4535         src/journal/stacktrace.c \
4536         src/journal/stacktrace.h
4537
4538 systemd_coredump_LDADD += \
4539         $(ELFUTILS_LIBS)
4540 endif
4541
4542 rootlibexec_PROGRAMS += \
4543         systemd-coredump
4544
4545 dist_pkgsysconf_DATA += \
4546         src/journal/coredump.conf
4547
4548 if HAVE_ACL
4549 systemd_coredump_LDADD += \
4550         libsystemd-acl.la
4551 endif
4552
4553 coredumpctl_SOURCES = \
4554         src/journal/coredumpctl.c
4555
4556 coredumpctl_LDADD = \
4557         libsystemd-journal-internal.la \
4558         libsystemd-internal.la \
4559         libsystemd-shared.la
4560
4561 bin_PROGRAMS += \
4562         coredumpctl
4563
4564 manual_tests += \
4565         test-coredump-vacuum
4566
4567 test_coredump_vacuum_SOURCES = \
4568         src/journal/test-coredump-vacuum.c  \
4569         src/journal/coredump-vacuum.c \
4570         src/journal/coredump-vacuum.h
4571
4572 test_coredump_vacuum_LDADD = \
4573     &n