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