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