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