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