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