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