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