chiark / gitweb /
core: Refuse to run a user instance when the system hasn't been booted with systemd.
[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 #
8 #  systemd is free software; you can redistribute it and/or modify it
9 #  under the terms of the GNU Lesser General Public License as published by
10 #  the Free Software Foundation; either version 2.1 of the License, or
11 #  (at your option) any later version.
12 #
13 #  systemd is distributed in the hope that it will be useful, but
14 #  WITHOUT ANY WARRANTY; without even the implied warranty of
15 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 #  Lesser General Public License for more details.
17 #
18 #  You should have received a copy of the GNU Lesser General Public License
19 #  along with systemd; If not, see <http://www.gnu.org/licenses/>.
20
21 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
22 AM_MAKEFLAGS = --no-print-directory
23
24 SUBDIRS = . po
25
26 # remove targets if the command fails
27 .DELETE_ON_ERROR:
28
29 LIBUDEV_CURRENT=2
30 LIBUDEV_REVISION=5
31 LIBUDEV_AGE=1
32
33 LIBGUDEV_CURRENT=1
34 LIBGUDEV_REVISION=2
35 LIBGUDEV_AGE=1
36
37 LIBSYSTEMD_LOGIN_CURRENT=3
38 LIBSYSTEMD_LOGIN_REVISION=8
39 LIBSYSTEMD_LOGIN_AGE=3
40
41 LIBSYSTEMD_DAEMON_CURRENT=0
42 LIBSYSTEMD_DAEMON_REVISION=5
43 LIBSYSTEMD_DAEMON_AGE=0
44
45 LIBSYSTEMD_ID128_CURRENT=0
46 LIBSYSTEMD_ID128_REVISION=14
47 LIBSYSTEMD_ID128_AGE=0
48
49 LIBSYSTEMD_JOURNAL_CURRENT=5
50 LIBSYSTEMD_JOURNAL_REVISION=4
51 LIBSYSTEMD_JOURNAL_AGE=5
52
53 # Dirs of external packages
54 dbuspolicydir=@dbuspolicydir@
55 dbussessionservicedir=@dbussessionservicedir@
56 dbussystemservicedir=@dbussystemservicedir@
57 dbusinterfacedir=@dbusinterfacedir@
58 pamlibdir=@pamlibdir@
59 pkgconfigdatadir=$(datadir)/pkgconfig
60 pkgconfiglibdir=$(libdir)/pkgconfig
61 polkitpolicydir=$(datadir)/polkit-1/actions
62 bashcompletiondir=$(sysconfdir)/bash_completion.d
63 rpmmacrosdir=$(sysconfdir)/rpm
64
65 # Our own, non-special dirs
66 pkgsysconfdir=$(sysconfdir)/systemd
67 userunitdir=$(prefix)/lib/systemd/user
68 userpresetdir=$(prefix)/lib/systemd/user-preset
69 tmpfilesdir=$(prefix)/lib/tmpfiles.d
70 sysctldir=$(prefix)/lib/sysctl.d
71 usergeneratordir=$(prefix)/lib/systemd/user-generators
72 pkgincludedir=$(includedir)/systemd
73 systemgeneratordir=$(rootlibexecdir)/system-generators
74 systemshutdowndir=$(rootlibexecdir)/system-shutdown
75 systemsleepdir=$(rootlibexecdir)/system-sleep
76 systemunitdir=$(rootprefix)/lib/systemd/system
77 systempresetdir=$(rootprefix)/lib/systemd/system-preset
78 udevlibexecdir=$(rootprefix)/lib/udev
79 udevhomedir = $(udevlibexecdir)
80 udevrulesdir = $(udevlibexecdir)/rules.d
81
82 # And these are the special ones for /
83 rootprefix=@rootprefix@
84 rootbindir=$(rootprefix)/bin
85 rootlibexecdir=$(rootprefix)/lib/systemd
86
87 CLEANFILES = $(BUILT_SOURCES)
88 EXTRA_DIST =
89 BUILT_SOURCES =
90 INSTALL_EXEC_HOOKS =
91 UNINSTALL_EXEC_HOOKS =
92 INSTALL_DATA_HOOKS =
93 DISTCLEAN_LOCAL_HOOKS =
94 pkginclude_HEADERS =
95 noinst_LTLIBRARIES =
96 lib_LTLIBRARIES =
97 include_HEADERS =
98 pkgconfiglib_DATA =
99 polkitpolicy_in_files =
100 polkitpolicy_files =
101 dist_udevrules_DATA =
102 nodist_udevrules_DATA =
103 dist_man_MANS =
104 dist_pkgsysconf_DATA =
105 dist_pkgdata_DATA =
106 dist_dbuspolicy_DATA =
107 dbusinterface_DATA =
108 dist_dbussystemservice_DATA =
109 check_PROGRAMS =
110 check_DATA =
111 noinst_PROGRAMS =
112 TESTS =
113 udevlibexec_PROGRAMS =
114
115 AM_CPPFLAGS = \
116         -include $(top_builddir)/config.h \
117         -DSYSCONFDIR=\""$(sysconfdir)"\" \
118         -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \
119         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
120         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
121         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
122         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
123         -DUSER_CONFIG_FILE=\"$(pkgsysconfdir)/user.conf\" \
124         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
125         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
126         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
127         -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
128         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
129         -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
130         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
131         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
132         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
133         -DROOTPREFIX=\"$(rootprefix)\" \
134         -DRUNTIME_DIR=\"/run\" \
135         -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
136         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
137         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
138         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
139         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
140         -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
141         -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
142         -DX_SERVER=\"$(bindir)/X\" \
143         -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
144         -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
145         -I $(top_srcdir)/src \
146         -I $(top_srcdir)/src/shared \
147         -I $(top_srcdir)/src/login \
148         -I $(top_srcdir)/src/journal \
149         -I $(top_srcdir)/src/systemd \
150         -I $(top_builddir)/src/core \
151         -I $(top_srcdir)/src/core \
152         -I $(top_srcdir)/src/libudev \
153         -I $(top_srcdir)/src/udev \
154         $(OUR_CPPFLAGS)
155
156 AM_CFLAGS = $(OUR_CFLAGS)
157 AM_LDFLAGS = $(OUR_LDFLAGS)
158
159 # ------------------------------------------------------------------------------
160 if TARGET_GENTOO
161 AM_CPPFLAGS += \
162         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
163         -DKBD_SETFONT=\"/usr/bin/setfont\"
164 else
165 if TARGET_ARCH
166 AM_CPPFLAGS += \
167         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
168         -DKBD_SETFONT=\"/usr/bin/setfont\"
169 else
170 if TARGET_FRUGALWARE
171 AM_CPPFLAGS += \
172         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
173         -DKBD_SETFONT=\"/usr/bin/setfont\"
174 else
175 if TARGET_MANDRIVA
176 AM_CPPFLAGS += \
177         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
178         -DKBD_SETFONT=\"/bin/setfont\"
179 else
180 if TARGET_ANGSTROM
181 AM_CPPFLAGS += \
182         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
183         -DKBD_SETFONT=\"/usr/bin/setfont\"
184 else
185 if TARGET_MAGEIA
186 AM_CPPFLAGS += \
187         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
188         -DKBD_SETFONT=\"/bin/setfont\"
189 else
190 AM_CPPFLAGS += \
191         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
192         -DKBD_SETFONT=\"/bin/setfont\"
193 endif
194 endif
195 endif
196 endif
197 endif
198 endif
199
200 # ------------------------------------------------------------------------------
201 rootbin_PROGRAMS = \
202         systemctl \
203         systemd-notify \
204         systemd-ask-password \
205         systemd-tty-ask-password-agent \
206         systemd-tmpfiles \
207         systemd-machine-id-setup
208
209 bin_PROGRAMS = \
210         systemd-cgls \
211         systemd-cgtop \
212         systemd-stdio-bridge \
213         systemd-nspawn \
214         systemd-detect-virt \
215         systemd-delta
216
217 dist_bin_SCRIPTS = \
218         src/analyze/systemd-analyze
219
220 rootlibexec_PROGRAMS = \
221         systemd \
222         systemd-cgroups-agent \
223         systemd-initctl \
224         systemd-update-utmp \
225         systemd-shutdownd \
226         systemd-shutdown \
227         systemd-modules-load \
228         systemd-remount-fs \
229         systemd-reply-password \
230         systemd-fsck \
231         systemd-timestamp \
232         systemd-ac-power \
233         systemd-sysctl \
234         systemd-sleep
235
236 systemgenerator_PROGRAMS = \
237         systemd-getty-generator \
238         systemd-fstab-generator \
239         systemd-system-update-generator
240
241 dist_bashcompletion_DATA = \
242         bash-completion/systemd-bash-completion.sh
243
244 dist_tmpfiles_DATA = \
245         tmpfiles.d/systemd.conf \
246         tmpfiles.d/tmp.conf \
247         tmpfiles.d/x11.conf
248
249 if HAVE_SYSV_COMPAT
250 dist_tmpfiles_DATA += \
251         tmpfiles.d/legacy.conf
252 endif
253
254 dist_systemunit_DATA = \
255         units/graphical.target \
256         units/multi-user.target \
257         units/emergency.service \
258         units/emergency.target \
259         units/sysinit.target \
260         units/basic.target \
261         units/getty.target \
262         units/halt.target \
263         units/kexec.target \
264         units/local-fs.target \
265         units/local-fs-pre.target \
266         units/remote-fs.target \
267         units/remote-fs-pre.target \
268         units/network.target \
269         units/nss-lookup.target \
270         units/nss-user-lookup.target \
271         units/mail-transfer-agent.target \
272         units/hibernate.target \
273         units/http-daemon.target \
274         units/poweroff.target \
275         units/reboot.target \
276         units/rescue.target \
277         units/rpcbind.target \
278         units/time-sync.target \
279         units/shutdown.target \
280         units/final.target \
281         units/umount.target \
282         units/sigpwr.target \
283         units/sleep.target \
284         units/sockets.target \
285         units/suspend.target \
286         units/swap.target \
287         units/systemd-initctl.socket \
288         units/systemd-shutdownd.socket \
289         units/syslog.socket \
290         units/dev-hugepages.mount \
291         units/dev-mqueue.mount \
292         units/sys-kernel-config.mount \
293         units/sys-kernel-debug.mount \
294         units/sys-fs-fuse-connections.mount \
295         units/tmp.mount \
296         units/printer.target \
297         units/sound.target \
298         units/bluetooth.target \
299         units/smartcard.target \
300         units/systemd-tmpfiles-clean.timer \
301         units/quotaon.service \
302         units/systemd-ask-password-wall.path \
303         units/systemd-ask-password-console.path \
304         units/syslog.target \
305         units/systemd-udevd-control.socket \
306         units/systemd-udevd-kernel.socket \
307         units/system-update.target
308
309 nodist_systemunit_DATA = \
310         units/getty@.service \
311         units/serial-getty@.service \
312         units/console-shell.service \
313         units/console-getty.service \
314         units/systemd-initctl.service \
315         units/systemd-shutdownd.service \
316         units/systemd-modules-load.service \
317         units/systemd-remount-fs.service \
318         units/systemd-update-utmp-runlevel.service \
319         units/systemd-update-utmp-shutdown.service \
320         units/systemd-tmpfiles-setup.service \
321         units/systemd-tmpfiles-clean.service \
322         units/systemd-ask-password-wall.service \
323         units/systemd-ask-password-console.service \
324         units/systemd-sysctl.service \
325         units/emergency.service \
326         units/rescue.service \
327         units/user@.service \
328         units/systemd-hibernate.service \
329         units/systemd-suspend.service \
330         units/systemd-halt.service \
331         units/systemd-poweroff.service \
332         units/systemd-reboot.service \
333         units/systemd-kexec.service \
334         units/systemd-fsck@.service \
335         units/systemd-fsck-root.service \
336         units/systemd-udevd.service \
337         units/systemd-udev-trigger.service \
338         units/systemd-udev-settle.service \
339         units/debug-shell.service
340
341 dist_userunit_DATA = \
342         units/user/default.target \
343         units/user/exit.target
344
345 nodist_userunit_DATA = \
346         units/user/systemd-exit.service
347
348 EXTRA_DIST += \
349         units/getty@.service.m4 \
350         units/serial-getty@.service.m4 \
351         units/console-shell.service.m4.in \
352         units/console-getty.service.m4.in \
353         units/rescue.service.m4.in \
354         units/systemd-initctl.service.in \
355         units/systemd-shutdownd.service.in \
356         units/systemd-modules-load.service.in \
357         units/systemd-remount-fs.service.in \
358         units/systemd-update-utmp-runlevel.service.in \
359         units/systemd-update-utmp-shutdown.service.in \
360         units/systemd-tmpfiles-setup.service.in \
361         units/systemd-tmpfiles-clean.service.in \
362         units/systemd-ask-password-wall.service.in \
363         units/systemd-ask-password-console.service.in \
364         units/systemd-sysctl.service.in \
365         units/emergency.service.in \
366         units/systemd-halt.service.in \
367         units/systemd-poweroff.service.in \
368         units/systemd-reboot.service.in \
369         units/systemd-kexec.service.in \
370         units/user/systemd-exit.service.in \
371         units/systemd-fsck@.service.in \
372         units/systemd-fsck-root.service.in \
373         units/user@.service.in \
374         units/systemd-udevd.service \
375         units/systemd-udev-trigger.service \
376         units/systemd-udev-settle.service \
377         units/debug-shell.service.in \
378         units/systemd-hibernate.service.in \
379         units/systemd-suspend.service.in \
380         units/quotaon.service.in \
381         introspect.awk \
382         man/custom-html.xsl
383
384 if TARGET_FEDORA
385 dist_systemunit_DATA += \
386         units/fedora/rc-local.service \
387         units/fedora/halt-local.service
388 systemgenerator_PROGRAMS += \
389         systemd-rc-local-generator
390 endif
391
392 if TARGET_MANDRIVA
393 dist_systemunit_DATA += \
394         units/fedora/rc-local.service \
395         units/fedora/halt-local.service
396 systemgenerator_PROGRAMS += \
397         systemd-rc-local-generator
398 endif
399
400 if TARGET_FRUGALWARE
401 dist_systemunit_DATA += \
402         units/frugalware/display-manager.service
403 endif
404
405 if TARGET_SUSE
406 dist_systemunit_DATA += \
407         units/suse/rc-local.service \
408         units/suse/halt-local.service
409 systemgenerator_PROGRAMS += \
410         systemd-rc-local-generator
411 endif
412
413 if TARGET_MAGEIA
414 dist_systemunit_DATA += \
415         units/fedora/rc-local.service \
416         units/fedora/halt-local.service
417 systemgenerator_PROGRAMS += \
418         systemd-rc-local-generator
419 endif
420
421 dist_doc_DATA = \
422         README \
423         NEWS \
424         LICENSE.LGPL2.1 \
425         LICENSE.GPL2 \
426         LICENSE.MIT \
427         DISTRO_PORTING
428
429 @INTLTOOL_POLICY_RULE@
430
431 # ------------------------------------------------------------------------------
432 MANPAGES = \
433         man/systemd.1 \
434         man/systemctl.1 \
435         man/systemd-cgls.1 \
436         man/systemd-delta.1 \
437         man/systemd-cgtop.1 \
438         man/systemd-nspawn.1 \
439         man/systemd-tmpfiles.8 \
440         man/systemd-notify.1 \
441         man/systemd.unit.5 \
442         man/systemd.service.5 \
443         man/systemd.socket.5 \
444         man/systemd.mount.5 \
445         man/systemd.automount.5 \
446         man/systemd.swap.5 \
447         man/systemd.timer.5 \
448         man/systemd.path.5 \
449         man/systemd.target.5 \
450         man/systemd.device.5 \
451         man/systemd.snapshot.5 \
452         man/systemd.exec.5 \
453         man/systemd.kill.5 \
454         man/systemd.special.7 \
455         man/systemd.journal-fields.7 \
456         man/kernel-command-line.7 \
457         man/daemon.7 \
458         man/bootup.7 \
459         man/runlevel.8 \
460         man/telinit.8 \
461         man/halt.8 \
462         man/shutdown.8 \
463         man/pam_systemd.8 \
464         man/systemd.conf.5 \
465         man/tmpfiles.d.5 \
466         man/hostname.5 \
467         man/localtime.5 \
468         man/machine-id.5 \
469         man/locale.conf.5 \
470         man/os-release.5 \
471         man/machine-info.5 \
472         man/modules-load.d.5 \
473         man/systemd-modules-load.service.8 \
474         man/sysctl.d.5 \
475         man/systemd-sysctl.service.8 \
476         man/systemd-ask-password.1 \
477         man/systemd-cat.1 \
478         man/systemd-machine-id-setup.1 \
479         man/systemd-detect-virt.1 \
480         man/journald.conf.5 \
481         man/systemd-journald.service.8 \
482         man/journalctl.1 \
483         man/systemd-inhibit.1 \
484         man/systemd-remount-fs.service.8 \
485         man/systemd-update-utmp-runlevel.service.8 \
486         man/systemd-initctl.service.8 \
487         man/systemd-shutdownd.service.8 \
488         man/systemd-suspend.service.8 \
489         man/systemd-halt.service.8 \
490         man/systemd-fsck@.service.8 \
491         man/systemd-ask-password-console.service.8 \
492         man/systemd-analyze.1 \
493         man/systemd-tty-ask-password-agent.1 \
494         man/systemd-getty-generator.8 \
495         man/systemd-system-update-generator.8 \
496         man/systemd-fstab-generator.8 \
497         man/systemd.preset.5 \
498         man/sd-id128.3 \
499         man/sd_id128_to_string.3 \
500         man/sd_id128_randomize.3 \
501         man/sd_id128_get_machine.3 \
502         man/sd-journal.3 \
503         man/sd_journal_print.3 \
504         man/sd_journal_stream_fd.3 \
505         man/sd_journal_open.3 \
506         man/sd_journal_next.3 \
507         man/sd_journal_get_data.3 \
508         man/sd_journal_get_realtime_usec.3 \
509         man/sd_journal_get_cutoff_realtime_usec.3 \
510         man/sd_journal_get_cursor.3 \
511         man/sd_journal_get_fd.3 \
512         man/sd_journal_get_usage.3 \
513         man/sd_journal_add_match.3 \
514         man/sd_journal_seek_head.3
515
516 MANPAGES_ALIAS = \
517         man/reboot.8 \
518         man/poweroff.8 \
519         man/init.1 \
520         man/systemd-modules-load.8 \
521         man/systemd-sysctl.8 \
522         man/systemd-journald.socket.8 \
523         man/systemd-journald.8 \
524         man/systemd-remount-fs.8 \
525         man/systemd-update-utmp-shutdown.service.8 \
526         man/systemd-update-utmp.8 \
527         man/systemd-initctl.socket.8 \
528         man/systemd-initctl.8 \
529         man/systemd-shutdownd.socket.8 \
530         man/systemd-shutdownd.8 \
531         man/systemd-hibernate.service.8 \
532         man/systemd-sleep.8 \
533         man/systemd-shutdown.8 \
534         man/systemd-poweroff.service.8 \
535         man/systemd-reboot.service.8 \
536         man/systemd-kexec.service.8 \
537         man/systemd-fsck.8 \
538         man/systemd-fsck-root.service.8 \
539         man/systemd-ask-password-console.path.8 \
540         man/systemd-ask-password-wall.service.8 \
541         man/systemd-ask-password-wall.path.8 \
542         man/systemd-tmpfiles-setup.service.8 \
543         man/systemd-tmpfiles-clean.service.8 \
544         man/systemd-tmpfiles-clean.timer.8 \
545         man/sd_id128_t.3 \
546         man/SD_ID128_MAKE.3 \
547         man/SD_ID128_FORMAT_STR.3 \
548         man/SD_ID128_FORMAT_VAL.3 \
549         man/sd_id128_equal.3 \
550         man/sd_id128_from_string.3 \
551         man/sd_id128_get_boot.3 \
552         man/sd_journal_printv.3 \
553         man/sd_journal_send.3 \
554         man/sd_journal_sendv.3 \
555         man/sd_journal_perror.3 \
556         man/SD_JOURNAL_SUPPRESS_LOCATION.3 \
557         man/sd_journal_open_directory.3 \
558         man/sd_journal_close.3 \
559         man/sd_journal.3 \
560         man/SD_JOURNAL_RUNTIME_ONLY.3 \
561         man/SD_JOURNAL_SYSTEM_ONLY.3 \
562         man/SD_JOURNAL_LOCAL_ONLY.3 \
563         man/sd_journal_previous.3 \
564         man/sd_journal_next_skip.3 \
565         man/sd_journal_previous_skip.3 \
566         man/SD_JOURNAL_FOREACH.3 \
567         man/SD_JOURNAL_FOREACH_BACKWARDS.3 \
568         man/sd_journal_enumerate_data.3 \
569         man/sd_journal_restart_data.3 \
570         man/SD_JOURNAL_FOREACH_DATA.3 \
571         man/sd_journal_get_monotonic_usec.3 \
572         man/sd_journal_get_cutoff_monotonic_usec.3 \
573         man/sd_journal_process.3 \
574         man/sd_journal_wait.3 \
575         man/SD_JOURNAL_NOP.3 \
576         man/SD_JOURNAL_APPEND.3 \
577         man/SD_JOURNAL_INVALIDATE.3 \
578         man/sd_journal_add_disjunction.3 \
579         man/sd_journal_flush_matches.3 \
580         man/sd_journal_seek_tail.3 \
581         man/sd_journal_seek_monotonic_usec.3 \
582         man/sd_journal_seek_realtime_usec.3 \
583         man/sd_journal_seek_cursor.3 \
584         man/sd_journal_test_cursor.3
585
586 man/reboot.8: man/halt.8
587 man/poweroff.8: man/halt.8
588 man/init.1: man/systemd.1
589 man/systemd-modules-load.8: man/systemd-modules-load.service.8
590 man/systemd-sysctl.8: man/systemd-sysctl.service.8
591 man/systemd-journald.socket.8: man/systemd-journald.service.8
592 man/systemd-journald.8: man/systemd-journald.service.8
593 man/systemd-remount-fs.8: man/systemd-remount-fs.service.8
594 man/systemd-update-utmp-shutdown.service.8: man/systemd-update-utmp-runlevel.service.8
595 man/systemd-update-utmp.8: man/systemd-update-utmp-runlevel.service.8
596 man/systemd-initctl.socket.8: man/systemd-initctl.service.8
597 man/systemd-initctl.8: man/systemd-initctl.service.8
598 man/systemd-shutdownd.socket.8: man/systemd-shutdownd.service.8
599 man/systemd-shutdownd.8: man/systemd-shutdownd.service.8
600 man/systemd-hibernate.service.8: man/systemd-suspend.service.8
601 man/systemd-sleep.8: man/systemd-suspend.service.8
602 man/systemd-shutdown.8: man/systemd-halt.service.8
603 man/systemd-poweroff.service.8: man/systemd-halt.service.8
604 man/systemd-reboot.service.8: man/systemd-halt.service.8
605 man/systemd-kexec.service.8: man/systemd-halt.service.8
606 man/systemd-fsck.8: man/systemd-fsck@.service.8
607 man/systemd-fsck-root.service.8: man/systemd-fsck@.service.8
608 man/systemd-ask-password-console.path.8: man/systemd-ask-password-console.service.8
609 man/systemd-ask-password-wall.service.8: man/systemd-ask-password-console.service.8
610 man/systemd-ask-password-wall.path.8: man/systemd-ask-password-console.service.8
611 man/systemd-tmpfiles-setup.service.8: man/systemd-tmpfiles.8
612 man/systemd-tmpfiles-clean.service.8: man/systemd-tmpfiles.8
613 man/systemd-tmpfiles-clean.timer.8: man/systemd-tmpfiles.8
614 man/sd_id128_t.3: man/sd-id128.3
615 man/SD_ID128_MAKE.3: man/sd-id128.3
616 man/SD_ID128_FORMAT_STR.3: man/sd-id128.3
617 man/SD_ID128_FORMAT_VAL.3: man/sd-id128.3
618 man/sd_id128_equal.3: man/sd-id128.3
619 man/sd_id128_from_string.3: man/sd_id128_to_string.3
620 man/sd_id128_get_boot.3: man/sd_id128_get_machine.3
621 man/sd_journal_printv.3: man/sd_journal_print.3
622 man/sd_journal_send.3: man/sd_journal_print.3
623 man/sd_journal_sendv.3: man/sd_journal_print.3
624 man/sd_journal_perror.3: man/sd_journal_print.3
625 man/SD_JOURNAL_SUPPRESS_LOCATION.3: man/sd_journal_print.3
626 man/sd_journal_open_directory.3: man/sd_journal_open.3
627 man/sd_journal_close.3: man/sd_journal_open.3
628 man/sd_journal.3: man/sd_journal_open.3
629 man/SD_JOURNAL_RUNTIME_ONLY.3: man/sd_journal_open.3
630 man/SD_JOURNAL_SYSTEM_ONLY.3: man/sd_journal_open.3
631 man/SD_JOURNAL_LOCAL_ONLY.3: man/sd_journal_open.3
632 man/sd_journal_previous.3: man/sd_journal_next.3
633 man/sd_journal_next_skip.3: man/sd_journal_next.3
634 man/sd_journal_previous_skip.3: man/sd_journal_next.3
635 man/SD_JOURNAL_FOREACH.3: man/sd_journal_next.3
636 man/SD_JOURNAL_FOREACH_BACKWARDS.3: man/sd_journal_next.3
637 man/sd_journal_enumerate_data.3: man/sd_journal_get_data.3
638 man/sd_journal_restart_data.3: man/sd_journal_get_data.3
639 man/SD_JOURNAL_FOREACH_DATA.3: man/sd_journal_get_data.3
640 man/sd_journal_get_monotonic_usec.3: man/sd_journal_get_realtime_usec.3
641 man/sd_journal_get_cutoff_monotonic_usec.3: man/sd_journal_get_cutoff_realtime_usec.3
642 man/sd_journal_process.3: man/sd_journal_get_fd.3
643 man/sd_journal_wait.3: man/sd_journal_get_fd.3
644 man/SD_JOURNAL_NOP.3: man/sd_journal_get_fd.3
645 man/SD_JOURNAL_APPEND.3: man/sd_journal_get_fd.3
646 man/SD_JOURNAL_INVALIDATE.3: man/sd_journal_get_fd.3
647 man/sd_journal_add_disjunction.3: man/sd_journal_add_match.3
648 man/sd_journal_flush_matches.3: man/sd_journal_add_match.3
649 man/sd_journal_seek_tail.3: man/sd_journal_seek_head.3
650 man/sd_journal_seek_monotonic_usec.3: man/sd_journal_seek_head.3
651 man/sd_journal_seek_realtime_usec.3: man/sd_journal_seek_head.3
652 man/sd_journal_seek_cursor.3: man/sd_journal_seek_head.3
653 man/sd_journal_test_cursor.3: man/sd_journal_get_cursor.3
654
655 XML_FILES = \
656         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
657
658 if ENABLE_MANPAGES
659 man_MANS = \
660         $(MANPAGES) \
661         $(MANPAGES_ALIAS)
662
663 noinst_DATA = \
664         ${XML_FILES:.xml=.html}
665
666 CLEANFILES += \
667         $(MANPAGES) \
668         $(MANPAGES_ALIAS) \
669         ${XML_FILES:.xml=.html}
670
671 if HAVE_PYTHON
672 noinst_DATA += \
673         man/index.html
674
675 CLEANFILES += \
676         man/index.html
677
678 man/index.html: make-man-index.py $(XML_FILES)
679         $(AM_V_at)$(MKDIR_P) $(dir $@)
680         $(AM_V_GEN)$(PYTHON) $^ > $@
681
682 MANPAGES += \
683         man/systemd.directives.5
684
685 EXTRA_DIST += \
686         man/index.html
687
688 XML_DIRECTIVE_FILES = \
689         man/systemd.unit.xml \
690         man/systemd.service.xml \
691         man/systemd.socket.xml \
692         man/systemd.mount.xml \
693         man/systemd.automount.xml \
694         man/systemd.swap.xml \
695         man/systemd.target.xml \
696         man/systemd.path.xml \
697         man/systemd.timer.xml \
698         man/systemd.snapshot.xml \
699         man/systemd.exec.xml \
700         man/systemd.kill.xml \
701         man/systemd.device.xml \
702         man/systemd.conf.xml \
703         man/systemd.journal-fields.xml
704
705 man/systemd.directives.xml: make-directive-index.py $(XML_DIRECTIVE_FILES)
706         $(AM_V_at)$(MKDIR_P) $(dir $@)
707         $(AM_V_GEN)$(PYTHON) $^ > $@
708
709 EXTRA_DIST += \
710         man/systemd.directives.xml
711
712 endif
713
714 endif
715
716 EXTRA_DIST += \
717         $(XML_FILES) \
718         ${XML_FILES:.xml=.html} \
719         $(MANPAGES) \
720         $(MANPAGES_ALIAS) \
721         make-man-index.py \
722         make-directive-index.py
723
724 # ------------------------------------------------------------------------------
725 noinst_LTLIBRARIES += \
726         libsystemd-shared.la
727
728 libsystemd_shared_la_SOURCES = \
729         src/shared/linux/auto_dev-ioctl.h \
730         src/shared/linux/fanotify.h \
731         src/shared/linux/seccomp.h \
732         src/shared/linux/seccomp-bpf.h \
733         src/shared/missing.h \
734         src/shared/list.h \
735         src/shared/macro.h \
736         src/shared/def.h \
737         src/shared/util.c \
738         src/shared/util.h \
739         src/shared/virt.c \
740         src/shared/virt.h \
741         src/shared/path-util.c \
742         src/shared/path-util.h \
743         src/shared/hashmap.c \
744         src/shared/hashmap.h \
745         src/shared/set.c \
746         src/shared/set.h \
747         src/shared/strv.c \
748         src/shared/strv.h \
749         src/shared/conf-parser.c \
750         src/shared/conf-parser.h \
751         src/shared/log.c \
752         src/shared/log.h \
753         src/shared/ratelimit.h \
754         src/shared/ratelimit.c \
755         src/shared/exit-status.c \
756         src/shared/exit-status.h \
757         src/shared/utf8.c \
758         src/shared/utf8.h \
759         src/shared/pager.c \
760         src/shared/pager.h \
761         src/shared/ioprio.h \
762         src/shared/socket-util.c \
763         src/shared/socket-util.h \
764         src/shared/conf-files.c \
765         src/shared/conf-files.h \
766         src/shared/cgroup-util.c \
767         src/shared/cgroup-util.h \
768         src/shared/cgroup-show.c \
769         src/shared/cgroup-show.h \
770         src/shared/unit-name.c \
771         src/shared/unit-name.h \
772         src/shared/utmp-wtmp.c \
773         src/shared/utmp-wtmp.h \
774         src/shared/watchdog.c \
775         src/shared/watchdog.h \
776         src/shared/spawn-ask-password-agent.c \
777         src/shared/spawn-ask-password-agent.h \
778         src/shared/specifier.c \
779         src/shared/specifier.h \
780         src/shared/spawn-polkit-agent.c \
781         src/shared/spawn-polkit-agent.h \
782         src/shared/hwclock.c \
783         src/shared/hwclock.h
784
785 #-------------------------------------------------------------------------------
786 noinst_LTLIBRARIES += \
787         libsystemd-dbus.la
788
789 libsystemd_dbus_la_SOURCES = \
790         src/shared/dbus-common.c \
791         src/shared/dbus-common.h \
792         src/shared/dbus-loop.c \
793         src/shared/dbus-loop.h \
794         src/shared/polkit.c \
795         src/shared/polkit.h
796
797 libsystemd_dbus_la_CFLAGS = \
798         $(AM_CFLAGS) \
799         $(DBUS_CFLAGS)
800
801 libsystemd_dbus_la_LIBADD = \
802         $(DBUS_LIBS)
803
804 # ------------------------------------------------------------------------------
805 noinst_LTLIBRARIES += \
806         libsystemd-units.la
807
808 libsystemd_units_la_SOURCES = \
809         src/shared/install.c \
810         src/shared/install.h \
811         src/shared/path-lookup.c \
812         src/shared/path-lookup.h
813
814 libsystemd_units_la_CFLAGS = \
815         $(AM_CFLAGS) \
816         $(DBUS_CFLAGS)
817
818 # ------------------------------------------------------------------------------
819 noinst_LTLIBRARIES += \
820         libsystemd-label.la
821
822 libsystemd_label_la_SOURCES = \
823         src/shared/cgroup-label.c \
824         src/shared/socket-label.c \
825         src/shared/label.c \
826         src/shared/label.h \
827         src/shared/selinux-util.c \
828         src/shared/selinux-util.h \
829         src/shared/mkdir.c \
830         src/shared/mkdir.h \
831         src/shared/ask-password-api.c \
832         src/shared/ask-password-api.h \
833         src/shared/dev-setup.c \
834         src/shared/dev-setup.h
835
836 libsystemd_label_la_CFLAGS = \
837         $(AM_CFLAGS) \
838         $(SELINUX_CFLAGS)
839
840 libsystemd_label_la_LIBADD = \
841         $(SELINUX_LIBS)
842
843 # ------------------------------------------------------------------------------
844 noinst_LTLIBRARIES += \
845         libsystemd-logs.la
846
847 libsystemd_logs_la_SOURCES = \
848         src/shared/logs-show.c \
849         src/shared/logs-show.h
850
851 libsystemd_logs_la_CFLAGS = \
852         $(AM_CFLAGS)
853
854 libsystemd_logs_la_LIBADD = \
855         libsystemd-journal-internal.la \
856         libsystemd-id128-internal.la \
857         libsystemd-shared.la
858
859 # ------------------------------------------------------------------------------
860 noinst_LTLIBRARIES += \
861         libsystemd-capability.la
862
863 libsystemd_capability_la_SOURCES = \
864         src/shared/capability.c \
865         src/shared/capability.h
866
867 libsystemd_capability_la_CFLAGS = \
868         $(AM_CFLAGS) \
869         $(CAP_CFLAGS)
870
871 libsystemd_capability_la_LIBADD = \
872         $(CAP_LIBS)
873
874 # ------------------------------------------------------------------------------
875 noinst_LTLIBRARIES += \
876         libsystemd-audit.la
877
878 libsystemd_audit_la_SOURCES = \
879         src/shared/audit.c \
880         src/shared/audit.h
881
882 libsystemd_audit_la_LIBADD = \
883         libsystemd-capability.la
884
885 # ------------------------------------------------------------------------------
886 if HAVE_ACL
887 noinst_LTLIBRARIES += \
888         libsystemd-acl.la
889
890 libsystemd_acl_la_SOURCES = \
891         src/shared/acl-util.c \
892         src/shared/acl-util.h
893
894 libsystemd_acl_la_CFLAGS = \
895         $(AM_CFLAGS) \
896         $(ACL_CFLAGS)
897
898 libsystemd_acl_la_LIBADD = \
899         $(ACL_LIBS)
900 endif
901
902 # ------------------------------------------------------------------------------
903 noinst_LTLIBRARIES += \
904         libsystemd-core.la
905
906 libsystemd_core_la_SOURCES = \
907         src/core/unit.c \
908         src/core/unit.h \
909         src/core/unit-printf.c \
910         src/core/unit-printf.h \
911         src/core/job.c \
912         src/core/job.h \
913         src/core/manager.c \
914         src/core/manager.h \
915         src/core/transaction.c \
916         src/core/transaction.h \
917         src/core/load-fragment.c \
918         src/core/load-fragment.h \
919         src/core/service.c \
920         src/core/service.h \
921         src/core/automount.c \
922         src/core/automount.h \
923         src/core/mount.c \
924         src/core/mount.h \
925         src/core/swap.c \
926         src/core/swap.h \
927         src/core/device.c \
928         src/core/device.h \
929         src/core/target.c \
930         src/core/target.h \
931         src/core/snapshot.c \
932         src/core/snapshot.h \
933         src/core/socket.c \
934         src/core/socket.h \
935         src/core/timer.c \
936         src/core/timer.h \
937         src/core/path.c \
938         src/core/path.h \
939         src/core/load-dropin.c \
940         src/core/load-dropin.h \
941         src/core/execute.c \
942         src/core/execute.h \
943         src/core/kill.c \
944         src/core/kill.h \
945         src/core/dbus.c \
946         src/core/dbus.h \
947         src/core/dbus-manager.c \
948         src/core/dbus-manager.h \
949         src/core/dbus-unit.c \
950         src/core/dbus-unit.h \
951         src/core/dbus-job.c \
952         src/core/dbus-job.h \
953         src/core/dbus-service.c \
954         src/core/dbus-service.h \
955         src/core/dbus-socket.c \
956         src/core/dbus-socket.h \
957         src/core/dbus-timer.c \
958         src/core/dbus-timer.h \
959         src/core/dbus-target.c \
960         src/core/dbus-target.h \
961         src/core/dbus-mount.c \
962         src/core/dbus-mount.h \
963         src/core/dbus-automount.c \
964         src/core/dbus-automount.h \
965         src/core/dbus-swap.c \
966         src/core/dbus-swap.h \
967         src/core/dbus-snapshot.c \
968         src/core/dbus-snapshot.h \
969         src/core/dbus-device.c \
970         src/core/dbus-device.h \
971         src/core/dbus-execute.c \
972         src/core/dbus-execute.h \
973         src/core/dbus-kill.c \
974         src/core/dbus-kill.h \
975         src/core/dbus-path.c \
976         src/core/dbus-path.h \
977         src/core/cgroup.c \
978         src/core/cgroup.h \
979         src/core/selinux-access.c \
980         src/core/selinux-access.h \
981         src/core/selinux-setup.c \
982         src/core/selinux-setup.h \
983         src/core/ima-setup.c \
984         src/core/ima-setup.h \
985         src/core/kmod-setup.c \
986         src/core/kmod-setup.h \
987         src/core/locale-setup.h \
988         src/core/locale-setup.c \
989         src/core/hostname-setup.c \
990         src/core/hostname-setup.h \
991         src/core/machine-id-setup.c \
992         src/core/machine-id-setup.h \
993         src/core/mount-setup.c \
994         src/core/mount-setup.h \
995         src/core/loopback-setup.h \
996         src/core/loopback-setup.c \
997         src/core/fdset.c \
998         src/core/fdset.h \
999         src/core/condition.c \
1000         src/core/condition.h \
1001         src/core/namespace.c \
1002         src/core/namespace.h \
1003         src/core/tcpwrap.c \
1004         src/core/tcpwrap.h \
1005         src/core/cgroup-attr.c \
1006         src/core/cgroup-attr.h \
1007         src/core/securebits.h \
1008         src/core/initreq.h \
1009         src/core/special.h \
1010         src/core/bus-errors.h \
1011         src/core/build.h \
1012         src/core/sysfs-show.h \
1013         src/core/switch-root.h \
1014         src/core/switch-root.c \
1015         src/core/killall.h \
1016         src/core/killall.c \
1017         src/core/syscall-list.c \
1018         src/core/syscall-list.h \
1019         src/core/audit-fd.c \
1020         src/core/audit-fd.h
1021
1022 nodist_libsystemd_core_la_SOURCES = \
1023         src/core/load-fragment-gperf.c \
1024         src/core/load-fragment-gperf-nulstr.c \
1025         src/core/syscall-from-name.h \
1026         src/core/syscall-to-name.h
1027
1028 libsystemd_core_la_CFLAGS = \
1029         $(AM_CFLAGS) \
1030         $(DBUS_CFLAGS) \
1031         $(LIBWRAP_CFLAGS) \
1032         $(PAM_CFLAGS) \
1033         $(AUDIT_CFLAGS) \
1034         $(KMOD_CFLAGS)
1035
1036 libsystemd_core_la_LIBADD = \
1037         libsystemd-capability.la \
1038         libsystemd-units.la \
1039         libsystemd-label.la \
1040         libsystemd-shared.la \
1041         libsystemd-dbus.la \
1042         libsystemd-audit.la \
1043         libsystemd-id128-internal.la \
1044         libudev.la \
1045         $(LIBWRAP_LIBS) \
1046         $(PAM_LIBS) \
1047         $(AUDIT_LIBS) \
1048         $(CAP_LIBS) \
1049         $(KMOD_LIBS)
1050
1051 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1052         $(AM_V_at)$(MKDIR_P) $(dir $@)
1053         $(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 ";" }' < $< > $@
1054
1055 EXTRA_DIST += \
1056         src/core/load-fragment-gperf.gperf.m4
1057
1058 CLEANFILES += \
1059         src/core/load-fragment-gperf.gperf \
1060         src/core/load-fragment-gperf.c \
1061         src/core/load-fragment-gperf-nulstr.c \
1062         src/core/syscall-list.txt \
1063         src/core/syscall-from-name.gperf
1064
1065 BUILT_SOURCES += \
1066         src/core/syscall-from-name.h \
1067         src/core/syscall-to-name.h
1068
1069 src/core/syscall-list.txt: Makefile
1070         $(AM_V_at)$(MKDIR_P) $(dir $@)
1071         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/syscall.h - < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[ \t]+\(?.*[0-9]+.*\)?/ { sub(/__NR_/, "", $$2); print $$2; }' > $@
1072
1073 src/core/syscall-from-name.gperf: src/core/syscall-list.txt Makefile
1074         $(AM_V_at)$(MKDIR_P) $(dir $@)
1075         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct syscall_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, __NR_%s\n", $$1, $$1 }' < $< > $@
1076
1077 src/core/syscall-from-name.h: src/core/syscall-from-name.gperf Makefile
1078         $(AM_V_at)$(MKDIR_P) $(dir $@)
1079         $(AM_V_GEN)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_syscall -H hash_syscall_name -p -C < $< > $@
1080
1081 src/core/syscall-to-name.h: src/core/syscall-list.txt Makefile
1082         $(AM_V_at)$(MKDIR_P) $(dir $@)
1083         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const syscall_names[] = { "} { printf "[__NR_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
1084
1085 # ------------------------------------------------------------------------------
1086 systemd_SOURCES = \
1087         src/core/main.c
1088
1089 systemd_CFLAGS = \
1090         $(AM_CFLAGS) \
1091         $(DBUS_CFLAGS)
1092
1093 systemd_LDADD = \
1094         libsystemd-core.la \
1095         libsystemd-daemon.la \
1096         libsystemd-id128-internal.la \
1097         libsystemd-dbus.la
1098
1099 dist_pkgsysconf_DATA += \
1100         src/core/system.conf \
1101         src/core/user.conf
1102
1103 dist_dbuspolicy_DATA += \
1104         src/core/org.freedesktop.systemd1.conf
1105
1106 dist_dbussystemservice_DATA += \
1107         src/core/org.freedesktop.systemd1.service
1108
1109 dbusinterface_DATA += \
1110         org.freedesktop.systemd1.Manager.xml \
1111         org.freedesktop.systemd1.Job.xml \
1112         org.freedesktop.systemd1.Unit.xml \
1113         org.freedesktop.systemd1.Service.xml \
1114         org.freedesktop.systemd1.Socket.xml \
1115         org.freedesktop.systemd1.Timer.xml \
1116         org.freedesktop.systemd1.Target.xml \
1117         org.freedesktop.systemd1.Device.xml \
1118         org.freedesktop.systemd1.Mount.xml \
1119         org.freedesktop.systemd1.Automount.xml \
1120         org.freedesktop.systemd1.Snapshot.xml \
1121         org.freedesktop.systemd1.Swap.xml \
1122         org.freedesktop.systemd1.Path.xml
1123
1124 polkitpolicy_in_in_files = \
1125         src/core/org.freedesktop.systemd1.policy.in.in
1126
1127 org.freedesktop.systemd1.%.xml: systemd
1128         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.$* $< $@.tmp && \
1129                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1130                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1131
1132 pkgconfigdata_DATA = \
1133         src/core/systemd.pc
1134
1135 nodist_rpmmacros_DATA = \
1136         src/core/macros.systemd
1137
1138 EXTRA_DIST += \
1139         src/core/systemd.pc.in \
1140         src/core/macros.systemd.in
1141
1142 CLEANFILES += \
1143         src/core/macros.systemd
1144
1145 # ------------------------------------------------------------------------------
1146 noinst_PROGRAMS += \
1147         test-engine \
1148         test-job-type \
1149         test-ns \
1150         test-loopback \
1151         test-hostname \
1152         test-daemon \
1153         test-cgroup \
1154         test-env-replace \
1155         test-strv \
1156         test-install \
1157         test-watchdog \
1158         test-unit-name \
1159         test-log \
1160         test-unit-file \
1161         test-date
1162
1163 TESTS += \
1164         test-job-type \
1165         test-env-replace \
1166         test-strv \
1167         test-unit-name \
1168         test-unit-file \
1169         test-date
1170
1171 test_engine_SOURCES = \
1172         src/test/test-engine.c
1173
1174 test_engine_CFLAGS = \
1175         $(AM_CFLAGS) \
1176         $(DBUS_CFLAGS)
1177
1178 test_engine_LDADD = \
1179         libsystemd-core.la \
1180         libsystemd-daemon.la \
1181         libsystemd-dbus.la
1182
1183 test_job_type_SOURCES = \
1184         src/test/test-job-type.c
1185
1186 test_job_type_CFLAGS = \
1187         $(AM_CFLAGS) \
1188         $(DBUS_CFLAGS)
1189
1190 test_job_type_LDADD = \
1191         libsystemd-core.la \
1192         libsystemd-daemon.la
1193
1194 test_ns_SOURCES = \
1195         src/test/test-ns.c
1196
1197 test_ns_LDADD = \
1198         libsystemd-core.la
1199
1200 test_loopback_SOURCES = \
1201         src/test/test-loopback.c
1202
1203 test_loopback_LDADD = \
1204         libsystemd-shared.la \
1205         libsystemd-core.la
1206
1207 test_hostname_SOURCES = \
1208         src/test/test-hostname.c
1209
1210 test_hostname_LDADD = \
1211         libsystemd-core.la
1212
1213 test_unit_name_SOURCES = \
1214         src/test/test-unit-name.c
1215
1216 test_unit_name_LDADD = \
1217         libsystemd-core.la
1218
1219 test_unit_file_SOURCES = \
1220         src/test/test-unit-file.c
1221
1222 test_unit_file_LDADD = \
1223         libsystemd-core.la
1224
1225 test_log_SOURCES = \
1226         src/test/test-log.c
1227
1228 test_log_LDADD = \
1229         libsystemd-core.la
1230
1231 test_date_SOURCES = \
1232         src/test/test-date.c
1233
1234 test_date_LDADD = \
1235         libsystemd-core.la
1236
1237 test_daemon_SOURCES = \
1238         src/test/test-daemon.c
1239
1240 test_daemon_LDADD = \
1241         libsystemd-shared.la \
1242         libsystemd-daemon.la
1243
1244 test_cgroup_SOURCES = \
1245         src/test/test-cgroup.c
1246
1247 test_cgroup_LDADD = \
1248         libsystemd-label.la \
1249         libsystemd-shared.la
1250
1251 test_env_replace_SOURCES = \
1252         src/test/test-env-replace.c
1253
1254 test_env_replace_LDADD = \
1255         libsystemd-shared.la
1256
1257 test_strv_SOURCES = \
1258         src/test/test-strv.c
1259
1260 test_strv_LDADD = \
1261         libsystemd-shared.la
1262
1263 test_install_SOURCES = \
1264         src/test/test-install.c
1265
1266 test_install_CFLAGS = \
1267         $(AM_CFLAGS) \
1268         $(DBUS_CFLAGS)
1269
1270 test_install_LDADD = \
1271         libsystemd-units.la \
1272         libsystemd-label.la \
1273         libsystemd-shared.la
1274
1275 test_watchdog_SOURCES = \
1276         src/test/test-watchdog.c
1277
1278 test_watchdog_LDADD = \
1279         libsystemd-shared.la
1280
1281 # ------------------------------------------------------------------------------
1282 systemd_initctl_SOURCES = \
1283         src/initctl/initctl.c
1284
1285 systemd_initctl_CFLAGS = \
1286         $(AM_CFLAGS) \
1287         $(DBUS_CFLAGS)
1288
1289 systemd_initctl_LDADD = \
1290         libsystemd-shared.la \
1291         libsystemd-daemon.la \
1292         libsystemd-dbus.la
1293
1294 # ------------------------------------------------------------------------------
1295 systemd_update_utmp_SOURCES = \
1296         src/update-utmp/update-utmp.c
1297
1298 systemd_update_utmp_CFLAGS = \
1299         $(AM_CFLAGS) \
1300         $(DBUS_CFLAGS) \
1301         $(AUDIT_CFLAGS)
1302
1303 systemd_update_utmp_LDADD = \
1304         libsystemd-shared.la \
1305         libsystemd-dbus.la \
1306         $(AUDIT_LIBS)
1307
1308 # ------------------------------------------------------------------------------
1309 systemd_shutdownd_SOURCES = \
1310         src/shutdownd/shutdownd.c
1311
1312 systemd_shutdownd_LDADD = \
1313         libsystemd-label.la \
1314         libsystemd-shared.la \
1315         libsystemd-daemon.la
1316
1317 pkginclude_HEADERS += \
1318         src/systemd/sd-shutdown.h
1319
1320 # ------------------------------------------------------------------------------
1321 systemd_shutdown_SOURCES = \
1322         src/core/umount.c \
1323         src/core/umount.h \
1324         src/core/shutdown.c \
1325         src/core/mount-setup.c \
1326         src/core/mount-setup.h \
1327         src/core/killall.h \
1328         src/core/killall.c
1329
1330 systemd_shutdown_LDADD = \
1331         libsystemd-label.la \
1332         libsystemd-shared.la \
1333         libudev.la
1334
1335 # ------------------------------------------------------------------------------
1336 systemd_modules_load_SOURCES = \
1337         src/modules-load/modules-load.c
1338
1339 systemd_modules_load_CFLAGS = \
1340         $(AM_CFLAGS) \
1341         $(KMOD_CFLAGS)
1342
1343 systemd_modules_load_LDADD = \
1344         libsystemd-shared.la \
1345         $(KMOD_LIBS)
1346
1347 # ------------------------------------------------------------------------------
1348 systemd_tmpfiles_SOURCES = \
1349         src/tmpfiles/tmpfiles.c
1350
1351 systemd_tmpfiles_LDADD = \
1352         libsystemd-label.la \
1353         libsystemd-shared.la \
1354         libsystemd-capability.la
1355
1356 # ------------------------------------------------------------------------------
1357 systemd_machine_id_setup_SOURCES = \
1358         src/machine-id-setup/machine-id-setup-main.c \
1359         src/core/machine-id-setup.c \
1360         src/core/machine-id-setup.h
1361
1362 systemd_machine_id_setup_LDADD = \
1363         libsystemd-label.la \
1364         libsystemd-shared.la \
1365         libsystemd-id128-internal.la
1366
1367 # ------------------------------------------------------------------------------
1368 systemd_sysctl_SOURCES = \
1369         src/sysctl/sysctl.c
1370
1371 systemd_sysctl_LDADD = \
1372         libsystemd-shared.la
1373
1374 # ------------------------------------------------------------------------------
1375 systemd_sleep_SOURCES = \
1376         src/sleep/sleep.c
1377
1378 systemd_sleep_LDADD = \
1379         libsystemd-shared.la
1380
1381 # ------------------------------------------------------------------------------
1382 systemd_fsck_SOURCES = \
1383         src/fsck/fsck.c
1384
1385 systemd_fsck_CFLAGS = \
1386         $(AM_CFLAGS) \
1387         $(DBUS_CFLAGS)
1388
1389 systemd_fsck_LDADD = \
1390         libsystemd-shared.la \
1391         libsystemd-dbus.la \
1392         libudev.la
1393
1394 # ------------------------------------------------------------------------------
1395 systemd_timestamp_SOURCES = \
1396         src/timestamp/timestamp.c
1397
1398 systemd_timestamp_LDADD = \
1399         libsystemd-shared.la
1400
1401 # ------------------------------------------------------------------------------
1402 systemd_ac_power_SOURCES = \
1403         src/ac-power/ac-power.c
1404
1405 systemd_ac_power_LDADD = \
1406         libsystemd-shared.la \
1407         libudev.la
1408
1409 # ------------------------------------------------------------------------------
1410 systemd_detect_virt_SOURCES = \
1411         src/detect-virt/detect-virt.c
1412
1413 systemd_detect_virt_LDADD = \
1414         libsystemd-shared.la
1415
1416 systemd-detect-virt-install-hook:
1417         $(SETCAP) cap_dac_override,cap_sys_ptrace=ep $(DESTDIR)$(bindir)/systemd-detect-virt ||:
1418
1419 INSTALL_EXEC_HOOKS += \
1420         systemd-detect-virt-install-hook
1421
1422 # ------------------------------------------------------------------------------
1423 systemd_delta_SOURCES = \
1424         src/delta/delta.c
1425
1426 systemd_delta_LDADD = \
1427         libsystemd-shared.la
1428
1429 # ------------------------------------------------------------------------------
1430 systemd_getty_generator_SOURCES = \
1431         src/getty-generator/getty-generator.c
1432
1433 systemd_getty_generator_LDADD = \
1434         libsystemd-label.la \
1435         libsystemd-shared.la
1436
1437 # ------------------------------------------------------------------------------
1438 systemd_fstab_generator_SOURCES = \
1439         src/fstab-generator/fstab-generator.c \
1440         src/core/mount-setup.c
1441
1442 systemd_fstab_generator_LDADD = \
1443         libsystemd-label.la \
1444         libsystemd-shared.la
1445
1446 # ------------------------------------------------------------------------------
1447 systemd_system_update_generator_SOURCES = \
1448         src/system-update-generator/system-update-generator.c
1449
1450 systemd_system_update_generator_LDADD = \
1451         libsystemd-label.la \
1452         libsystemd-shared.la
1453
1454 # ------------------------------------------------------------------------------
1455 systemd_rc_local_generator_SOURCES = \
1456         src/rc-local-generator/rc-local-generator.c
1457
1458 systemd_rc_local_generator_LDADD = \
1459         libsystemd-label.la \
1460         libsystemd-shared.la
1461
1462 # ------------------------------------------------------------------------------
1463 systemd_remount_fs_SOURCES = \
1464         src/remount-fs/remount-fs.c \
1465         src/core/mount-setup.c \
1466         src/core/mount-setup.h
1467
1468 systemd_remount_fs_LDADD = \
1469         libsystemd-label.la \
1470         libsystemd-shared.la
1471
1472 # ------------------------------------------------------------------------------
1473 systemd_cgroups_agent_SOURCES = \
1474         src/cgroups-agent/cgroups-agent.c
1475
1476 systemd_cgroups_agent_CFLAGS = \
1477         $(AM_CFLAGS) \
1478         $(DBUS_CFLAGS)
1479
1480 systemd_cgroups_agent_LDADD = \
1481         libsystemd-shared.la \
1482         libsystemd-dbus.la
1483
1484 # ------------------------------------------------------------------------------
1485 systemctl_SOURCES = \
1486         src/systemctl/systemctl.c
1487
1488 systemctl_CFLAGS = \
1489         $(AM_CFLAGS) \
1490         $(DBUS_CFLAGS)
1491
1492 systemctl_LDADD = \
1493         libsystemd-units.la \
1494         libsystemd-label.la \
1495         libsystemd-shared.la \
1496         libsystemd-daemon.la \
1497         libsystemd-dbus.la \
1498         libsystemd-logs.la
1499
1500 # ------------------------------------------------------------------------------
1501 systemd_notify_SOURCES = \
1502         src/notify/notify.c \
1503         src/readahead/sd-readahead.c
1504
1505 systemd_notify_LDADD = \
1506         libsystemd-shared.la \
1507         libsystemd-daemon.la
1508
1509 # ------------------------------------------------------------------------------
1510 systemd_ask_password_SOURCES = \
1511         src/ask-password/ask-password.c
1512
1513 systemd_ask_password_LDADD = \
1514         libsystemd-label.la \
1515         libsystemd-shared.la
1516
1517 # ------------------------------------------------------------------------------
1518 systemd_reply_password_SOURCES = \
1519         src/reply-password/reply-password.c
1520
1521 systemd_reply_password_LDADD = \
1522         libsystemd-shared.la
1523
1524 # ------------------------------------------------------------------------------
1525 systemd_cgls_SOURCES = \
1526         src/cgls/cgls.c
1527
1528 systemd_cgls_LDADD = \
1529         libsystemd-shared.la
1530
1531 # ------------------------------------------------------------------------------
1532 systemd_cgtop_SOURCES = \
1533         src/cgtop/cgtop.c
1534
1535 systemd_cgtop_LDADD = \
1536         libsystemd-shared.la
1537
1538 # ------------------------------------------------------------------------------
1539 systemd_nspawn_SOURCES = \
1540         src/nspawn/nspawn.c \
1541         src/core/mount-setup.c \
1542         src/core/mount-setup.h \
1543         src/core/loopback-setup.c \
1544         src/core/loopback-setup.h
1545
1546 systemd_nspawn_LDADD = \
1547         libsystemd-label.la \
1548         libsystemd-capability.la \
1549         libsystemd-shared.la \
1550         libsystemd-daemon.la \
1551         libsystemd-id128-internal.la
1552
1553 # ------------------------------------------------------------------------------
1554 systemd_stdio_bridge_SOURCES = \
1555         src/stdio-bridge/stdio-bridge.c
1556
1557 systemd_stdio_bridge_LDADD = \
1558         libsystemd-shared.la
1559
1560 # ------------------------------------------------------------------------------
1561 systemd_tty_ask_password_agent_SOURCES = \
1562         src/tty-ask-password-agent/tty-ask-password-agent.c
1563
1564 systemd_tty_ask_password_agent_LDADD = \
1565         libsystemd-label.la \
1566         libsystemd-shared.la
1567
1568 # ------------------------------------------------------------------------------
1569 libsystemd_daemon_la_SOURCES = \
1570         src/libsystemd-daemon/sd-daemon.c
1571
1572 libsystemd_daemon_la_CFLAGS = \
1573         $(AM_CFLAGS) \
1574         -fvisibility=hidden \
1575         -DSD_EXPORT_SYMBOLS
1576
1577 libsystemd_daemon_la_LDFLAGS = \
1578         $(AM_LDFLAGS) \
1579         -shared \
1580         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
1581         -Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon/libsystemd-daemon.sym
1582
1583 pkginclude_HEADERS += \
1584         src/systemd/sd-daemon.h
1585
1586 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1587 libsystemd-daemon-install-hook:
1588         if test "$(libdir)" != "$(rootlibdir)"; then \
1589                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
1590                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-daemon.so) && \
1591                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
1592                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-daemon.so && \
1593                 mv $(DESTDIR)$(libdir)/libsystemd-daemon.so.* $(DESTDIR)$(rootlibdir); \
1594         fi
1595
1596 INSTALL_EXEC_HOOKS += \
1597         libsystemd-daemon-install-hook
1598
1599 libsystemd-daemon-uninstall-hook:
1600         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
1601
1602 UNINSTALL_EXEC_HOOKS += \
1603         libsystemd-daemon-uninstall-hook
1604
1605 lib_LTLIBRARIES += \
1606         libsystemd-daemon.la
1607
1608 pkgconfiglib_DATA += \
1609         src/libsystemd-daemon/libsystemd-daemon.pc
1610
1611 MANPAGES += \
1612         man/sd-daemon.3 \
1613         man/sd_notify.3 \
1614         man/sd_listen_fds.3 \
1615         man/sd_is_fifo.3 \
1616         man/sd_booted.3
1617
1618 MANPAGES_ALIAS += \
1619         man/sd_is_socket.3 \
1620         man/sd_is_socket_unix.3 \
1621         man/sd_is_socket_inet.3 \
1622         man/sd_is_mq.3 \
1623         man/sd_notifyf.3 \
1624         man/SD_LISTEN_FDS_START.3 \
1625         man/SD_EMERG.3 \
1626         man/SD_ALERT.3 \
1627         man/SD_CRIT.3 \
1628         man/SD_ERR.3 \
1629         man/SD_WARNING.3 \
1630         man/SD_NOTICE.3 \
1631         man/SD_INFO.3 \
1632         man/SD_DEBUG.3
1633
1634 man/sd_is_socket.3: man/sd_is_fifo.3
1635 man/sd_is_socket_unix.3: man/sd_is_fifo.3
1636 man/sd_is_socket_inet.3: man/sd_is_fifo.3
1637 man/sd_is_mq.3: man/sd_is_fifo.3
1638 man/sd_notifyf.3: man/sd_notify.3
1639 man/SD_LISTEN_FDS_START.3: man/sd_listen_fds.3
1640 man/SD_EMERG.3: man/sd-daemon.3
1641 man/SD_ALERT.3: man/sd-daemon.3
1642 man/SD_CRIT.3: man/sd-daemon.3
1643 man/SD_ERR.3: man/sd-daemon.3
1644 man/SD_WARNING.3: man/sd-daemon.3
1645 man/SD_NOTICE.3: man/sd-daemon.3
1646 man/SD_INFO.3: man/sd-daemon.3
1647 man/SD_DEBUG.3: man/sd-daemon.3
1648
1649 EXTRA_DIST += \
1650         src/libsystemd-daemon/libsystemd-daemon.pc.in \
1651         src/libsystemd-daemon/libsystemd-daemon.sym
1652
1653 # ------------------------------------------------------------------------------
1654 if ENABLE_GTK_DOC
1655 SUBDIRS += \
1656         docs/libudev
1657 endif
1658
1659 include_HEADERS += \
1660         src/libudev/libudev.h
1661
1662 lib_LTLIBRARIES += \
1663         libudev.la
1664
1665 libudev_la_SOURCES =\
1666         src/libudev/libudev-private.h \
1667         src/libudev/libudev.c \
1668         src/libudev/libudev-list.c \
1669         src/libudev/libudev-util.c \
1670         src/libudev/libudev-device.c \
1671         src/libudev/libudev-enumerate.c \
1672         src/libudev/libudev-monitor.c \
1673         src/libudev/libudev-queue.c
1674
1675 libudev_la_CFLAGS = \
1676         $(AM_CFLAGS) \
1677         -fvisibility=hidden
1678
1679 libudev_la_LDFLAGS = \
1680         $(AM_LDFLAGS) \
1681         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
1682         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
1683
1684 libudev_la_LIBADD = \
1685         libsystemd-shared.la
1686
1687 pkgconfiglib_DATA += \
1688         src/libudev/libudev.pc
1689
1690 EXTRA_DIST += \
1691         src/libudev/libudev.pc.in \
1692         src/libudev/libudev.sym
1693
1694 CLEANFILES += \
1695         src/libudev/libudev.pc
1696
1697 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1698 libudev-install-move-hook:
1699         if test "$(libdir)" != "$(rootlibdir)"; then \
1700                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
1701                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libudev.so) && \
1702                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
1703                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libudev.so && \
1704                 mv $(DESTDIR)$(libdir)/libudev.so.* $(DESTDIR)$(rootlibdir); \
1705         fi
1706
1707 libudev-uninstall-move-hook:
1708         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
1709
1710 INSTALL_EXEC_HOOKS += libudev-install-move-hook
1711 UNINSTALL_EXEC_HOOKS += libudev-uninstall-move-hook
1712
1713 # ------------------------------------------------------------------------------
1714 noinst_LTLIBRARIES += \
1715         libudev-private.la
1716
1717 libudev_private_la_SOURCES =\
1718         $(libudev_la_SOURCES) \
1719         src/libudev/libudev-device-private.c \
1720         src/libudev/libudev-queue-private.c
1721
1722 libudev_private_la_CFLAGS = \
1723         $(AM_CFLAGS) \
1724         -fvisibility=default
1725
1726 libudev_private_la_LIBADD = \
1727         libsystemd-shared.la
1728
1729 # ------------------------------------------------------------------------------
1730 MANPAGES += \
1731         man/udev.7 \
1732         man/udevadm.8 \
1733         man/systemd-udevd.service.8
1734
1735 MANPAGES_ALIAS += \
1736         man/systemd-udevd.8 \
1737         man/systemd-udevd-control.socket.8 \
1738         man/systemd-udevd-kernel.socket.8
1739
1740 man/systemd-udevd.8: man/systemd-udevd.service.8
1741 man/systemd-udevd-control.socket.8: man/systemd-udevd.service.8
1742 man/systemd-udevd-kernel.socket.8: man/systemd-udevd.service.8
1743
1744 udev-confdirs:
1745         -$(MKDIR_P) $(DESTDIR)$(sysconfdir)/udev/rules.d
1746
1747 INSTALL_DATA_HOOKS += udev-confdirs
1748
1749 dist_udevrules_DATA += \
1750         rules/99-systemd.rules \
1751         rules/42-usb-hid-pm.rules \
1752         rules/50-udev-default.rules \
1753         rules/60-persistent-storage-tape.rules \
1754         rules/60-persistent-serial.rules \
1755         rules/60-persistent-input.rules \
1756         rules/60-persistent-alsa.rules \
1757         rules/60-persistent-storage.rules \
1758         rules/64-btrfs.rules \
1759         rules/75-net-description.rules \
1760         rules/75-tty-description.rules \
1761         rules/78-sound-card.rules \
1762         rules/80-drivers.rules \
1763         rules/95-udev-late.rules
1764
1765 udevconfdir = $(sysconfdir)/udev
1766 dist_udevconf_DATA = \
1767         src/udev/udev.conf
1768
1769 sharepkgconfigdir = $(datadir)/pkgconfig
1770 sharepkgconfig_DATA = \
1771         src/udev/udev.pc
1772
1773 EXTRA_DIST += \
1774         rules/99-systemd.rules.in \
1775         src/udev/udev.pc.in
1776
1777 CLEANFILES += \
1778         rules/99-systemd.rules \
1779         src/udev/udev.pc
1780
1781 EXTRA_DIST += \
1782         units/systemd-udevd.service.in \
1783         units/systemd-udev-trigger.service.in \
1784         units/systemd-udev-settle.service.in
1785
1786 CLEANFILES += \
1787         units/systemd-udevd.service \
1788         units/systemd-udev-trigger.service \
1789         units/systemd-udev-settle.service
1790
1791 systemd-install-hook:
1792         $(MKDIR_P) $(DESTDIR)$(systemunitdir)/sockets.target.wants
1793         ln -sf ../systemd-udevd-control.socket $(DESTDIR)$(systemunitdir)/sockets.target.wants/systemd-udevd-control.socket
1794         ln -sf ../systemd-udevd-kernel.socket $(DESTDIR)$(systemunitdir)/sockets.target.wants/systemd-udevd-kernel.socket
1795         $(MKDIR_P) $(DESTDIR)$(systemunitdir)/sysinit.target.wants
1796         ln -sf ../systemd-udevd.service $(DESTDIR)$(systemunitdir)/sysinit.target.wants/systemd-udevd.service
1797         ln -sf ../systemd-udev-trigger.service $(DESTDIR)$(systemunitdir)/sysinit.target.wants/systemd-udev-trigger.service
1798
1799 INSTALL_DATA_HOOKS += systemd-install-hook
1800
1801 bin_PROGRAMS += \
1802         udevadm
1803
1804 rootlibexec_PROGRAMS += \
1805         systemd-udevd
1806
1807 noinst_LTLIBRARIES += \
1808         libudev-core.la
1809
1810 libudev_core_la_SOURCES = \
1811         src/udev/udev.h \
1812         src/udev/udev-event.c \
1813         src/udev/udev-watch.c \
1814         src/udev/udev-node.c \
1815         src/udev/udev-rules.c \
1816         src/udev/udev-ctrl.c \
1817         src/udev/udev-builtin.c \
1818         src/udev/udev-builtin-blkid.c \
1819         src/udev/udev-builtin-btrfs.c \
1820         src/udev/udev-builtin-firmware.c \
1821         src/udev/udev-builtin-hwdb.c \
1822         src/udev/udev-builtin-input_id.c \
1823         src/udev/udev-builtin-kmod.c \
1824         src/udev/udev-builtin-path_id.c \
1825         src/udev/udev-builtin-usb_id.c \
1826         src/libsystemd-daemon/sd-daemon.c
1827
1828 libudev_core_la_CFLAGS = \
1829         $(AM_CFLAGS) \
1830         $(BLKID_CFLAGS) \
1831         $(KMOD_CFLAGS)
1832
1833 libudev_core_la_LIBADD = \
1834         libudev-private.la \
1835         libsystemd-label.la \
1836         libsystemd-shared.la \
1837         $(BLKID_LIBS) \
1838         $(KMOD_LIBS)
1839
1840 libudev_core_la_CPPFLAGS = \
1841         $(AM_CPPFLAGS) \
1842         -DFIRMWARE_PATH="$(FIRMWARE_PATH)" \
1843         -DUSB_DATABASE=\"$(USB_DATABASE)\" -DPCI_DATABASE=\"$(PCI_DATABASE)\"
1844
1845 if HAVE_ACL
1846 libudev_core_la_SOURCES += \
1847         src/udev/udev-builtin-uaccess.c \
1848         src/login/logind-acl.c \
1849         src/login/sd-login.c
1850
1851 libudev_core_la_LIBADD += \
1852         libsystemd-acl.la
1853 endif
1854
1855 systemd_udevd_SOURCES = \
1856         src/udev/udevd.c
1857
1858 systemd_udevd_LDADD = \
1859         libudev-core.la
1860
1861 udevadm_SOURCES = \
1862         src/udev/udevadm.c \
1863         src/udev/udevadm-info.c \
1864         src/udev/udevadm-control.c \
1865         src/udev/udevadm-monitor.c \
1866         src/udev/udevadm-settle.c \
1867         src/udev/udevadm-trigger.c \
1868         src/udev/udevadm-test.c \
1869         src/udev/udevadm-test-builtin.c
1870
1871 udevadm_LDADD = \
1872         libudev-core.la \
1873         libsystemd-shared.la
1874
1875 # ------------------------------------------------------------------------------
1876 TESTS += \
1877         test/udev-test.pl \
1878         test/rules-test.sh
1879
1880 noinst_PROGRAMS += \
1881         test-libudev \
1882         test-udev
1883
1884 test_libudev_SOURCES = \
1885         src/test/test-libudev.c
1886
1887 test_libudev_LDADD = \
1888         libsystemd-label.la \
1889         libsystemd-shared.la \
1890         libudev.la
1891
1892 test_udev_SOURCES = \
1893         src/test/test-udev.c
1894
1895 test_udev_LDADD = \
1896         libudev-core.la \
1897         libsystemd-shared.la \
1898         $(BLKID_LIBS) \
1899         $(KMOD_LIBS) \
1900         $(SELINUX_LIBS)
1901
1902 if HAVE_ACL
1903 test_udev_LDADD += \
1904         libsystemd-acl.la
1905 endif
1906
1907 check_DATA += \
1908         test/sys
1909
1910 # packed sysfs test tree
1911 test/sys:
1912         $(AM_V_at)$(MKDIR_P) $(dir $@)
1913         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
1914
1915 test-sys-distclean:
1916         -rm -rf test/sys
1917 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
1918
1919 EXTRA_DIST += \
1920         test/sys.tar.xz \
1921         test/udev-test.pl \
1922         test/rules-test.sh \
1923         test/rule-syntax-check.py
1924
1925 # ------------------------------------------------------------------------------
1926 ata_id_SOURCES = \
1927         src/udev/ata_id/ata_id.c
1928
1929 ata_id_LDADD = \
1930         libudev-private.la \
1931         libsystemd-shared.la
1932
1933 udevlibexec_PROGRAMS += \
1934         ata_id
1935
1936 # ------------------------------------------------------------------------------
1937 cdrom_id_SOURCES = \
1938         src/udev/cdrom_id/cdrom_id.c
1939
1940 cdrom_id_LDADD = \
1941         libudev.la \
1942         libsystemd-shared.la
1943
1944 udevlibexec_PROGRAMS += \
1945         cdrom_id
1946
1947 dist_udevrules_DATA += \
1948         rules/60-cdrom_id.rules
1949
1950 # ------------------------------------------------------------------------------
1951 collect_SOURCES = \
1952         src/udev/collect/collect.c
1953
1954 collect_LDADD = \
1955         libudev-private.la
1956
1957 udevlibexec_PROGRAMS += \
1958         collect
1959
1960 # ------------------------------------------------------------------------------
1961 scsi_id_SOURCES =\
1962         src/udev/scsi_id/scsi_id.c \
1963         src/udev/scsi_id/scsi_serial.c \
1964         src/udev/scsi_id/scsi.h \
1965         src/udev/scsi_id/scsi_id.h
1966
1967 scsi_id_LDADD = \
1968         libudev-private.la \
1969         libsystemd-shared.la
1970
1971 udevlibexec_PROGRAMS += \
1972         scsi_id
1973
1974 EXTRA_DIST += \
1975         src/udev/scsi_id/README
1976
1977 # ------------------------------------------------------------------------------
1978 v4l_id_SOURCES = \
1979         src/udev/v4l_id/v4l_id.c
1980
1981 v4l_id_LDADD = \
1982         libudev.la
1983
1984 udevlibexec_PROGRAMS += \
1985         v4l_id
1986
1987 dist_udevrules_DATA += \
1988         rules/60-persistent-v4l.rules
1989
1990 # ------------------------------------------------------------------------------
1991 accelerometer_SOURCES = \
1992         src/udev/accelerometer/accelerometer.c
1993
1994 accelerometer_LDADD = \
1995         libudev.la -lm \
1996         libsystemd-shared.la
1997
1998 udevlibexec_PROGRAMS += \
1999         accelerometer
2000
2001 dist_udevrules_DATA += \
2002         rules/61-accelerometer.rules
2003
2004 # ------------------------------------------------------------------------------
2005 if ENABLE_GUDEV
2006 if ENABLE_GTK_DOC
2007 SUBDIRS += \
2008         docs/gudev
2009 endif
2010
2011 libgudev_includedir = \
2012         $(includedir)/gudev-1.0/gudev
2013
2014 libgudev_include_HEADERS = \
2015         src/gudev/gudev.h \
2016         src/gudev/gudevenums.h \
2017         src/gudev/gudevenumtypes.h \
2018         src/gudev/gudevtypes.h \
2019         src/gudev/gudevclient.h \
2020         src/gudev/gudevdevice.h \
2021         src/gudev/gudevenumerator.h
2022
2023 lib_LTLIBRARIES += libgudev-1.0.la
2024
2025 pkgconfiglib_DATA += \
2026         src/gudev/gudev-1.0.pc
2027
2028 CLEANFILES += \
2029         src/gudev/gudev-1.0.pc
2030
2031 libgudev_1_0_la_SOURCES = \
2032         src/gudev/gudevenums.h \
2033         src/gudev/gudevenumtypes.h \
2034         src/gudev/gudevenumtypes.h\
2035         src/gudev/gudevtypes.h \
2036         src/gudev/gudevclient.h \
2037         src/gudev/gudevclient.c \
2038         src/gudev/gudevdevice.h \
2039         src/gudev/gudevdevice.c \
2040         src/gudev/gudevenumerator.h \
2041         src/gudev/gudevenumerator.c \
2042         src/gudev/gudevprivate.h
2043
2044 nodist_libgudev_1_0_la_SOURCES = \
2045         src/gudev/gudevmarshal.h \
2046         src/gudev/gudevmarshal.c \
2047         src/gudev/gudevenumtypes.h \
2048         src/gudev/gudevenumtypes.c
2049
2050 BUILT_SOURCES += \
2051         $(nodist_libgudev_1_0_la_SOURCES)
2052
2053 libgudev_1_0_la_CPPFLAGS = \
2054         $(AM_CPPFLAGS) \
2055         -I$(top_builddir)/src\
2056         -I$(top_srcdir)/src\
2057         -I$(top_builddir)/src/gudev \
2058         -I$(top_srcdir)/src/gudev \
2059         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
2060         -D_GUDEV_COMPILATION \
2061         -DG_LOG_DOMAIN=\"GUdev\"
2062
2063 libgudev_1_0_la_CFLAGS = \
2064         $(AM_CFLAGS) \
2065         -fvisibility=default \
2066         $(GLIB_CFLAGS)
2067
2068 libgudev_1_0_la_LIBADD = \
2069         libudev.la \
2070         $(GLIB_LIBS)
2071
2072 libgudev_1_0_la_LDFLAGS = \
2073         $(AM_LDFLAGS) \
2074         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
2075         -export-dynamic -no-undefined \
2076         -export-symbols-regex '^g_udev_.*'
2077
2078 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
2079         $(AM_V_at)$(MKDIR_P) $(dir $@)
2080         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
2081
2082 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
2083         $(AM_V_at)$(MKDIR_P) $(dir $@)
2084         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
2085         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
2086
2087 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
2088         $(AM_V_at)$(MKDIR_P) $(dir $@)
2089         $(AM_V_GEN)glib-mkenums --template $^ > $@
2090
2091 if HAVE_INTROSPECTION
2092 -include $(INTROSPECTION_MAKEFILE)
2093
2094 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
2095
2096 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
2097
2098 src_gudev_GUdev_1_0_gir_CFLAGS = \
2099         $(INCLUDES) \
2100         -D_GUDEV_COMPILATION \
2101         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
2102         -I$(top_srcdir)/src \
2103         -I$(top_builddir)/src \
2104         -I$(top_srcdir)/src/gdev \
2105         -I$(top_builddir)/src/gdev
2106
2107 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
2108
2109 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
2110         --pkg-export=gudev-1.0 \
2111         --warn-all
2112
2113 src_gudev_GUdev_1_0_gir_FILES = \
2114         src/gudev/gudev.h \
2115         src/gudev/gudevtypes.h \
2116         src/gudev/gudevenums.h \
2117         src/gudev/gudevenumtypes.h \
2118         src/gudev/gudevclient.h \
2119         src/gudev/gudevdevice.h \
2120         src/gudev/gudevenumerator.h \
2121         src/gudev/gudevclient.c \
2122         src/gudev/gudevdevice.c \
2123         src/gudev/gudevenumerator.c
2124
2125 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
2126 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
2127
2128 girdir = $(datadir)/gir-1.0
2129 gir_DATA = \
2130         src/gudev/GUdev-1.0.gir
2131
2132 typelibsdir = $(libdir)/girepository-1.0
2133 typelibs_DATA = \
2134         src/gudev/GUdev-1.0.typelib
2135
2136 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
2137 endif # HAVE_INTROSPECTION
2138
2139 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2140 libgudev-install-move-hook:
2141         if test "$(libdir)" != "$(rootlibdir)"; then \
2142                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
2143                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libgudev-1.0.so) && \
2144                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
2145                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libgudev-1.0.so && \
2146                 mv $(DESTDIR)$(libdir)/libgudev-1.0.so.* $(DESTDIR)$(rootlibdir); \
2147         fi
2148
2149 libgudev-uninstall-move-hook:
2150         rm -f $(DESTDIR)$(rootlibdir)/libgudev-1.0.so*
2151
2152 INSTALL_EXEC_HOOKS += libgudev-install-move-hook
2153 UNINSTALL_EXEC_HOOKS += libgudev-uninstall-move-hook
2154 endif
2155
2156 EXTRA_DIST += \
2157         src/gudev/gudev-1.0.pc.in \
2158         src/gudev/gudevmarshal.list \
2159         src/gudev/gudevenumtypes.h.template \
2160         src/gudev/gudevenumtypes.c.template \
2161         src/gudev/gjs-example.js \
2162         src/gudev/seed-example-enum.js \
2163         src/gudev/seed-example.js
2164
2165
2166 # ------------------------------------------------------------------------------
2167 if ENABLE_KEYMAP
2168 keymap_SOURCES = \
2169         src/udev/keymap/keymap.c
2170
2171 keymap_CPPFLAGS = \
2172         $(AM_CPPFLAGS) -I src/udev/keymap
2173
2174 keymap_LDADD = \
2175         libsystemd-shared.la
2176
2177 nodist_keymap_SOURCES = \
2178         src/udev/keymap/keys-from-name.h \
2179         src/udev/keymap/keys-to-name.h
2180
2181 BUILT_SOURCES += \
2182         $(nodist_keymap_SOURCES)
2183
2184 udevlibexec_PROGRAMS += \
2185         keymap
2186
2187 dist_doc_DATA += \
2188         src/udev/keymap/README.keymap.txt
2189
2190 dist_udevrules_DATA += \
2191         src/udev/keymap/95-keymap.rules \
2192         src/udev/keymap/95-keyboard-force-release.rules
2193
2194 dist_udevhome_SCRIPTS = \
2195         src/udev/keymap/findkeyboards \
2196         src/udev/keymap/keyboard-force-release.sh
2197
2198 TESTS += \
2199         src/udev/keymap/check-keymaps.sh
2200
2201 CLEANFILES += \
2202         src/udev/keymap/keys.txt \
2203         src/udev/keymap/keys-from-name.gperf \
2204         src/udev/keymap/keyboard-force-release.sh
2205
2206 udevkeymapdir = $(udevlibexecdir)/keymaps
2207 dist_udevkeymap_DATA = \
2208         keymaps/acer \
2209         keymaps/acer-aspire_5720 \
2210         keymaps/acer-aspire_8930 \
2211         keymaps/acer-aspire_5920g \
2212         keymaps/acer-aspire_6920 \
2213         keymaps/acer-travelmate_c300 \
2214         keymaps/asus \
2215         keymaps/compaq-e_evo \
2216         keymaps/dell \
2217         keymaps/dell-latitude-xt2 \
2218         keymaps/everex-xt5000 \
2219         keymaps/fujitsu-amilo_li_2732 \
2220         keymaps/fujitsu-amilo_pa_2548 \
2221         keymaps/fujitsu-amilo_pro_edition_v3505 \
2222         keymaps/fujitsu-amilo_pro_v3205 \
2223         keymaps/fujitsu-amilo_si_1520 \
2224         keymaps/fujitsu-esprimo_mobile_v5 \
2225         keymaps/fujitsu-esprimo_mobile_v6 \
2226         keymaps/genius-slimstar-320 \
2227         keymaps/hewlett-packard \
2228         keymaps/hewlett-packard-2510p_2530p \
2229         keymaps/hewlett-packard-compaq_elitebook \
2230         keymaps/hewlett-packard-pavilion \
2231         keymaps/hewlett-packard-presario-2100 \
2232         keymaps/hewlett-packard-tablet \
2233         keymaps/hewlett-packard-tx2 \
2234         keymaps/ibm-thinkpad-usb-keyboard-trackpoint \
2235         keymaps/inventec-symphony_6.0_7.0 \
2236         keymaps/lenovo-3000 \
2237         keymaps/lenovo-ideapad \
2238         keymaps/lenovo-thinkpad-usb-keyboard-trackpoint \
2239         keymaps/lenovo-thinkpad_x6_tablet \
2240         keymaps/lenovo-thinkpad_x200_tablet \
2241         keymaps/lg-x110 \
2242         keymaps/logitech-wave \
2243         keymaps/logitech-wave-cordless \
2244         keymaps/logitech-wave-pro-cordless \
2245         keymaps/maxdata-pro_7000 \
2246         keymaps/medion-fid2060 \
2247         keymaps/medionnb-a555 \
2248         keymaps/micro-star \
2249         keymaps/module-asus-w3j \
2250         keymaps/module-ibm \
2251         keymaps/module-lenovo \
2252         keymaps/module-sony \
2253         keymaps/module-sony-old \
2254         keymaps/module-sony-vgn \
2255         keymaps/module-sony-vpc \
2256         keymaps/olpc-xo \
2257         keymaps/onkyo \
2258         keymaps/oqo-model2 \
2259         keymaps/samsung-other \
2260         keymaps/samsung-90x3a \
2261         keymaps/samsung-sq1us \
2262         keymaps/samsung-sx20s \
2263         keymaps/toshiba-satellite_a100 \
2264         keymaps/toshiba-satellite_a110 \
2265         keymaps/toshiba-satellite_m30x \
2266         keymaps/zepto-znote
2267
2268 udevkeymapforcereldir = $(udevlibexecdir)/keymaps/force-release
2269 dist_udevkeymapforcerel_DATA = \
2270         keymaps-force-release/dell-touchpad \
2271         keymaps-force-release/dell-xps \
2272         keymaps-force-release/hp-other \
2273         keymaps-force-release/samsung-other \
2274         keymaps-force-release/samsung-90x3a \
2275         keymaps-force-release/common-volume-keys
2276
2277 src/udev/keymap/keys.txt: Makefile
2278         $(AM_V_at)$(MKDIR_P) $(dir $@)
2279         $(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/' > $@
2280
2281 src/udev/keymap/keys-from-name.gperf: src/udev/keymap/keys.txt Makefile
2282         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@
2283
2284 src/udev/keymap/keys-from-name.h: src/udev/keymap/keys-from-name.gperf Makefile
2285         $(AM_V_GEN)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C < $< > $@
2286
2287 src/udev/keymap/keys-to-name.h: src/udev/keymap/keys.txt Makefile
2288         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
2289 endif
2290
2291 EXTRA_DIST += \
2292         src/udev/keymap/check-keymaps.sh \
2293         src/udev/keymap/keyboard-force-release.sh.in
2294
2295 # ------------------------------------------------------------------------------
2296 mtd_probe_SOURCES =  \
2297         src/udev/mtd_probe/mtd_probe.c \
2298         src/udev/mtd_probe/mtd_probe.h \
2299         src/udev/mtd_probe/probe_smartmedia.c
2300
2301 mtd_probe_CPPFLAGS = \
2302         $(AM_CPPFLAGS)
2303
2304 dist_udevrules_DATA += \
2305         rules/75-probe_mtd.rules
2306
2307 udevlibexec_PROGRAMS += \
2308         mtd_probe
2309
2310 # ------------------------------------------------------------------------------
2311 libsystemd_id128_la_SOURCES = \
2312         src/libsystemd-id128/sd-id128.c
2313
2314 libsystemd_id128_la_CFLAGS = \
2315         $(AM_CFLAGS) \
2316         -fvisibility=hidden
2317
2318 libsystemd_id128_la_LDFLAGS = \
2319         $(AM_LDFLAGS) \
2320         -shared \
2321         -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
2322         -Wl,--version-script=$(top_srcdir)/src/libsystemd-id128/libsystemd-id128.sym
2323
2324 libsystemd_id128_la_LIBADD = \
2325         libsystemd-shared.la
2326
2327 libsystemd_id128_internal_la_SOURCES = \
2328         $(libsystemd_id128_la_SOURCES)
2329
2330 test_id128_SOURCES = \
2331         src/test/test-id128.c
2332
2333 test_id128_LDADD = \
2334         libsystemd-shared.la \
2335         libsystemd-id128-internal.la
2336
2337 noinst_PROGRAMS += \
2338         test-id128
2339
2340 TESTS += \
2341         test-id128
2342
2343 pkginclude_HEADERS += \
2344         src/systemd/sd-id128.h
2345
2346 lib_LTLIBRARIES += \
2347         libsystemd-id128.la
2348
2349 noinst_LTLIBRARIES += \
2350         libsystemd-id128-internal.la
2351
2352 pkgconfiglib_DATA += \
2353         src/libsystemd-id128/libsystemd-id128.pc
2354
2355 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2356 libsystemd-id128-install-hook:
2357         if test "$(libdir)" != "$(rootlibdir)"; then \
2358                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
2359                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-id128.so) && \
2360                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
2361                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-id128.so && \
2362                 mv $(DESTDIR)$(libdir)/libsystemd-id128.so.* $(DESTDIR)$(rootlibdir); \
2363         fi
2364
2365 INSTALL_EXEC_HOOKS += \
2366         libsystemd-id128-install-hook
2367
2368 libsystemd-id128-uninstall-hook:
2369         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
2370
2371 UNINSTALL_EXEC_HOOKS += \
2372         libsystemd-id128-uninstall-hook
2373
2374 EXTRA_DIST += \
2375         src/libsystemd-id128/libsystemd-id128.pc.in \
2376         src/libsystemd-id128/libsystemd-id128.sym
2377
2378 # ------------------------------------------------------------------------------
2379 systemd_journald_SOURCES = \
2380         src/journal/journald.c \
2381         src/journal/journald.h \
2382         src/journal/journald-kmsg.c \
2383         src/journal/journald-kmsg.h \
2384         src/journal/journald-syslog.c \
2385         src/journal/journald-syslog.h \
2386         src/journal/journald-stream.c \
2387         src/journal/journald-stream.h \
2388         src/journal/journald-console.c \
2389         src/journal/journald-console.h \
2390         src/journal/journald-native.c \
2391         src/journal/journald-native.h \
2392         src/journal/journald-rate-limit.c \
2393         src/journal/journald-rate-limit.h \
2394         src/journal/journal-internal.h
2395
2396 nodist_systemd_journald_SOURCES = \
2397         src/journal/journald-gperf.c
2398
2399 systemd_journald_LDADD = \
2400         libsystemd-label.la \
2401         libsystemd-shared.la \
2402         libsystemd-audit.la \
2403         libsystemd-daemon.la \
2404         libsystemd-id128-internal.la \
2405         libsystemd-journal-internal.la \
2406         libudev.la
2407
2408 if ENABLE_LOGIND
2409 systemd_journald_LDADD += \
2410         libsystemd-login-internal.la
2411 endif
2412
2413 if HAVE_ACL
2414 systemd_journald_LDADD += \
2415         libsystemd-acl.la
2416 endif
2417
2418 systemd_cat_SOURCES = \
2419         src/journal/cat.c
2420
2421 systemd_cat_LDADD = \
2422         libsystemd-shared.la \
2423         libsystemd-journal-internal.la
2424
2425 journalctl_SOURCES = \
2426         src/journal/journalctl.c
2427
2428 journalctl_CFLAGS = \
2429         $(AM_CFLAGS)
2430
2431 journalctl_LDADD = \
2432         libsystemd-shared.la \
2433         libsystemd-journal-internal.la \
2434         libsystemd-id128-internal.la \
2435         libsystemd-logs.la
2436
2437 if HAVE_QRENCODE
2438 journalctl_SOURCES += \
2439         src/journal/journal-qrcode.c \
2440         src/journal/journal-qrcode.h
2441
2442 journalctl_CFLAGS += \
2443         $(QRENCODE_CFLAGS)
2444
2445 journalctl_LDADD += \
2446         $(QRENCODE_LIBS)
2447 endif
2448
2449 test_journal_SOURCES = \
2450         src/journal/test-journal.c
2451
2452 test_journal_LDADD = \
2453         libsystemd-shared.la \
2454         libsystemd-journal-internal.la \
2455         libsystemd-id128-internal.la
2456
2457 test_journal_send_SOURCES = \
2458         src/journal/test-journal-send.c
2459
2460 test_journal_send_LDADD = \
2461         libsystemd-shared.la \
2462         libsystemd-journal-internal.la \
2463         libsystemd-id128-internal.la
2464
2465 test_journal_syslog_SOURCES = \
2466         src/journal/test-journal-syslog.c \
2467         src/journal/journald-syslog.c
2468
2469 test_journal_syslog_LDADD = \
2470         libsystemd-shared.la \
2471         libsystemd-journal-internal.la \
2472         libsystemd-id128-internal.la
2473
2474 test_journal_match_SOURCES = \
2475         src/journal/test-journal-match.c
2476
2477 test_journal_match_LDADD = \
2478         libsystemd-shared.la \
2479         libsystemd-journal-internal.la \
2480         libsystemd-id128-internal.la
2481
2482 test_journal_stream_SOURCES = \
2483         src/journal/test-journal-stream.c
2484
2485 test_journal_stream_LDADD = \
2486         libsystemd-shared.la \
2487         libsystemd-journal-internal.la \
2488         libsystemd-id128-internal.la
2489
2490 test_journal_verify_SOURCES = \
2491         src/journal/test-journal-verify.c
2492
2493 test_journal_verify_LDADD = \
2494         libsystemd-shared.la \
2495         libsystemd-journal-internal.la \
2496         libsystemd-id128-internal.la
2497
2498 test_mmap_cache_SOURCES = \
2499         src/journal/test-mmap-cache.c
2500
2501 test_mmap_cache_LDADD = \
2502         libsystemd-shared.la \
2503         libsystemd-journal-internal.la
2504
2505 libsystemd_journal_la_SOURCES = \
2506         src/journal/sd-journal.c \
2507         src/systemd/sd-journal.h \
2508         src/journal/journal-file.c \
2509         src/journal/journal-file.h \
2510         src/journal/journal-vacuum.c \
2511         src/journal/journal-vacuum.h \
2512         src/journal/journal-verify.c \
2513         src/journal/journal-verify.h \
2514         src/journal/lookup3.c \
2515         src/journal/lookup3.h \
2516         src/journal/journal-send.c \
2517         src/journal/sparse-endian.h \
2518         src/journal/journal-def.h \
2519         src/journal/compress.h \
2520         src/journal/mmap-cache.c \
2521         src/journal/mmap-cache.h
2522
2523 libsystemd_journal_la_CFLAGS = \
2524         $(AM_CFLAGS) \
2525         -fvisibility=hidden
2526
2527 libsystemd_journal_la_LDFLAGS = \
2528         $(AM_LDFLAGS) \
2529         -shared \
2530         -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
2531         -Wl,--version-script=$(top_srcdir)/src/journal/libsystemd-journal.sym
2532
2533 libsystemd_journal_la_LIBADD = \
2534         libsystemd-shared.la \
2535         libsystemd-id128-internal.la
2536
2537 libsystemd_journal_internal_la_SOURCES = \
2538         $(libsystemd_journal_la_SOURCES)
2539
2540 libsystemd_journal_internal_la_CFLAGS = \
2541         $(AM_CFLAGS)
2542
2543 libsystemd_journal_internal_la_LIBADD =
2544
2545 if HAVE_XZ
2546 libsystemd_journal_la_SOURCES += \
2547         src/journal/compress.c
2548
2549 libsystemd_journal_la_CFLAGS += \
2550         $(XZ_CFLAGS)
2551
2552 libsystemd_journal_la_LIBADD += \
2553         $(XZ_LIBS)
2554
2555 libsystemd_journal_internal_la_CFLAGS += \
2556         $(XZ_CFLAGS)
2557
2558 libsystemd_journal_internal_la_LIBADD += \
2559         $(XZ_LIBS)
2560
2561 endif
2562
2563 if HAVE_GCRYPT
2564 libsystemd_journal_la_SOURCES += \
2565         src/journal/journal-authenticate.c \
2566         src/journal/journal-authenticate.h \
2567         src/journal/fsprg.c \
2568         src/journal/fsprg.h
2569
2570 libsystemd_journal_la_CFLAGS += \
2571         $(GCRYPT_CFLAGS) \
2572         -Wno-pointer-arith
2573
2574 libsystemd_journal_la_LIBADD += \
2575         $(GCRYPT_LIBS)
2576
2577 libsystemd_journal_internal_la_CFLAGS += \
2578         $(GCRYPT_CFLAGS) \
2579         -Wno-pointer-arith
2580
2581 libsystemd_journal_internal_la_LIBADD += \
2582         $(GCRYPT_LIBS)
2583 endif
2584
2585 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2586 libsystemd-journal-install-hook:
2587         if test "$(libdir)" != "$(rootlibdir)"; then \
2588                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
2589                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-journal.so) && \
2590                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
2591                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-journal.so && \
2592                 mv $(DESTDIR)$(libdir)/libsystemd-journal.so.* $(DESTDIR)$(rootlibdir); \
2593         fi
2594
2595 INSTALL_EXEC_HOOKS += \
2596         libsystemd-journal-install-hook
2597
2598 libsystemd-journal-uninstall-hook:
2599         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
2600
2601 UNINSTALL_EXEC_HOOKS += \
2602         libsystemd-journal-uninstall-hook
2603
2604 noinst_PROGRAMS += \
2605         test-journal \
2606         test-journal-send \
2607         test-journal-syslog \
2608         test-journal-match \
2609         test-journal-stream \
2610         test-journal-verify \
2611         test-mmap-cache
2612
2613 TESTS += \
2614         test-journal \
2615         test-journal-send \
2616         test-journal-syslog \
2617         test-journal-match \
2618         test-journal-stream \
2619         test-journal-verify \
2620         test-mmap-cache
2621
2622 pkginclude_HEADERS += \
2623         src/systemd/sd-journal.h \
2624         src/systemd/sd-messages.h
2625
2626 lib_LTLIBRARIES += \
2627         libsystemd-journal.la
2628
2629 noinst_LTLIBRARIES += \
2630         libsystemd-journal-internal.la
2631
2632 rootlibexec_PROGRAMS += \
2633         systemd-journald
2634
2635 rootbin_PROGRAMS += \
2636         journalctl
2637
2638 bin_PROGRAMS += \
2639         systemd-cat
2640
2641 dist_systemunit_DATA += \
2642         units/systemd-journald.socket
2643
2644 nodist_systemunit_DATA += \
2645         units/systemd-journald.service \
2646         units/systemd-journal-flush.service
2647
2648 dist_pkgsysconf_DATA += \
2649         src/journal/journald.conf
2650
2651 pkgconfiglib_DATA += \
2652         src/journal/libsystemd-journal.pc
2653
2654 journal-install-data-hook:
2655         $(MKDIR_P) -m 0755 \
2656                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
2657                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
2658         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
2659                 rm -f systemd-journald.socket && \
2660                 $(LN_S) ../systemd-journald.socket )
2661         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2662                 rm -f systemd-journald.service systemd-journal-flush.service && \
2663                 $(LN_S) ../systemd-journald.service && \
2664                 $(LN_S) ../systemd-journal-flush.service )
2665
2666 INSTALL_DATA_HOOKS += \
2667         journal-install-data-hook
2668
2669 EXTRA_DIST += \
2670         src/journal/libsystemd-journal.pc.in \
2671         src/journal/libsystemd-journal.sym \
2672         units/systemd-journald.service.in \
2673         units/systemd-journal-flush.service.in \
2674         src/journal/journald-gperf.gperf
2675
2676 CLEANFILES += \
2677         src/journal/journald-gperf.c
2678
2679 if HAVE_MICROHTTPD
2680
2681 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
2682
2683 rootlibexec_PROGRAMS += \
2684         systemd-journal-gatewayd
2685
2686 systemd_journal_gatewayd_SOURCES = \
2687         src/journal/journal-gatewayd.c
2688
2689 systemd_journal_gatewayd_LDADD = \
2690         libsystemd-shared.la \
2691         libsystemd-logs.la \
2692         libsystemd-journal-internal.la \
2693         libsystemd-id128-internal.la \
2694         libsystemd-daemon.la \
2695         $(MICROHTTPD_LIBS)
2696
2697 systemd_journal_gatewayd_CFLAGS = \
2698         -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\" \
2699         $(AM_CFLAGS) \
2700         $(MICROHTTPD_CFLAGS)
2701
2702 dist_systemunit_DATA += \
2703         units/systemd-journal-gatewayd.socket
2704
2705 nodist_systemunit_DATA += \
2706         units/systemd-journal-gatewayd.service
2707
2708 dist_gatewayddocumentroot_DATA = \
2709         src/journal/browse.html
2710
2711 endif
2712
2713 EXTRA_DIST += \
2714         units/systemd-journal-gatewayd.service.in
2715
2716 # ------------------------------------------------------------------------------
2717 if ENABLE_COREDUMP
2718 systemd_coredump_SOURCES = \
2719         src/journal/coredump.c
2720
2721 systemd_coredump_LDADD = \
2722         libsystemd-journal-internal.la \
2723         libsystemd-label.la \
2724         libsystemd-shared.la
2725
2726 if ENABLE_LOGIND
2727 systemd_coredump_LDADD += \
2728         libsystemd-login-internal.la
2729 endif
2730
2731 rootlibexec_PROGRAMS += \
2732         systemd-coredump
2733
2734 sysctl_DATA = \
2735         sysctl.d/coredump.conf
2736
2737 CLEANFILES += \
2738         sysctl.d/coredump.conf
2739 endif
2740
2741 EXTRA_DIST += \
2742         sysctl.d/coredump.conf.in
2743
2744 # ------------------------------------------------------------------------------
2745 if ENABLE_BINFMT
2746 systemd_binfmt_SOURCES = \
2747         src/binfmt/binfmt.c
2748
2749 systemd_binfmt_LDADD = \
2750         libsystemd-shared.la
2751
2752 rootlibexec_PROGRAMS += \
2753         systemd-binfmt
2754
2755 dist_systemunit_DATA += \
2756         units/proc-sys-fs-binfmt_misc.automount \
2757         units/proc-sys-fs-binfmt_misc.mount
2758
2759 nodist_systemunit_DATA += \
2760         units/systemd-binfmt.service
2761
2762 binfmt-install-data-hook:
2763         $(MKDIR_P) -m 0755 \
2764                 $(DESTDIR)$(prefix)/lib/binfmt.d \
2765                 $(DESTDIR)$(sysconfdir)/binfmt.d \
2766                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
2767         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2768                 rm -f systemd-binfmt.service \
2769                         proc-sys-fs-binfmt_misc.automount && \
2770                 $(LN_S) ../systemd-binfmt.service systemd-binfmt.service && \
2771                 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount )
2772
2773 INSTALL_DATA_HOOKS += \
2774         binfmt-install-data-hook
2775
2776 MANPAGES += \
2777         man/binfmt.d.5 \
2778         man/systemd-binfmt.service.8
2779
2780 MANPAGES_ALIAS +=  \
2781         man/systemd-binfmt.8
2782
2783 man/systemd-binfmt.8: man/systemd-binfmt.service.8
2784 endif
2785
2786 EXTRA_DIST += \
2787         units/systemd-binfmt.service.in
2788
2789 # ------------------------------------------------------------------------------
2790 if ENABLE_VCONSOLE
2791 systemd_vconsole_setup_SOURCES = \
2792         src/vconsole/vconsole-setup.c
2793
2794 systemd_vconsole_setup_LDADD = \
2795         libsystemd-shared.la
2796
2797 rootlibexec_PROGRAMS += \
2798         systemd-vconsole-setup
2799
2800 nodist_systemunit_DATA += \
2801         units/systemd-vconsole-setup.service
2802
2803 vconsole-install-data-hook:
2804         $(MKDIR_P) -m 0755 \
2805                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
2806         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2807                 rm -f systemd-vconsole-setup.service && \
2808                 $(LN_S) ../systemd-vconsole-setup.service systemd-vconsole-setup.service )
2809
2810 INSTALL_DATA_HOOKS += \
2811         vconsole-install-data-hook
2812
2813 MANPAGES += \
2814         man/vconsole.conf.5 \
2815         man/systemd-vconsole-setup.service.8
2816
2817 MANPAGES_ALIAS += \
2818         man/systemd-vconsole-setup.8
2819
2820 man/systemd-vconsole-setup.8: man/systemd-vconsole-setup.service.8
2821 endif
2822
2823 EXTRA_DIST += \
2824         units/systemd-vconsole-setup.service.in
2825
2826 # ------------------------------------------------------------------------------
2827 if ENABLE_READAHEAD
2828 systemd_readahead_SOURCES = \
2829         src/readahead/readahead.c \
2830         src/readahead/readahead-collect.c \
2831         src/readahead/readahead-replay.c \
2832         src/readahead/readahead-analyze.c \
2833         src/readahead/readahead-common.c \
2834         src/readahead/readahead-common.h
2835
2836 systemd_readahead_LDADD = \
2837         libsystemd-shared.la \
2838         libsystemd-daemon.la \
2839         libudev.la
2840
2841 dist_doc_DATA += \
2842         src/readahead/sd-readahead.c \
2843         src/systemd/sd-readahead.h
2844
2845 rootlibexec_PROGRAMS += \
2846         systemd-readahead
2847
2848 dist_systemunit_DATA += \
2849         units/systemd-readahead-drop.service \
2850         units/systemd-readahead-done.timer
2851
2852 nodist_systemunit_DATA += \
2853         units/systemd-readahead-collect.service \
2854         units/systemd-readahead-replay.service \
2855         units/systemd-readahead-done.service
2856
2857 MANPAGES += \
2858         man/sd_readahead.3 \
2859         man/sd-readahead.3 \
2860         man/systemd-readahead-replay.service.8
2861
2862 MANPAGES_ALIAS += \
2863         man/systemd-readahead-collect.service.8 \
2864         man/systemd-readahead-done.service.8 \
2865         man/systemd-readahead-done.timer.8 \
2866         man/systemd-readahead.8
2867
2868 man/systemd-readahead-collect.service.8: man/systemd-readahead-replay.service.8
2869 man/systemd-readahead-done.service.8: man/systemd-readahead-replay.service.8
2870 man/systemd-readahead-done.timer.8: man/systemd-readahead-replay.service.8
2871 man/systemd-readahead.8: man/systemd-readahead-replay.service.8
2872
2873 endif
2874
2875 EXTRA_DIST += \
2876         units/systemd-readahead-collect.service.in \
2877         units/systemd-readahead-replay.service.in \
2878         units/systemd-readahead-done.service.in
2879
2880 # ------------------------------------------------------------------------------
2881 if ENABLE_QUOTACHECK
2882 rootlibexec_PROGRAMS += \
2883         systemd-quotacheck
2884
2885 nodist_systemunit_DATA += \
2886         units/systemd-quotacheck.service
2887
2888 systemd_quotacheck_SOURCES = \
2889         src/quotacheck/quotacheck.c
2890
2891 systemd_quotacheck_LDADD = \
2892         libsystemd-shared.la
2893
2894 MANPAGES += \
2895         man/systemd-quotacheck.service.8
2896
2897 MANPAGES_ALIAS += \
2898         man/systemd-quotacheck.8
2899
2900 man/systemd-quotacheck.8: man/systemd-quotacheck.service.8
2901
2902 endif
2903
2904 EXTRA_DIST += \
2905         units/systemd-quotacheck.service.in
2906
2907 nodist_systemunit_DATA += \
2908         units/quotaon.service
2909
2910 # ------------------------------------------------------------------------------
2911 if ENABLE_RANDOMSEED
2912 rootlibexec_PROGRAMS += \
2913         systemd-random-seed
2914
2915 nodist_systemunit_DATA += \
2916         units/systemd-random-seed-save.service \
2917         units/systemd-random-seed-load.service
2918
2919 systemd_random_seed_SOURCES = \
2920         src/random-seed/random-seed.c
2921
2922 systemd_random_seed_LDADD = \
2923         libsystemd-label.la \
2924         libsystemd-shared.la
2925
2926 randomseed-install-data-hook:
2927         $(MKDIR_P) -m 0755 \
2928                 $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
2929                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
2930         ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
2931                 rm -f systemd-random-seed-save.service && \
2932                 $(LN_S) ../systemd-random-seed-save.service systemd-random-seed-save.service )
2933         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2934                 rm -f systemd-random-seed-load.service && \
2935                 $(LN_S) ../systemd-random-seed-load.service systemd-random-seed-load.service )
2936
2937 INSTALL_DATA_HOOKS += \
2938         randomseed-install-data-hook
2939
2940 MANPAGES += \
2941         man/systemd-random-seed-load.service.8
2942
2943 MANPAGES_ALIAS +=  \
2944         man/systemd-random-seed-save.service.8 \
2945         man/systemd-random-seed.8
2946
2947 man/systemd-random-seed-save.service.8: man/systemd-random-seed-load.service.8
2948 man/systemd-random-seed.8: man/systemd-random-seed-load.service.8
2949
2950 endif
2951
2952 EXTRA_DIST += \
2953         units/systemd-random-seed-save.service.in \
2954         units/systemd-random-seed-load.service.in
2955
2956 # ------------------------------------------------------------------------------
2957 if HAVE_LIBCRYPTSETUP
2958 rootlibexec_PROGRAMS += \
2959         systemd-cryptsetup
2960
2961 systemgenerator_PROGRAMS += \
2962         systemd-cryptsetup-generator
2963
2964 dist_systemunit_DATA += \
2965         units/cryptsetup.target
2966
2967 systemd_cryptsetup_SOURCES = \
2968         src/cryptsetup/cryptsetup.c
2969
2970 systemd_cryptsetup_CFLAGS = \
2971         $(AM_CFLAGS) \
2972         $(LIBCRYPTSETUP_CFLAGS)
2973
2974 systemd_cryptsetup_LDADD = \
2975         libsystemd-label.la \
2976         libsystemd-shared.la \
2977         libudev.la \
2978         $(LIBCRYPTSETUP_LIBS)
2979
2980 systemd_cryptsetup_generator_SOURCES = \
2981         src/cryptsetup/cryptsetup-generator.c
2982
2983 systemd_cryptsetup_generator_LDADD = \
2984         libsystemd-label.la \
2985         libsystemd-shared.la
2986
2987 cryptsetup-install-data-hook:
2988         $(MKDIR_P) -m 0755 \
2989                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
2990         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2991                 rm -f cryptsetup.target && \
2992                 $(LN_S) ../cryptsetup.target cryptsetup.target )
2993
2994 INSTALL_DATA_HOOKS += \
2995         cryptsetup-install-data-hook
2996
2997 MANPAGES += \
2998         man/systemd-cryptsetup@.service.8 \
2999         man/systemd-cryptsetup-generator.8 \
3000         man/crypttab.5
3001
3002 MANPAGES_ALIAS += \
3003         man/systemd-cryptsetup.8
3004
3005 man/systemd-cryptsetup.8: man/systemd-cryptsetup@.service.8
3006
3007 endif
3008
3009 # ------------------------------------------------------------------------------
3010 if ENABLE_HOSTNAMED
3011 systemd_hostnamed_SOURCES = \
3012         src/hostname/hostnamed.c
3013
3014 systemd_hostnamed_CFLAGS = \
3015         $(AM_CFLAGS) \
3016         $(DBUS_CFLAGS)
3017
3018 systemd_hostnamed_LDADD = \
3019         libsystemd-shared.la \
3020         libsystemd-daemon.la \
3021         libsystemd-dbus.la
3022
3023 rootlibexec_PROGRAMS += \
3024         systemd-hostnamed
3025
3026 nodist_systemunit_DATA += \
3027         units/systemd-hostnamed.service
3028
3029 dist_dbuspolicy_DATA += \
3030         src/hostname/org.freedesktop.hostname1.conf
3031
3032 dist_dbussystemservice_DATA += \
3033         src/hostname/org.freedesktop.hostname1.service
3034
3035 polkitpolicy_files += \
3036         src/hostname/org.freedesktop.hostname1.policy
3037
3038 dbusinterface_DATA += \
3039         org.freedesktop.hostname1.xml
3040
3041 org.freedesktop.hostname1.xml: systemd-hostnamed
3042         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.hostname1 $< $@.tmp && \
3043                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
3044                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
3045
3046 hostnamed-install-data-hook:
3047         ( cd $(DESTDIR)$(systemunitdir) && \
3048                 rm -f dbus-org.freedesktop.hostname1.service && \
3049                 $(LN_S) systemd-hostnamed.service dbus-org.freedesktop.hostname1.service )
3050
3051 INSTALL_DATA_HOOKS += \
3052         hostnamed-install-data-hook
3053
3054 MANPAGES += \
3055         man/systemd-hostnamed.service.8
3056
3057 MANPAGES_ALIAS += \
3058         man/systemd-hostnamed.8
3059
3060 man/systemd-hostnamed.8: man/systemd-hostnamed.service.8
3061 endif
3062
3063 polkitpolicy_in_files += \
3064         src/hostname/org.freedesktop.hostname1.policy.in
3065
3066 EXTRA_DIST += \
3067         units/systemd-hostnamed.service.in
3068
3069 # ------------------------------------------------------------------------------
3070 if ENABLE_LOCALED
3071 systemd_localed_SOURCES = \
3072         src/locale/localed.c
3073
3074 systemd_localed_CFLAGS = \
3075         $(AM_CFLAGS) \
3076         $(DBUS_CFLAGS)
3077
3078 systemd_localed_LDADD = \
3079         libsystemd-label.la \
3080         libsystemd-shared.la \
3081         libsystemd-daemon.la \
3082         libsystemd-dbus.la
3083
3084 nodist_systemunit_DATA += \
3085         units/systemd-localed.service
3086
3087 rootlibexec_PROGRAMS += \
3088         systemd-localed
3089
3090 dist_dbuspolicy_DATA += \
3091         src/locale/org.freedesktop.locale1.conf
3092
3093 dist_dbussystemservice_DATA += \
3094         src/locale/org.freedesktop.locale1.service
3095
3096 polkitpolicy_files += \
3097         src/locale/org.freedesktop.locale1.policy
3098
3099 dbusinterface_DATA += \
3100         org.freedesktop.locale1.xml
3101
3102 org.freedesktop.locale1.xml: systemd-localed
3103         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.locale1 $< $@.tmp && \
3104                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
3105                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
3106
3107 localed-install-data-hook:
3108         ( cd $(DESTDIR)$(systemunitdir) && \
3109                 rm -f dbus-org.freedesktop.locale1.service && \
3110                 $(LN_S) systemd-localed.service dbus-org.freedesktop.locale1.service )
3111
3112 INSTALL_DATA_HOOKS += \
3113         localed-install-data-hook
3114
3115 MANPAGES += \
3116         man/systemd-localed.service.8
3117
3118 MANPAGES_ALIAS += \
3119         man/systemd-localed.8
3120
3121 man/systemd-localed.8: man/systemd-localed.service.8
3122
3123 dist_pkgdata_DATA += \
3124         src/locale/kbd-model-map
3125
3126 dist_noinst_SCRIPT = \
3127         src/locale/generate-kbd-model-map
3128
3129 update-kbd-model-map:
3130         src/locale/generate-kbd-model-map > src/locale/kbd-model-map
3131
3132 endif
3133
3134 polkitpolicy_in_files += \
3135         src/locale/org.freedesktop.locale1.policy.in
3136
3137 EXTRA_DIST += \
3138         units/systemd-localed.service.in
3139
3140 # ------------------------------------------------------------------------------
3141 if ENABLE_TIMEDATED
3142 systemd_timedated_SOURCES = \
3143         src/timedate/timedated.c
3144
3145 systemd_timedated_CFLAGS = \
3146         $(AM_CFLAGS) \
3147         $(DBUS_CFLAGS)
3148
3149 systemd_timedated_LDADD = \
3150         libsystemd-shared.la \
3151         libsystemd-daemon.la \
3152         libsystemd-dbus.la
3153
3154 rootlibexec_PROGRAMS += \
3155         systemd-timedated
3156
3157 dist_dbussystemservice_DATA += \
3158         src/timedate/org.freedesktop.timedate1.service
3159
3160 dist_dbuspolicy_DATA += \
3161         src/timedate/org.freedesktop.timedate1.conf
3162
3163 nodist_systemunit_DATA += \
3164         units/systemd-timedated.service
3165
3166 polkitpolicy_files += \
3167         src/timedate/org.freedesktop.timedate1.policy
3168
3169 org.freedesktop.timedate1.xml: systemd-timedated
3170         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.timedate1 $< $@.tmp && \
3171                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
3172                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
3173
3174 dbusinterface_DATA += \
3175         org.freedesktop.timedate1.xml
3176
3177 timedated-install-data-hook:
3178         $(MKDIR_P) -m 0755 \
3179                 $(DESTDIR)$(prefix)/lib/systemd/ntp-units.d \
3180                 $(DESTDIR)$(sysconfdir)/systemd/ntp-units.d
3181         ( cd $(DESTDIR)$(systemunitdir) && \
3182                 rm -f dbus-org.freedesktop.timedate1.service  && \
3183                 $(LN_S) systemd-timedated.service dbus-org.freedesktop.timedate1.service )
3184
3185 INSTALL_DATA_HOOKS += \
3186         timedated-install-data-hook
3187
3188 MANPAGES += \
3189         man/systemd-timedated.service.8
3190
3191 MANPAGES_ALIAS += \
3192         man/systemd-timedated.8
3193
3194 man/systemd-timedated.8: man/systemd-timedated.service.8
3195 endif
3196
3197 polkitpolicy_in_files += \
3198         src/timedate/org.freedesktop.timedate1.policy.in
3199
3200 EXTRA_DIST += \
3201         units/systemd-timedated.service.in
3202
3203 # ------------------------------------------------------------------------------
3204 if ENABLE_LOGIND
3205 systemd_logind_SOURCES = \
3206         src/login/logind.c \
3207         src/login/logind.h \
3208         src/login/logind-dbus.c \
3209         src/login/logind-device.c \
3210         src/login/logind-device.h \
3211         src/login/logind-button.c \
3212         src/login/logind-button.h \
3213         src/login/logind-seat.c \
3214         src/login/logind-seat.h \
3215         src/login/logind-session.c \
3216         src/login/logind-session.h \
3217         src/login/logind-user.c \
3218         src/login/logind-user.h \
3219         src/login/logind-inhibit.c \
3220         src/login/logind-inhibit.h \
3221         src/login/logind-session-dbus.c \
3222         src/login/logind-seat-dbus.c \
3223         src/login/logind-user-dbus.c \
3224         src/login/logind-acl.h
3225
3226 nodist_systemd_logind_SOURCES = \
3227         src/login/logind-gperf.c
3228
3229 systemd_logind_CFLAGS = \
3230         $(AM_CFLAGS) \
3231         $(DBUS_CFLAGS)
3232
3233 systemd_logind_LDADD = \
3234         libsystemd-label.la \
3235         libsystemd-shared.la \
3236         libsystemd-audit.la \
3237         libsystemd-daemon.la \
3238         libsystemd-dbus.la \
3239         libudev.la
3240
3241 if HAVE_ACL
3242 systemd_logind_SOURCES += \
3243         src/login/logind-acl.c
3244
3245 systemd_logind_LDADD += \
3246         libsystemd-acl.la
3247 endif
3248
3249 systemd_user_sessions_SOURCES = \
3250         src/login/user-sessions.c
3251
3252 systemd_user_sessions_LDADD = \
3253         libsystemd-shared.la
3254
3255 rootlibexec_PROGRAMS += \
3256         systemd-logind \
3257         systemd-user-sessions
3258
3259 loginctl_SOURCES = \
3260         src/login/loginctl.c \
3261         src/login/sysfs-show.c
3262
3263 loginctl_CFLAGS = \
3264         $(AM_CFLAGS) \
3265         $(DBUS_CFLAGS)
3266
3267 loginctl_LDADD = \
3268         libsystemd-shared.la \
3269         libsystemd-dbus.la \
3270         libudev.la
3271
3272 rootbin_PROGRAMS += \
3273         loginctl
3274
3275 systemd_inhibit_SOURCES = \
3276         src/login/inhibit.c
3277
3278 systemd_inhibit_CFLAGS = \
3279         $(AM_CFLAGS) \
3280         $(DBUS_CFLAGS)
3281
3282 systemd_inhibit_LDADD = \
3283         libsystemd-shared.la \
3284         libsystemd-dbus.la
3285
3286 rootbin_PROGRAMS += \
3287         systemd-inhibit
3288
3289 test_login_SOURCES = \
3290         src/login/test-login.c
3291
3292 test_login_LDADD = \
3293         libsystemd-login-internal.la \
3294         libsystemd-shared.la
3295
3296 test_inhibit_SOURCES = \
3297         src/login/test-inhibit.c
3298
3299 test_inhibit_LDADD = \
3300         libsystemd-shared.la \
3301         libsystemd-dbus.la
3302
3303 test_inhibit_CFLAGS = \
3304         $(AM_CFLAGS) \
3305         $(DBUS_CFLAGS)
3306
3307 noinst_PROGRAMS += \
3308         test-login \
3309         test-inhibit
3310
3311 libsystemd_login_la_SOURCES = \
3312         src/login/sd-login.c
3313
3314 libsystemd_login_la_CFLAGS = \
3315         $(AM_CFLAGS) \
3316         -fvisibility=hidden
3317
3318 libsystemd_login_la_LDFLAGS = \
3319         $(AM_LDFLAGS) \
3320         -shared \
3321         -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
3322         -Wl,--version-script=$(top_srcdir)/src/login/libsystemd-login.sym
3323
3324 libsystemd_login_la_LIBADD = \
3325         libsystemd-shared.la
3326
3327 libsystemd_login_internal_la_SOURCES = \
3328         $(libsystemd_login_la_SOURCES)
3329
3330 if HAVE_PAM
3331 pam_systemd_la_SOURCES = \
3332         src/login/pam-module.c
3333
3334 pam_systemd_la_CFLAGS = \
3335         $(AM_CFLAGS) \
3336         $(PAM_CFLAGS) \
3337         $(DBUS_CFLAGS) \
3338         -fvisibility=hidden
3339
3340 pam_systemd_la_LDFLAGS = \
3341         $(AM_LDFLAGS) \
3342         -module \
3343         -export-dynamic \
3344         -avoid-version \
3345         -shared \
3346         -export-symbols-regex '^pam_sm_.*'
3347
3348 pam_systemd_la_LIBADD = \
3349         libsystemd-daemon.la \
3350         libsystemd-audit.la \
3351         libsystemd-dbus.la \
3352         libsystemd-shared.la \
3353         $(PAM_LIBS)
3354
3355 pamlib_LTLIBRARIES = \
3356         pam_systemd.la
3357 endif
3358
3359 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
3360 libsystemd-login-install-hook:
3361         if test "$(libdir)" != "$(rootlibdir)"; then \
3362                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
3363                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-login.so) && \
3364                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
3365                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-login.so && \
3366                 mv $(DESTDIR)$(libdir)/libsystemd-login.so.* $(DESTDIR)$(rootlibdir); \
3367         fi
3368
3369 INSTALL_EXEC_HOOKS += \
3370         libsystemd-login-install-hook
3371
3372 libsystemd-login-uninstall-hook:
3373         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
3374
3375 UNINSTALL_EXEC_HOOKS += \
3376         libsystemd-login-uninstall-hook
3377
3378 nodist_systemunit_DATA += \
3379         units/systemd-logind.service \
3380         units/systemd-user-sessions.service
3381
3382 dist_dbussystemservice_DATA += \
3383         src/login/org.freedesktop.login1.service
3384
3385 dist_dbuspolicy_DATA += \
3386         src/login/org.freedesktop.login1.conf
3387
3388 dist_pkgsysconf_DATA += \
3389         src/login/logind.conf
3390
3391 pkginclude_HEADERS += \
3392         src/systemd/sd-login.h
3393
3394 lib_LTLIBRARIES += \
3395         libsystemd-login.la
3396
3397 noinst_LTLIBRARIES += \
3398         libsystemd-login-internal.la
3399
3400 pkgconfiglib_DATA += \
3401         src/login/libsystemd-login.pc
3402
3403 polkitpolicy_files += \
3404         src/login/org.freedesktop.login1.policy
3405
3406 logind-install-data-hook:
3407         $(MKDIR_P) -m 0755 \
3408                 $(DESTDIR)$(systemunitdir)/multi-user.target.wants \
3409                 $(DESTDIR)$(localstatedir)/lib/systemd
3410         ( cd $(DESTDIR)$(systemunitdir) && \
3411                 rm -f dbus-org.freedesktop.login1.service && \
3412                 $(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service)
3413         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
3414                 rm -f systemd-logind.service systemd-user-sessions.service && \
3415                 $(LN_S) ../systemd-logind.service systemd-logind.service && \
3416                 $(LN_S) ../systemd-user-sessions.service systemd-user-sessions.service )
3417
3418 INSTALL_DATA_HOOKS += \
3419         logind-install-data-hook
3420
3421 systemd_multi_seat_x_SOURCES = \
3422         src/login/multi-seat-x.c
3423
3424 systemd_multi_seat_x_LDADD = \
3425         libsystemd-label.la \
3426         libsystemd-shared.la
3427
3428 rootlibexec_PROGRAMS += \
3429         systemd-multi-seat-x
3430
3431 dist_udevrules_DATA += \
3432         src/login/70-uaccess.rules \
3433         src/login/70-power-switch.rules
3434
3435 nodist_udevrules_DATA += \
3436         src/login/71-seat.rules \
3437         src/login/73-seat-late.rules
3438
3439 MANPAGES += \
3440         man/systemd-logind.service.8 \
3441         man/logind.conf.5 \
3442         man/sd-login.3 \
3443         man/loginctl.1 \
3444         man/sd_login_monitor_new.3 \
3445         man/sd_pid_get_session.3 \
3446         man/sd_uid_get_state.3 \
3447         man/sd_session_is_active.3 \
3448         man/sd_seat_get_active.3 \
3449         man/sd_get_seats.3 \
3450         man/systemd-user-sessions.service.8
3451
3452 MANPAGES_ALIAS += \
3453         man/sd_login_monitor_unref.3 \
3454         man/sd_login_monitor_flush.3 \
3455         man/sd_login_monitor_get_fd.3 \
3456         man/sd_login_monitor.3 \
3457         man/sd_session_get_uid.3 \
3458         man/sd_session_get_seat.3 \
3459         man/sd_session_get_service.3 \
3460         man/sd_session_get_state.3 \
3461         man/sd_session_get_type.3 \
3462         man/sd_session_get_class.3 \
3463         man/sd_session_get_display.3 \
3464         man/sd_pid_get_owner_uid.3 \
3465         man/sd_pid_get_unit.3 \
3466         man/sd_uid_is_on_seat.3 \
3467         man/sd_uid_get_sessions.3 \
3468         man/sd_uid_get_seats.3 \
3469         man/sd_seat_get_sessions.3 \
3470         man/sd_seat_can_multi_session.3 \
3471         man/sd_get_sessions.3 \
3472         man/sd_get_uids.3 \
3473         man/systemd-logind.8 \
3474         man/systemd-user-sessions.8
3475
3476 man/systemd-logind.8: man/systemd-logind.service.8
3477 man/sd_login_monitor_unref.3: man/sd_login_monitor_new.3
3478 man/sd_login_monitor_flush.3: man/sd_login_monitor_new.3
3479 man/sd_login_monitor_get_fd.3: man/sd_login_monitor_new.3
3480 man/sd_login_monitor.3: man/sd_login_monitor_new.3
3481 man/sd_session_get_uid.3: man/sd_session_is_active.3
3482 man/sd_session_get_seat.3: man/sd_session_is_active.3
3483 man/sd_session_get_service.3: man/sd_session_is_active.3
3484 man/sd_session_get_state.3: man/sd_session_is_active.3
3485 man/sd_session_get_type.3: man/sd_session_is_active.3
3486 man/sd_session_get_class.3: man/sd_session_is_active.3
3487 man/sd_session_get_display.3: man/sd_session_is_active.3
3488 man/sd_pid_get_owner_uid.3: man/sd_pid_get_session.3
3489 man/sd_pid_get_unit.3: man/sd_pid_get_session.3
3490 man/sd_uid_is_on_seat.3: man/sd_uid_get_state.3
3491 man/sd_uid_get_sessions.3: man/sd_uid_get_state.3
3492 man/sd_uid_get_seats.3: man/sd_uid_get_state.3
3493 man/sd_seat_get_sessions.3: man/sd_seat_get_active.3
3494 man/sd_seat_can_multi_session.3: man/sd_seat_get_active.3
3495 man/sd_get_sessions.3: man/sd_get_seats.3
3496 man/sd_get_uids.3: man/sd_get_seats.3
3497 man/systemd-user-sessions.8: man/systemd-user-sessions.service.8
3498
3499 CLEANFILES += \
3500         src/login/logind-gperf.c \
3501         src/login/71-seat.rules \
3502         src/login/73-seat-late.rules
3503 endif
3504
3505 polkitpolicy_in_files += \
3506         src/login/org.freedesktop.login1.policy.in
3507
3508 EXTRA_DIST += \
3509         src/login/logind-gperf.gperf \
3510         src/login/libsystemd-login.pc.in \
3511         src/login/libsystemd-login.sym \
3512         src/login/71-seat.rules.in \
3513         src/login/73-seat-late.rules.in \
3514         units/systemd-logind.service.in \
3515         units/systemd-user-sessions.service.in
3516
3517 # ------------------------------------------------------------------------------
3518
3519 if HAVE_PYTHON_DEVEL
3520
3521 pkgpyexec_LTLIBRARIES = \
3522         _journal.la
3523
3524 _journal_la_SOURCES = \
3525         src/python-systemd/_journal.c
3526
3527 _journal_la_CFLAGS = \
3528         $(AM_CFLAGS) \
3529         -fvisibility=default \
3530         $(PYTHON_CFLAGS)
3531
3532 _journal_la_LDFLAGS = \
3533         $(AM_LDFLAGS) \
3534         -shared \
3535         -module \
3536         -avoid-version
3537
3538 _journal_la_LIBADD = \
3539         $(PYTHON_LIBS) \
3540         libsystemd-journal.la
3541
3542 dist_pkgpyexec_PYTHON = \
3543         src/python-systemd/journal.py \
3544         src/python-systemd/__init__.py
3545
3546 endif
3547
3548 # ------------------------------------------------------------------------------
3549
3550 SED_PROCESS = \
3551         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
3552         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
3553                 -e 's,@rootbindir\@,$(rootbindir),g' \
3554                 -e 's,@bindir\@,$(bindir),g' \
3555                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
3556                 -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
3557                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
3558                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
3559                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
3560                 -e 's,@userunitdir\@,$(userunitdir),g' \
3561                 -e 's,@systempresetdir\@,$(systempresetdir),g' \
3562                 -e 's,@userpresetdir\@,$(userpresetdir),g' \
3563                 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
3564                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
3565                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
3566                 -e 's,@RANDOM_SEED\@,$(localstatedir)/lib/random-seed,g' \
3567                 -e 's,@prefix\@,$(prefix),g' \
3568                 -e 's,@exec_prefix\@,$(exec_prefix),g' \
3569                 -e 's,@libdir\@,$(libdir),g' \
3570                 -e 's,@includedir\@,$(includedir),g' \
3571                 -e 's,@VERSION\@,$(VERSION),g' \
3572                 -e 's,@rootprefix\@,$(rootprefix),g' \
3573                 -e 's,@udevlibexecdir\@,$(udevlibexecdir),g' \
3574                 -e 's,@sushell\@,$(sushell),g' \
3575                 -e 's,@QUOTAON\@,$(QUOTAON),g' \
3576                 -e 's,@QUOTACHECK\@,$(QUOTACHECK),g' \
3577                 < $< > $@
3578
3579 units/%: units/%.in Makefile
3580         $(SED_PROCESS)
3581
3582 man/%: man/%.in Makefile
3583         $(SED_PROCESS)
3584
3585 sysctl.d/%: sysctl.d/%.in Makefile
3586         $(SED_PROCESS)
3587
3588 %.pc: %.pc.in Makefile
3589         $(SED_PROCESS)
3590
3591 src/core/macros.%: src/core/macros.%.in Makefile
3592         $(SED_PROCESS)
3593
3594 src/%.policy.in: src/%.policy.in.in Makefile
3595         $(SED_PROCESS)
3596
3597 %.rules: %.rules.in Makefile
3598         $(SED_PROCESS)
3599
3600 %.sh: %.sh.in Makefile
3601         $(SED_PROCESS)
3602         $(AM_V_GEN)chmod +x $@
3603
3604 src/%.c: src/%.gperf
3605         $(AM_V_at)$(MKDIR_P) $(dir $@)
3606         $(AM_V_GEN)$(GPERF) < $< > $@
3607
3608 src/%: src/%.m4
3609         $(AM_V_at)$(MKDIR_P) $(dir $@)
3610         $(AM_V_GEN)$(M4) -P $(M4_DEFINES) < $< > $@
3611
3612 M4_PROCESS_SYSTEM = \
3613         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
3614         $(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
3615
3616 M4_PROCESS_USER = \
3617         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
3618         $(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
3619
3620 units/%: units/%.m4 Makefile
3621         $(M4_PROCESS_SYSTEM)
3622
3623 units/user/%: units/%.m4 Makefile
3624         $(M4_PROCESS_USER)
3625
3626 nodist_polkitpolicy_DATA = \
3627         $(polkitpolicy_files) \
3628         $(polkitpolicy_in_in_files:.policy.in.in=.policy)
3629
3630 EXTRA_DIST += \
3631         $(polkitpolicy_in_files) \
3632         $(polkitpolicy_in_in_files)
3633
3634 CLEANFILES += \
3635         $(nodist_systemunit_DATA) \
3636         $(nodist_userunit_DATA) \
3637         $(nodist_man_MANS) \
3638         $(pkgconfigdata_DATA) \
3639         $(pkgconfiglib_DATA) \
3640         $(nodist_polkitpolicy_DATA)
3641
3642 if ENABLE_MANPAGES
3643 XSLTPROC_FLAGS = \
3644         --nonet \
3645         --stringparam man.output.quietly 1 \
3646         --stringparam funcsynopsis.style ansi \
3647         --stringparam man.th.extra1.suppress 1 \
3648         --stringparam man.authors.section.enabled 0 \
3649         --stringparam man.copyright.section.enabled 0
3650
3651 XSLTPROC_PROCESS_MAN = \
3652         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
3653         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
3654
3655 XSLTPROC_PROCESS_HTML = \
3656         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
3657         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
3658
3659 man/%.1: man/%.xml
3660         $(XSLTPROC_PROCESS_MAN)
3661
3662 man/%.3: man/%.xml
3663         $(XSLTPROC_PROCESS_MAN)
3664
3665 man/%.5: man/%.xml
3666         $(XSLTPROC_PROCESS_MAN)
3667
3668 man/%.7: man/%.xml
3669         $(XSLTPROC_PROCESS_MAN)
3670
3671 man/%.8: man/%.xml
3672         $(XSLTPROC_PROCESS_MAN)
3673
3674 man/%.html: man/%.xml man/custom-html.xsl
3675         $(XSLTPROC_PROCESS_HTML)
3676
3677 CLEANFILES += \
3678         $(dist_man_MANS) \
3679         ${XML_FILES:.xml=.html}
3680 endif
3681
3682 DBUS_PREPROCESS = $(CPP) -P $(CFLAGS) $(DBUS_CFLAGS) -imacros dbus/dbus-protocol.h
3683
3684 CLEANFILES += \
3685         $(dbusinterface_DATA)
3686
3687 systemd-install-data-hook:
3688         $(MKDIR_P) -m 0755 \
3689                 $(DESTDIR)$(tmpfilesdir) \
3690                 $(DESTDIR)$(sysconfdir)/tmpfiles.d \
3691                 $(DESTDIR)$(prefix)/lib/modules-load.d \
3692                 $(DESTDIR)$(sysconfdir)/modules-load.d \
3693                 $(DESTDIR)$(prefix)/lib/sysctl.d \
3694                 $(DESTDIR)$(sysconfdir)/sysctl.d \
3695                 $(DESTDIR)$(systemshutdowndir) \
3696                 $(DESTDIR)$(systemsleepdir) \
3697                 $(DESTDIR)$(systemgeneratordir) \
3698                 $(DESTDIR)$(usergeneratordir)
3699         $(MKDIR_P) -m 0755 \
3700                 $(DESTDIR)$(systemunitdir) \
3701                 $(DESTDIR)$(userunitdir) \
3702                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
3703                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
3704                 $(DESTDIR)$(systemunitdir)/basic.target.wants \
3705                 $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
3706                 $(DESTDIR)$(systemunitdir)/local-fs.target.wants \
3707                 $(DESTDIR)$(systemunitdir)/runlevel1.target.wants \
3708                 $(DESTDIR)$(systemunitdir)/runlevel2.target.wants \
3709                 $(DESTDIR)$(systemunitdir)/runlevel3.target.wants \
3710                 $(DESTDIR)$(systemunitdir)/runlevel4.target.wants \
3711                 $(DESTDIR)$(systemunitdir)/runlevel5.target.wants \
3712                 $(DESTDIR)$(systemunitdir)/multi-user.target.wants \
3713                 $(DESTDIR)$(systemunitdir)/graphical.target.wants \
3714                 $(DESTDIR)$(pkgsysconfdir)/system \
3715                 $(DESTDIR)$(pkgsysconfdir)/system/sysinit.target.wants \
3716                 $(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants \
3717                 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
3718                 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
3719                 $(DESTDIR)$(pkgsysconfdir)/user \
3720                 $(DESTDIR)$(dbussessionservicedir) \
3721                 $(DESTDIR)$(sysconfdir)/xdg/systemd
3722         ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
3723                 rm -f user && \
3724                 $(LN_S) $(pkgsysconfdir)/user user )
3725         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
3726                 rm -f systemd-initctl.socket systemd-shutdownd.socket && \
3727                 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket && \
3728                 $(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket )
3729         ( cd $(DESTDIR)$(systemunitdir)/runlevel1.target.wants && \
3730                 rm -f systemd-update-utmp-runlevel.service && \
3731                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
3732         ( cd $(DESTDIR)$(systemunitdir)/runlevel2.target.wants && \
3733                 rm -f systemd-update-utmp-runlevel.service && \
3734                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
3735         ( cd $(DESTDIR)$(systemunitdir)/runlevel3.target.wants && \
3736                 rm -f systemd-update-utmp-runlevel.service && \
3737                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
3738         ( cd $(DESTDIR)$(systemunitdir)/runlevel4.target.wants && \
3739                 rm -f systemd-update-utmp-runlevel.service && \
3740                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
3741         ( cd $(DESTDIR)$(systemunitdir)/runlevel5.target.wants && \
3742                 rm -f systemd-update-utmp-runlevel.service && \
3743                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
3744         ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
3745                 rm -f systemd-update-utmp-shutdown.service && \
3746                 $(LN_S) ../systemd-update-utmp-shutdown.service systemd-update-utmp-shutdown.service )
3747         ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \
3748                 rm -f systemd-remount-fs.service \
3749                         systemd-fsck-root.service \
3750                         tmp.mount && \
3751                 $(LN_S) ../systemd-remount-fs.service systemd-remount-fs.service && \
3752                 $(LN_S) ../systemd-fsck-root.service systemd-fsck-root.service && \
3753                 $(LN_S) ../tmp.mount tmp.mount )
3754         ( cd $(DESTDIR)$(userunitdir) && \
3755                 rm -f shutdown.target sockets.target bluetooth.target printer.target sound.target && \
3756                 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
3757                 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
3758                 $(LN_S) $(systemunitdir)/bluetooth.target bluetooth.target && \
3759                 $(LN_S) $(systemunitdir)/printer.target printer.target && \
3760                 $(LN_S) $(systemunitdir)/sound.target sound.target )
3761         ( cd $(DESTDIR)$(systemunitdir) && \
3762                 rm -f runlevel0.target runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target runlevel6.target && \
3763                 $(LN_S) poweroff.target runlevel0.target && \
3764                 $(LN_S) rescue.target runlevel1.target && \
3765                 $(LN_S) multi-user.target runlevel2.target && \
3766                 $(LN_S) multi-user.target runlevel3.target && \
3767                 $(LN_S) multi-user.target runlevel4.target && \
3768                 $(LN_S) graphical.target runlevel5.target && \
3769                 $(LN_S) reboot.target runlevel6.target )
3770         ( cd $(DESTDIR)$(systemunitdir) && \
3771                 rm -f default.target ctrl-alt-del.target autovt@.service && \
3772                 $(LN_S) graphical.target default.target && \
3773                 $(LN_S) reboot.target ctrl-alt-del.target && \
3774                 $(LN_S) getty@.service autovt@.service )
3775         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
3776                 rm -f getty.target systemd-ask-password-wall.path && \
3777                 $(LN_S) ../getty.target getty.target && \
3778                 $(LN_S) ../systemd-ask-password-wall.path systemd-ask-password-wall.path)
3779         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
3780                 rm -f getty@tty1.service && \
3781                 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service )
3782         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
3783                 rm -f remote-fs.target && \
3784                 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
3785         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
3786                 rm -f dev-hugepages.mount \
3787                         dev-mqueue.mount \