chiark / gitweb /
12118b1cc08e44e577c0ac8f81ccb6efdea44046
[elogind.git] / Makefile.am
1 #  This file is part of systemd.
2 #
3 #  Copyright 2010 Lennart Poettering
4 #
5 #  systemd is free software; you can redistribute it and/or modify it
6 #  under the terms of the GNU General Public License as published by
7 #  the Free Software Foundation; either version 2 of the License, or
8 #  (at your option) any later version.
9 #
10 #  systemd is distributed in the hope that it will be useful, but
11 #  WITHOUT ANY WARRANTY; without even the implied warranty of
12 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 #  General Public License for more details.
14 #
15 #  You should have received a copy of the GNU General Public License
16 #  along with systemd; If not, see <http://www.gnu.org/licenses/>.
17
18 ACLOCAL_AMFLAGS = -I m4
19
20 # Dirs of external packages
21 dbuspolicydir=@dbuspolicydir@
22 dbussessionservicedir=@dbussessionservicedir@
23 dbussystemservicedir=@dbussystemservicedir@
24 dbusinterfacedir=@dbusinterfacedir@
25 udevrulesdir=@udevrulesdir@
26 pamlibdir=@pamlibdir@
27 pkgconfigdatadir=$(datadir)/pkgconfig
28 polkitpolicydir=$(datadir)/polkit-1/actions
29 bashcompletiondir=$(sysconfdir)/bash_completion.d
30
31 # Our own, non-special dirs
32 pkgsysconfdir=$(sysconfdir)/systemd
33 userunitdir=$(pkgdatadir)/user
34 tmpfilesdir=$(sysconfdir)/tmpfiles.d
35 usergeneratordir=$(pkglibexecdir)/user-generators
36
37 # And these are the special ones for /
38 rootdir=@rootdir@
39 rootbindir=$(rootdir)/bin
40 rootsbindir=$(rootdir)/sbin
41 rootlibexecdir=$(rootdir)/lib/systemd
42 systemunitdir=$(rootdir)/lib/systemd/system
43 systemgeneratordir=$(rootdir)/lib/systemd/system-generators
44 systemshutdowndir=$(rootdir)/lib/systemd/system-shutdown
45
46 AM_CPPFLAGS = \
47         -include $(top_builddir)/config.h \
48         -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \
49         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
50         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
51         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
52         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
53         -DUSER_CONFIG_FILE=\"$(pkgsysconfdir)/user.conf\" \
54         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
55         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
56         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
57         -DSYSTEMD_BINARY_PATH=\"$(rootbindir)/systemd\" \
58         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
59         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
60         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
61         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
62         -DRUNTIME_DIR=\"/run\" \
63         -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
64         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
65         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
66         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
67         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
68         -I $(top_srcdir)/src
69
70 if TARGET_GENTOO
71 AM_CPPFLAGS += \
72         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
73         -DKBD_SETFONT=\"/usr/bin/setfont\" \
74         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
75 else
76 if TARGET_ARCH
77 AM_CPPFLAGS += \
78         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
79         -DKBD_SETFONT=\"/usr/bin/setfont\" \
80         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
81 else
82 if TARGET_FRUGALWARE
83 AM_CPPFLAGS += \
84         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
85         -DKBD_SETFONT=\"/usr/bin/setfont\" \
86         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
87 else
88 if TARGET_MANDRIVA
89 AM_CPPFLAGS += \
90         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
91         -DKBD_SETFONT=\"/bin/setfont\" \
92         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
93 else
94 AM_CPPFLAGS += \
95         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
96         -DKBD_SETFONT=\"/bin/setfont\" \
97         -DDEFAULT_FONT=\"latarcyrheb-sun16\"
98 endif
99 endif
100 endif
101 endif
102
103 rootbin_PROGRAMS = \
104         systemd \
105         systemctl \
106         systemd-notify \
107         systemd-ask-password \
108         systemd-tty-ask-password-agent \
109         systemd-tmpfiles \
110         systemd-machine-id-setup
111
112 bin_PROGRAMS = \
113         systemd-cgls \
114         systemd-stdio-bridge \
115         systemd-nspawn
116
117 dist_bin_SCRIPTS = \
118         src/systemd-analyze
119
120 if HAVE_GTK
121 bin_PROGRAMS += \
122         systemadm \
123         systemd-gnome-ask-password-agent
124 endif
125
126 rootlibexec_PROGRAMS = \
127         systemd-logger \
128         systemd-cgroups-agent \
129         systemd-initctl \
130         systemd-update-utmp \
131         systemd-random-seed \
132         systemd-shutdownd \
133         systemd-shutdown \
134         systemd-modules-load \
135         systemd-remount-api-vfs \
136         systemd-kmsg-syslogd \
137         systemd-vconsole-setup \
138         systemd-reply-password \
139         systemd-readahead-collect \
140         systemd-readahead-replay \
141         systemd-user-sessions \
142         systemd-fsck \
143         systemd-quotacheck \
144         systemd-timestamp \
145         systemd-ac-power \
146         systemd-detect-virt \
147         systemd-sysctl
148
149 systemgenerator_PROGRAMS = \
150         systemd-getty-generator
151
152 if HAVE_LIBCRYPTSETUP
153 rootlibexec_PROGRAMS += \
154         systemd-cryptsetup
155
156 systemgenerator_PROGRAMS += \
157         systemd-cryptsetup-generator
158 endif
159
160 noinst_PROGRAMS = \
161         test-engine \
162         test-job-type \
163         test-ns \
164         test-loopback \
165         test-hostname \
166         test-daemon \
167         test-cgroup \
168         test-env-replace \
169         test-strv
170
171 if HAVE_PAM
172 pamlib_LTLIBRARIES = \
173         pam_systemd.la
174 endif
175
176 dist_pkgsysconf_DATA = \
177         src/system.conf
178
179 dist_dbuspolicy_DATA = \
180         src/org.freedesktop.systemd1.conf
181
182 dist_dbussystemservice_DATA = \
183         src/org.freedesktop.systemd1.service
184
185 dist_udevrules_DATA = \
186         src/99-systemd.rules
187
188 dbusinterface_DATA = \
189         org.freedesktop.systemd1.Manager.xml \
190         org.freedesktop.systemd1.Job.xml \
191         org.freedesktop.systemd1.Unit.xml \
192         org.freedesktop.systemd1.Service.xml \
193         org.freedesktop.systemd1.Socket.xml \
194         org.freedesktop.systemd1.Timer.xml \
195         org.freedesktop.systemd1.Target.xml \
196         org.freedesktop.systemd1.Device.xml \
197         org.freedesktop.systemd1.Mount.xml \
198         org.freedesktop.systemd1.Automount.xml \
199         org.freedesktop.systemd1.Snapshot.xml \
200         org.freedesktop.systemd1.Swap.xml \
201         org.freedesktop.systemd1.Path.xml
202
203 dist_bashcompletion_DATA = \
204         src/systemctl-bash-completion.sh
205
206 dist_tmpfiles_DATA = \
207         tmpfiles.d/systemd.conf \
208         tmpfiles.d/x11.conf
209
210 if HAVE_SYSV_COMPAT
211 dist_tmpfiles_DATA += \
212         tmpfiles.d/legacy.conf
213 endif
214
215 dist_systemunit_DATA = \
216         units/graphical.target \
217         units/multi-user.target \
218         units/emergency.service \
219         units/emergency.target \
220         units/sysinit.target \
221         units/basic.target \
222         units/getty.target \
223         units/halt.target \
224         units/kexec.target \
225         units/local-fs.target \
226         units/cryptsetup.target \
227         units/network.target \
228         units/nss-lookup.target \
229         units/mail-transfer-agent.target \
230         units/http-daemon.target \
231         units/poweroff.target \
232         units/reboot.target \
233         units/rescue.target \
234         units/rpcbind.target \
235         units/rtc-set.target \
236         units/shutdown.target \
237         units/final.target \
238         units/umount.target \
239         units/sigpwr.target \
240         units/sockets.target \
241         units/swap.target \
242         units/systemd-initctl.socket \
243         units/systemd-logger.socket \
244         units/systemd-shutdownd.socket \
245         units/syslog.socket \
246         units/dev-hugepages.automount \
247         units/dev-hugepages.mount \
248         units/dev-mqueue.automount \
249         units/dev-mqueue.mount \
250         units/proc-sys-fs-binfmt_misc.automount \
251         units/proc-sys-fs-binfmt_misc.mount \
252         units/sys-kernel-debug.automount \
253         units/sys-kernel-debug.mount \
254         units/sys-kernel-security.automount \
255         units/sys-kernel-security.mount \
256         units/var-lock.mount \
257         units/var-run.mount \
258         units/media.mount \
259         units/hwclock-load.service \
260         units/hwclock-save.service \
261         units/remount-rootfs.service \
262         units/printer.target \
263         units/sound.target \
264         units/bluetooth.target \
265         units/smartcard.target \
266         units/systemd-readahead-done.timer \
267         units/systemd-tmpfiles-clean.timer \
268         units/quotaon.service \
269         units/systemd-ask-password-wall.path \
270         units/systemd-ask-password-console.path \
271         units/syslog.target
272
273 nodist_systemunit_DATA = \
274         units/getty@.service \
275         units/serial-getty@.service \
276         units/console-shell.service \
277         units/remote-fs.target \
278         units/systemd-initctl.service \
279         units/systemd-logger.service \
280         units/systemd-shutdownd.service \
281         units/systemd-kmsg-syslogd.service \
282         units/systemd-modules-load.service \
283         units/systemd-vconsole-setup.service \
284         units/systemd-remount-api-vfs.service \
285         units/systemd-update-utmp-runlevel.service \
286         units/systemd-update-utmp-shutdown.service \
287         units/systemd-random-seed-save.service \
288         units/systemd-random-seed-load.service \
289         units/systemd-readahead-collect.service \
290         units/systemd-readahead-replay.service \
291         units/systemd-readahead-done.service \
292         units/systemd-tmpfiles-setup.service \
293         units/systemd-tmpfiles-clean.service \
294         units/systemd-user-sessions.service \
295         units/systemd-ask-password-wall.service \
296         units/systemd-ask-password-console.service \
297         units/systemd-sysctl.service \
298         units/halt.service \
299         units/poweroff.service \
300         units/reboot.service \
301         units/kexec.service \
302         units/fsck@.service \
303         units/fsck-root.service \
304         units/quotacheck.service \
305         units/rescue.service
306
307 dist_userunit_DATA = \
308         units/user/default.target \
309         units/user/exit.target
310
311 nodist_userunit_DATA = \
312         units/user/remote-fs.target \
313         units/user/exit.service
314
315 EXTRA_DIST = \
316         units/getty@.service.m4 \
317         units/serial-getty@.service.m4 \
318         units/console-shell.service.m4 \
319         units/remote-fs.target.m4 \
320         units/rescue.service.m4 \
321         units/systemd-initctl.service.in \
322         units/systemd-logger.service.in \
323         units/systemd-shutdownd.service.in \
324         units/systemd-kmsg-syslogd.service.in \
325         units/systemd-modules-load.service.in \
326         units/systemd-vconsole-setup.service.in \
327         units/systemd-remount-api-vfs.service.in \
328         units/systemd-update-utmp-runlevel.service.in \
329         units/systemd-update-utmp-shutdown.service.in \
330         units/systemd-random-seed-save.service.in \
331         units/systemd-random-seed-load.service.in \
332         units/systemd-readahead-collect.service.in \
333         units/systemd-readahead-replay.service.in \
334         units/systemd-readahead-done.service.in \
335         units/systemd-tmpfiles-setup.service.in \
336         units/systemd-tmpfiles-clean.service.in \
337         units/systemd-user-sessions.service.in \
338         units/systemd-ask-password-wall.service.in \
339         units/systemd-ask-password-console.service.in \
340         units/systemd-sysctl.service.in \
341         units/halt.service.in \
342         units/poweroff.service.in \
343         units/reboot.service.in \
344         units/kexec.service.in \
345         units/user/exit.service.in \
346         units/fsck@.service.in \
347         units/fsck-root.service.in \
348         units/quotacheck.service.in \
349         systemd.pc.in \
350         introspect.awk \
351         src/org.freedesktop.systemd1.policy.in
352
353 if TARGET_FEDORA
354 dist_systemunit_DATA += \
355         units/fedora/prefdm.service \
356         units/fedora/rc-local.service \
357         units/fedora/halt-local.service
358 endif
359
360 if TARGET_MANDRIVA
361 dist_systemunit_DATA += \
362         units/mandriva/prefdm.service \
363         units/fedora/rc-local.service \
364         units/fedora/halt-local.service
365 endif
366
367 if TARGET_FRUGALWARE
368 dist_systemunit_DATA += \
369         units/frugalware/display-manager.service
370 endif
371
372 if HAVE_PLYMOUTH
373 dist_systemunit_DATA += \
374         units/plymouth-start.service \
375         units/plymouth-read-write.service \
376         units/plymouth-quit.service \
377         units/plymouth-quit-wait.service \
378         units/plymouth-reboot.service \
379         units/plymouth-kexec.service \
380         units/plymouth-poweroff.service \
381         units/plymouth-halt.service \
382         units/systemd-ask-password-plymouth.path
383
384 nodist_systemunit_DATA += \
385         units/systemd-ask-password-plymouth.service
386
387 EXTRA_DIST += \
388         units/systemd-ask-password-plymouth.service.in
389 endif
390
391 dist_doc_DATA = \
392         README \
393         LICENSE \
394         DISTRO_PORTING \
395         src/sd-daemon.h \
396         src/sd-daemon.c \
397         src/sd-readahead.h \
398         src/sd-readahead.c
399
400 pkgconfigdata_DATA = \
401         systemd.pc
402
403 polkitpolicy_DATA = \
404         src/org.freedesktop.systemd1.policy
405
406 noinst_LTLIBRARIES = \
407         libsystemd-basic.la \
408         libsystemd-core.la \
409         libsystemd-daemon.la
410
411 libsystemd_basic_la_SOURCES = \
412         src/util.c \
413         src/label.c \
414         src/hashmap.c \
415         src/set.c \
416         src/strv.c \
417         src/conf-parser.c \
418         src/socket-util.c \
419         src/log.c \
420         src/ratelimit.c \
421         src/exit-status.c
422
423 libsystemd_basic_la_CFLAGS = \
424         $(AM_CFLAGS) \
425         $(SELINUX_CFLAGS)
426
427 libsystemd_basic_la_LIBADD = \
428         $(SELINUX_LIBS)
429
430 libsystemd_core_la_SOURCES = \
431         src/unit.c \
432         src/job.c \
433         src/manager.c \
434         src/path-lookup.c \
435         src/load-fragment.c \
436         src/service.c \
437         src/automount.c \
438         src/mount.c \
439         src/swap.c \
440         src/device.c \
441         src/target.c \
442         src/snapshot.c \
443         src/socket.c \
444         src/timer.c \
445         src/path.c \
446         src/load-dropin.c \
447         src/execute.c \
448         src/utmp-wtmp.c \
449         src/dbus.c \
450         src/dbus-manager.c \
451         src/dbus-unit.c \
452         src/dbus-job.c \
453         src/dbus-service.c \
454         src/dbus-socket.c \
455         src/dbus-timer.c \
456         src/dbus-target.c \
457         src/dbus-mount.c \
458         src/dbus-automount.c \
459         src/dbus-swap.c \
460         src/dbus-snapshot.c \
461         src/dbus-device.c \
462         src/dbus-execute.c \
463         src/dbus-path.c \
464         src/cgroup.c \
465         src/mount-setup.c \
466         src/hostname-setup.c \
467         src/selinux-setup.c \
468         src/loopback-setup.c \
469         src/kmod-setup.c \
470         src/locale-setup.c \
471         src/machine-id-setup.c \
472         src/specifier.c \
473         src/unit-name.c \
474         src/fdset.c \
475         src/namespace.c \
476         src/tcpwrap.c \
477         src/cgroup-util.c \
478         src/condition.c
479
480 libsystemd_core_la_CFLAGS = \
481         $(AM_CFLAGS) \
482         $(DBUS_CFLAGS) \
483         $(UDEV_CFLAGS) \
484         $(LIBWRAP_CFLAGS) \
485         $(PAM_CFLAGS) \
486         $(AUDIT_CFLAGS)
487
488 libsystemd_core_la_LIBADD = \
489         libsystemd-basic.la \
490         $(DBUS_LIBS) \
491         $(UDEV_LIBS) \
492         $(LIBWRAP_LIBS) \
493         $(PAM_LIBS) \
494         $(AUDIT_LIBS)
495
496 libsystemd_daemon_la_SOURCES = \
497         src/sd-daemon.c
498
499 # This is needed because automake is buggy in how it generates the
500 # rules for C programs, but not Vala programs.  We therefore can't
501 # list the .h files as dependencies if we want make dist to work.
502
503 EXTRA_DIST += \
504         ${libsystemd_basic_la_SOURCES:.c=.h} \
505         ${libsystemd_core_la_SOURCES:.c=.h} \
506         ${libsystemd_daemon_la_SOURCES:.c=.h} \
507         src/macro.h \
508         src/def.h \
509         src/ioprio.h \
510         src/missing.h \
511         src/list.h \
512         src/securebits.h \
513         src/linux/auto_dev-ioctl.h \
514         src/linux/fanotify.h \
515         src/initreq.h \
516         src/sd-readahead.h \
517         src/special.h \
518         src/dbus-common.h \
519         src/bus-errors.h \
520         src/cgroup-show.h \
521         src/build.h \
522         src/shutdownd.h \
523         src/umount.h \
524         src/readahead-common.h \
525         src/ask-password-api.h
526
527 MANPAGES = \
528         man/systemd.1 \
529         man/systemctl.1 \
530         man/systemadm.1 \
531         man/systemd-cgls.1 \
532         man/systemd-nspawn.1 \
533         man/systemd-tmpfiles.8 \
534         man/systemd-notify.1 \
535         man/sd_notify.3 \
536         man/sd_readahead.3 \
537         man/sd_booted.3 \
538         man/sd_listen_fds.3 \
539         man/sd_is_fifo.3 \
540         man/systemd.unit.5 \
541         man/systemd.service.5 \
542         man/systemd.socket.5 \
543         man/systemd.mount.5 \
544         man/systemd.automount.5 \
545         man/systemd.swap.5 \
546         man/systemd.timer.5 \
547         man/systemd.path.5 \
548         man/systemd.target.5 \
549         man/systemd.device.5 \
550         man/systemd.snapshot.5 \
551         man/systemd.exec.5 \
552         man/daemon.7 \
553         man/sd-daemon.7 \
554         man/sd-readahead.7 \
555         man/runlevel.8 \
556         man/telinit.8 \
557         man/halt.8 \
558         man/shutdown.8 \
559         man/pam_systemd.8 \
560         man/systemd.conf.5 \
561         man/tmpfiles.d.5 \
562         man/hostname.5 \
563         man/machine-id.5 \
564         man/vconsole.conf.5 \
565         man/locale.conf.5 \
566         man/os-release.5 \
567         man/modules-load.d.5
568
569 MANPAGES_ALIAS = \
570         man/reboot.8 \
571         man/poweroff.8 \
572         man/sd_is_socket.3 \
573         man/sd_is_socket_unix.3 \
574         man/sd_is_socket_inet.3 \
575         man/sd_notifyf.3 \
576         man/init.1
577
578 man/reboot.8: man/halt.8
579 man/poweroff.8: man/halt.8
580 man/sd_is_socket.3: man/sd_is_fifo.3
581 man/sd_is_socket_unix.3: man/sd_is_fifo.3
582 man/sd_is_socket_inet.3: man/sd_is_fifo.3
583 man/sd_notifyf.3: man/sd_notify.3
584 man/init.1: man/systemd.1
585
586 dist_man_MANS = \
587         $(MANPAGES) \
588         $(MANPAGES_ALIAS)
589
590 nodist_man_MANS = \
591         man/systemd.special.7
592
593 XML_FILES = \
594         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
595
596 XML_IN_FILES = \
597         ${patsubst %.1,%.xml.in,${patsubst %.3,%.xml.in,${patsubst %.5,%.xml.in,${patsubst %.7,%.xml.in,${patsubst %.8,%.xml.in,$(nodist_man_MANS)}}}}}
598
599 dist_noinst_DATA = \
600         ${XML_FILES:.xml=.html}
601
602 nodist_noinst_DATA = \
603         ${XML_IN_FILES:.xml.in=.html}
604
605 EXTRA_DIST += \
606         $(XML_FILES) \
607         $(XML_IN_FILES) \
608         ${nodist_man_MANS:=.in} \
609         ${XML_IN_FILES:.xml.in=.html.in}
610
611 systemd_SOURCES = \
612         src/main.c
613
614 systemd_CFLAGS = \
615         $(AM_CFLAGS) \
616         $(DBUS_CFLAGS) \
617         $(UDEV_CFLAGS)
618
619 systemd_LDADD = \
620         libsystemd-core.la
621
622 test_engine_SOURCES = \
623         src/test-engine.c
624
625 test_engine_CFLAGS = $(systemd_CFLAGS)
626 test_engine_LDADD = $(systemd_LDADD)
627
628 test_job_type_SOURCES = \
629         src/test-job-type.c
630
631 test_job_type_CFLAGS = $(systemd_CFLAGS)
632 test_job_type_LDADD = $(systemd_LDADD)
633
634 test_ns_SOURCES = \
635         src/test-ns.c
636
637 test_ns_CFLAGS = $(systemd_CFLAGS)
638 test_ns_LDADD = $(systemd_LDADD)
639
640 test_loopback_SOURCES = \
641         src/test-loopback.c \
642         src/loopback-setup.c
643
644 test_loopback_LDADD = \
645         libsystemd-basic.la
646
647 test_hostname_SOURCES = \
648         src/test-hostname.c \
649         src/hostname-setup.c
650
651 test_hostname_LDADD = \
652         libsystemd-basic.la
653
654 test_daemon_SOURCES = \
655         src/test-daemon.c
656
657 test_daemon_LDADD = \
658         libsystemd-basic.la \
659         libsystemd-daemon.la
660
661 test_cgroup_SOURCES = \
662         src/test-cgroup.c \
663         src/cgroup-util.c
664
665 test_cgroup_CFLAGS = \
666         $(AM_CFLAGS)
667
668 test_cgroup_LDADD = \
669         libsystemd-basic.la
670
671 test_env_replace_SOURCES = \
672         src/test-env-replace.c
673
674 test_env_replace_CFLAGS = \
675         $(AM_CFLAGS)
676
677 test_env_replace_LDADD = \
678         libsystemd-basic.la
679
680 test_strv_SOURCES = \
681         src/test-strv.c \
682         src/specifier.c
683
684 test_strv_CFLAGS = \
685         $(AM_CFLAGS)
686
687 test_strv_LDADD = \
688         libsystemd-basic.la
689
690 systemd_logger_SOURCES = \
691         src/logger.c \
692         src/tcpwrap.c
693
694 systemd_logger_LDADD = \
695         libsystemd-basic.la \
696         libsystemd-daemon.la \
697         $(LIBWRAP_LIBS)
698
699 systemd_initctl_SOURCES = \
700         src/initctl.c \
701         src/dbus-common.c
702
703 systemd_initctl_CFLAGS = \
704         $(AM_CFLAGS) \
705         $(DBUS_CFLAGS)
706
707 systemd_initctl_LDADD = \
708         libsystemd-basic.la \
709         libsystemd-daemon.la \
710         $(DBUS_LIBS)
711
712 systemd_update_utmp_SOURCES = \
713         src/update-utmp.c \
714         src/dbus-common.c \
715         src/utmp-wtmp.c
716
717 systemd_update_utmp_CFLAGS = \
718         $(AM_CFLAGS) \
719         $(DBUS_CFLAGS) \
720         $(AUDIT_CFLAGS)
721
722 systemd_update_utmp_LDADD = \
723         libsystemd-basic.la \
724         $(DBUS_LIBS) \
725         $(AUDIT_LIBS)
726
727 systemd_random_seed_SOURCES = \
728         src/random-seed.c
729
730 systemd_random_seed_CFLAGS = \
731         $(AM_CFLAGS)
732
733 systemd_random_seed_LDADD = \
734         libsystemd-basic.la
735
736 systemd_shutdownd_SOURCES = \
737         src/utmp-wtmp.c \
738         src/shutdownd.c
739
740 systemd_shutdownd_CFLAGS = \
741         $(AM_CFLAGS)
742
743 systemd_shutdownd_LDADD = \
744         libsystemd-basic.la \
745         libsystemd-daemon.la
746
747 systemd_shutdown_SOURCES = \
748         src/mount-setup.c \
749         src/umount.c \
750         src/shutdown.c
751
752 systemd_shutdown_CFLAGS = \
753         $(AM_CFLAGS) \
754         $(UDEV_CFLAGS)
755
756 systemd_shutdown_LDADD = \
757         libsystemd-basic.la \
758         $(UDEV_LIBS)
759
760 systemd_modules_load_SOURCES = \
761         src/modules-load.c
762
763 systemd_modules_load_CFLAGS = \
764         $(AM_CFLAGS)
765
766 systemd_modules_load_LDADD = \
767         libsystemd-basic.la
768
769 systemd_tmpfiles_SOURCES = \
770         src/tmpfiles.c
771
772 systemd_tmpfiles_CFLAGS = \
773         $(AM_CFLAGS)
774
775 systemd_tmpfiles_LDADD = \
776         libsystemd-basic.la
777
778 systemd_machine_id_setup_SOURCES = \
779         src/machine-id-setup.c \
780         src/machine-id-main.c
781
782 systemd_machine_id_setup_CFLAGS = \
783         $(AM_CFLAGS)
784
785 systemd_machine_id_setup_LDADD = \
786         libsystemd-basic.la
787
788 systemd_sysctl_SOURCES = \
789         src/sysctl.c
790
791 systemd_sysctl_CFLAGS = \
792         $(AM_CFLAGS)
793
794 systemd_sysctl_LDADD = \
795         libsystemd-basic.la
796
797 systemd_fsck_SOURCES = \
798         src/fsck.c \
799         src/dbus-common.c
800
801 systemd_fsck_CFLAGS = \
802         $(AM_CFLAGS) \
803         $(UDEV_CFLAGS) \
804         $(DBUS_CFLAGS)
805
806 systemd_fsck_LDADD = \
807         libsystemd-basic.la \
808         $(UDEV_LIBS) \
809         $(DBUS_LIBS)
810
811 systemd_quotacheck_SOURCES = \
812         src/quotacheck.c
813
814 systemd_quotacheck_CFLAGS = \
815         $(AM_CFLAGS)
816
817 systemd_quotacheck_LDADD = \
818         libsystemd-basic.la
819
820 systemd_timestamp_SOURCES = \
821         src/timestamp.c
822
823 systemd_timestamp_CFLAGS = \
824         $(AM_CFLAGS)
825
826 systemd_timestamp_LDADD = \
827         libsystemd-basic.la
828
829 systemd_ac_power_SOURCES = \
830         src/ac-power.c
831
832 systemd_ac_power_CFLAGS = \
833         $(AM_CFLAGS) \
834         $(UDEV_CFLAGS)
835
836 systemd_ac_power_LDADD = \
837         libsystemd-basic.la \
838         $(UDEV_LIBS)
839
840 systemd_detect_virt_SOURCES = \
841         src/detect-virt.c
842
843 systemd_detect_virt_CFLAGS = \
844         $(AM_CFLAGS)
845
846 systemd_detect_virt_LDADD = \
847         libsystemd-basic.la
848
849 systemd_cryptsetup_SOURCES = \
850         src/cryptsetup.c \
851         src/ask-password-api.c
852
853 systemd_cryptsetup_CFLAGS = \
854         $(LIBCRYPTSETUP_CFLAGS) \
855         $(UDEV_CFLAGS) \
856         $(AM_CFLAGS)
857
858 systemd_cryptsetup_LDADD = \
859         $(LIBCRYPTSETUP_LIBS) \
860         $(UDEV_LIBS) \
861         libsystemd-basic.la
862
863 systemd_cryptsetup_generator_SOURCES = \
864         src/cryptsetup-generator.c \
865         src/unit-name.c
866
867 systemd_cryptsetup_generator_CFLAGS = \
868         $(AM_CFLAGS)
869
870 systemd_cryptsetup_generator_LDADD = \
871         libsystemd-basic.la
872
873 systemd_getty_generator_SOURCES = \
874         src/getty-generator.c \
875         src/unit-name.c
876
877 systemd_getty_generator_CFLAGS = \
878         $(AM_CFLAGS)
879
880 systemd_getty_generator_LDADD = \
881         libsystemd-basic.la
882
883 systemd_user_sessions_SOURCES = \
884         src/user-sessions.c \
885         src/cgroup-util.c
886
887 systemd_user_sessions_CFLAGS = \
888         $(AM_CFLAGS)
889
890 systemd_user_sessions_LDADD = \
891         libsystemd-basic.la
892
893 systemd_vconsole_setup_SOURCES = \
894         src/vconsole-setup.c
895
896 systemd_vconsole_setup_CFLAGS = \
897         $(AM_CFLAGS)
898
899 systemd_vconsole_setup_LDADD = \
900         libsystemd-basic.la
901
902 systemd_remount_api_vfs_SOURCES = \
903         src/remount-api-vfs.c \
904         src/mount-setup.c \
905         src/exit-status.c
906
907 systemd_remount_api_vfs_CFLAGS = \
908         $(AM_CFLAGS)
909
910 systemd_remount_api_vfs_LDADD = \
911         libsystemd-basic.la
912
913 systemd_cgroups_agent_SOURCES = \
914         src/cgroups-agent.c \
915         src/dbus-common.c
916
917 systemd_cgroups_agent_CFLAGS = \
918         $(AM_CFLAGS) \
919         $(DBUS_CFLAGS)
920
921 systemd_cgroups_agent_LDADD = \
922         libsystemd-basic.la \
923         $(DBUS_LIBS)
924
925 systemd_kmsg_syslogd_SOURCES = \
926         src/kmsg-syslogd.c \
927         src/fdset.c
928
929 systemd_kmsg_syslogd_CFLAGS = \
930         $(AM_CFLAGS)
931
932 systemd_kmsg_syslogd_LDADD = \
933         libsystemd-basic.la \
934         libsystemd-daemon.la
935
936 systemctl_SOURCES = \
937         src/systemctl.c \
938         src/utmp-wtmp.c \
939         src/dbus-common.c \
940         src/path-lookup.c \
941         src/cgroup-show.c \
942         src/cgroup-util.c \
943         src/exit-status.c \
944         src/unit-name.c
945
946 systemctl_CFLAGS = \
947         $(AM_CFLAGS) \
948         $(DBUS_CFLAGS)
949
950 systemctl_LDADD = \
951         libsystemd-basic.la \
952         libsystemd-daemon.la \
953         $(DBUS_LIBS)
954
955 systemd_notify_SOURCES = \
956         src/notify.c \
957         src/sd-readahead.c
958
959 systemd_notify_LDADD = \
960         libsystemd-basic.la \
961         libsystemd-daemon.la
962
963 systemd_ask_password_SOURCES = \
964         src/ask-password.c \
965         src/ask-password-api.c
966
967 systemd_ask_password_LDADD = \
968         libsystemd-basic.la
969
970 systemd_reply_password_SOURCES = \
971         src/reply-password.c
972
973 systemd_reply_password_LDADD = \
974         libsystemd-basic.la
975
976 systemd_readahead_collect_SOURCES = \
977         src/readahead-collect.c \
978         src/readahead-common.c
979
980 systemd_readahead_collect_CFLAGS = \
981         $(UDEV_CFLAGS)
982
983 systemd_readahead_collect_LDADD = \
984         libsystemd-basic.la \
985         libsystemd-daemon.la \
986         $(UDEV_LIBS)
987
988 systemd_readahead_replay_SOURCES = \
989         src/readahead-replay.c \
990         src/readahead-common.c
991
992 systemd_readahead_replay_CFLAGS = \
993         $(UDEV_CFLAGS)
994
995 systemd_readahead_replay_LDADD = \
996         libsystemd-basic.la \
997         libsystemd-daemon.la \
998         $(UDEV_LIBS)
999
1000 systemd_cgls_SOURCES = \
1001         src/cgls.c \
1002         src/cgroup-show.c \
1003         src/cgroup-util.c
1004
1005 systemd_cgls_CFLAGS = \
1006         $(AM_CFLAGS)
1007
1008 systemd_cgls_LDADD = \
1009         libsystemd-basic.la
1010
1011 systemd_nspawn_SOURCES = \
1012         src/nspawn.c \
1013         src/cgroup-util.c
1014
1015 systemd_nspawn_CFLAGS = \
1016         $(AM_CFLAGS)
1017
1018 systemd_nspawn_LDADD = \
1019         libsystemd-basic.la \
1020         libsystemd-daemon.la
1021
1022 systemd_stdio_bridge_SOURCES = \
1023         src/bridge.c
1024
1025 systemd_stdio_bridge_LDADD = \
1026         libsystemd-basic.la
1027
1028 systemadm_SOURCES = \
1029         src/systemadm.vala \
1030         src/systemd-interfaces.vala
1031
1032 systemadm_CFLAGS = \
1033         $(AM_CFLAGS) \
1034         $(GTK_CFLAGS) \
1035         -Wno-unused-variable \
1036         -Wno-unused-function \
1037         -Wno-shadow \
1038         -Wno-format-nonliteral
1039
1040 systemadm_VALAFLAGS = \
1041         --pkg=posix \
1042         --pkg=gtk+-2.0 \
1043         -g
1044
1045 systemadm_LDADD = \
1046         $(GTK_LIBS)
1047
1048 systemd_gnome_ask_password_agent_SOURCES = \
1049         src/gnome-ask-password-agent.vala
1050
1051 systemd_gnome_ask_password_agent_CFLAGS = \
1052         $(AM_CFLAGS) \
1053         $(LIBNOTIFY_CFLAGS) \
1054         $(GTK_CFLAGS) \
1055         -Wno-unused-variable \
1056         -Wno-unused-function \
1057         -Wno-shadow \
1058         -Wno-format-nonliteral
1059
1060 systemd_gnome_ask_password_agent_VALAFLAGS = \
1061         --pkg=posix \
1062         --pkg=gtk+-2.0 \
1063         --pkg=linux \
1064         --pkg=gio-unix-2.0 \
1065         --pkg=libnotify
1066 if LIBNOTIFY07
1067 systemd_gnome_ask_password_agent_VALAFLAGS += \
1068         -D LIBNOTIFY07
1069 endif
1070 systemd_gnome_ask_password_agent_VALAFLAGS += \
1071         -g
1072
1073 systemd_gnome_ask_password_agent_LDADD = \
1074         $(LIBNOTIFY_LIBS) \
1075         $(GTK_LIBS)
1076
1077 systemd_tty_ask_password_agent_SOURCES = \
1078         src/tty-ask-password-agent.c \
1079         src/ask-password-api.c \
1080         src/utmp-wtmp.c
1081
1082 systemd_tty_ask_password_agent_LDADD = \
1083         libsystemd-basic.la
1084
1085 pam_systemd_la_SOURCES = \
1086         src/pam-module.c \
1087         src/cgroup-util.c
1088
1089 pam_systemd_la_CFLAGS = \
1090         $(AM_CFLAGS)
1091         -fvisibility=hidden
1092
1093 pam_systemd_la_LDFLAGS = \
1094         -module \
1095         -export-dynamic \
1096         -avoid-version \
1097         -shared \
1098         -export-symbols-regex '^pam_sm_.*'
1099
1100 pam_systemd_la_LIBADD = \
1101         libsystemd-basic.la \
1102         libsystemd-daemon.la \
1103         $(PAM_LIBS)
1104
1105 SED_PROCESS = \
1106         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1107         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
1108                 -e 's,@rootbindir\@,$(rootbindir),g' \
1109                 -e 's,@bindir\@,$(bindir),g' \
1110                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
1111                 -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
1112                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
1113                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
1114                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
1115                 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
1116                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
1117                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
1118                 -e 's,@prefix\@,$(prefix),g' \
1119                 < $< > $@ || rm $@
1120
1121 units/%: units/%.in Makefile
1122         $(SED_PROCESS)
1123
1124 man/%: man/%.in Makefile
1125         $(SED_PROCESS)
1126
1127 %.pc: %.pc.in Makefile
1128         $(SED_PROCESS)
1129
1130 src/%.policy: src/%.policy.in Makefile
1131         $(SED_PROCESS)
1132
1133 M4_PROCESS_SYSTEM = \
1134         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1135         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@ || rm $@
1136
1137 M4_PROCESS_USER = \
1138         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1139         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_USER=1 < $< > $@ || rm $@
1140
1141 units/%: units/%.m4 Makefile
1142         $(M4_PROCESS_SYSTEM)
1143
1144 units/user/%: units/%.m4 Makefile
1145         $(M4_PROCESS_USER)
1146
1147 CLEANFILES = \
1148         $(nodist_systemunit_DATA) \
1149         $(nodist_userunit_DATA) \
1150         $(nodist_man_MANS) \
1151         ${XML_IN_FILES:.xml.in=.html} \
1152         $(pkgconfigdata_DATA) \
1153         src/org.freedesktop.systemd1.policy
1154
1155 if HAVE_VALAC
1156 CLEANFILES += \
1157         ${systemadm_SOURCES:.vala=.c}
1158 endif
1159
1160 if HAVE_XSLTPROC
1161 XSLTPROC_FLAGS = \
1162         --nonet \
1163         --param funcsynopsis.style "'ansi'"
1164
1165 XSLTPROC_PROCESS_MAN = \
1166         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1167         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
1168
1169 XSLTPROC_PROCESS_MAN_IN = \
1170         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1171         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
1172         mv ${@:.in=} $@
1173
1174 XSLTPROC_PROCESS_HTML = \
1175         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1176         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
1177
1178 XSLTPROC_PROCESS_HTML_IN = \
1179         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1180         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
1181         mv ${@:.in=} $@
1182
1183 man/%.1: man/%.xml
1184         $(XSLTPROC_PROCESS_MAN)
1185
1186 man/%.1.in: man/%.xml.in
1187         $(XSLTPROC_PROCESS_MAN)
1188
1189 man/%.3: man/%.xml
1190         $(XSLTPROC_PROCESS_MAN)
1191
1192 man/%.3.in: man/%.xml.in
1193         $(XSLTPROC_PROCESS_MAN)
1194
1195 man/%.5: man/%.xml
1196         $(XSLTPROC_PROCESS_MAN)
1197
1198 man/%.5.in: man/%.xml.in
1199         $(XSLTPROC_PROCESS_MAN)
1200
1201 man/%.7: man/%.xml
1202         $(XSLTPROC_PROCESS_MAN)
1203
1204 man/%.7.in: man/%.xml.in
1205         $(XSLTPROC_PROCESS_MAN_IN)
1206
1207 man/%.8: man/%.xml
1208         $(XSLTPROC_PROCESS_MAN)
1209
1210 man/%.8.in: man/%.xml.in
1211         $(XSLTPROC_PROCESS_MAN_IN)
1212
1213 man/%.html: man/%.xml
1214         $(XSLTPROC_PROCESS_HTML)
1215
1216 man/%.html.in: man/%.xml.in
1217         $(XSLTPROC_PROCESS_HTML_IN)
1218
1219 CLEANFILES += \
1220         $(dist_man_MANS) \
1221         ${nodist_man_MANS:=.in} \
1222         ${XML_FILES:.xml=.html} \
1223         ${XML_IN_FILES:.xml.in=.html.in}
1224 endif
1225
1226 DBUS_PREPROCESS = $(CPP) -P $(DBUS_CFLAGS) -imacros dbus/dbus-protocol.h
1227
1228 org.freedesktop.systemd1.%.xml: systemd
1229         $(AM_V_GEN)$(OBJCOPY) -O binary -j introspect.$* $< $@.tmp && \
1230                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1231                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1232
1233 CLEANFILES += \
1234         $(dbusinterface_DATA)
1235
1236 install-data-hook:
1237         $(MKDIR_P) -m 0755 \
1238                 $(DESTDIR)$(sysconfdir)/modules-load.d \
1239                 $(DESTDIR)$(tmpfilesdir) \
1240                 $(DESTDIR)$(sysconfdir)/sysctl.d \
1241                 $(DESTDIR)$(systemshutdowndir) \
1242                 $(DESTDIR)$(systemgeneratordir) \
1243                 $(DESTDIR)$(usergeneratordir)
1244         $(MKDIR_P) -m 0755 \
1245                 $(DESTDIR)$(systemunitdir) \
1246                 $(DESTDIR)$(userunitdir) \
1247                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
1248                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
1249                 $(DESTDIR)$(systemunitdir)/basic.target.wants \
1250                 $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
1251                 $(DESTDIR)$(systemunitdir)/local-fs.target.wants \
1252                 $(DESTDIR)$(systemunitdir)/runlevel1.target.wants \
1253                 $(DESTDIR)$(systemunitdir)/runlevel2.target.wants \
1254                 $(DESTDIR)$(systemunitdir)/runlevel3.target.wants \
1255                 $(DESTDIR)$(systemunitdir)/runlevel4.target.wants \
1256                 $(DESTDIR)$(systemunitdir)/runlevel5.target.wants \
1257                 $(DESTDIR)$(systemunitdir)/multi-user.target.wants \
1258                 $(DESTDIR)$(systemunitdir)/graphical.target.wants \
1259                 $(DESTDIR)$(pkgsysconfdir)/system \
1260                 $(DESTDIR)$(pkgsysconfdir)/system/sysinit.target.wants \
1261                 $(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants \
1262                 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
1263                 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
1264                 $(DESTDIR)$(pkgsysconfdir)/user \
1265                 $(DESTDIR)$(sysconfdir)/xdg/systemd
1266         ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
1267                 rm -f user && \
1268                 $(LN_S) $(pkgsysconfdir)/user user )
1269         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
1270                 rm -f systemd-initctl.socket systemd-logger.socket systemd-shutdownd.socket syslog.socket && \
1271                 $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
1272                 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket && \
1273                 $(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket && \
1274                 $(LN_S) ../syslog.socket syslog.socket )
1275         ( cd $(DESTDIR)$(systemunitdir)/runlevel1.target.wants && \
1276                 rm -f systemd-update-utmp-runlevel.service && \
1277                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1278         ( cd $(DESTDIR)$(systemunitdir)/runlevel2.target.wants && \
1279                 rm -f systemd-update-utmp-runlevel.service && \
1280                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1281         ( cd $(DESTDIR)$(systemunitdir)/runlevel3.target.wants && \
1282                 rm -f systemd-update-utmp-runlevel.service && \
1283                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1284         ( cd $(DESTDIR)$(systemunitdir)/runlevel4.target.wants && \
1285                 rm -f systemd-update-utmp-runlevel.service && \
1286                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1287         ( cd $(DESTDIR)$(systemunitdir)/runlevel5.target.wants && \
1288                 rm -f systemd-update-utmp-runlevel.service && \
1289                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1290         ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
1291                 rm -f systemd-update-utmp-shutdown.service \
1292                         hwclock-save.service \
1293                         systemd-random-seed-save.service && \
1294                 $(LN_S) ../systemd-update-utmp-shutdown.service systemd-update-utmp-shutdown.service && \
1295                 $(LN_S) ../hwclock-save.service hwclock-save.service && \
1296                 $(LN_S) ../systemd-random-seed-save.service systemd-random-seed-save.service )
1297         ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \
1298                 rm -f systemd-remount-api-vfs.service \
1299                         fsck-root.service \
1300                         remount-rootfs.service \
1301                         var-run.mount \
1302                         var-lock.mount \
1303                         media.mount && \
1304                 $(LN_S) ../systemd-remount-api-vfs.service systemd-remount-api-vfs.service && \
1305                 $(LN_S) ../fsck-root.service fsck-root.service && \
1306                 $(LN_S) ../remount-rootfs.service remount-rootfs.service && \
1307                 $(LN_S) ../var-run.mount var-run.mount && \
1308                 $(LN_S) ../var-lock.mount var-lock.mount && \
1309                 $(LN_S) ../media.mount media.mount )
1310         ( cd $(DESTDIR)$(userunitdir) && \
1311                 rm -f shutdown.target sockets.target local-fs.target swap.target bluetooth.target printer.target sound.target && \
1312                 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
1313                 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
1314                 $(LN_S) $(systemunitdir)/local-fs.target local-fs.target && \
1315                 $(LN_S) $(systemunitdir)/swap.target swap.target && \
1316                 $(LN_S) $(systemunitdir)/bluetooth.target bluetooth.target && \
1317                 $(LN_S) $(systemunitdir)/printer.target printer.target && \
1318                 $(LN_S) $(systemunitdir)/sound.target sound.target )
1319         ( cd $(DESTDIR)$(systemunitdir) && \
1320                 rm -f runlevel0.target runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target runlevel6.target && \
1321                 $(LN_S) poweroff.target runlevel0.target && \
1322                 $(LN_S) rescue.target runlevel1.target && \
1323                 $(LN_S) multi-user.target runlevel2.target && \
1324                 $(LN_S) multi-user.target runlevel3.target && \
1325                 $(LN_S) multi-user.target runlevel4.target && \
1326                 $(LN_S) graphical.target runlevel5.target && \
1327                 $(LN_S) reboot.target runlevel6.target )
1328         ( cd $(DESTDIR)$(systemunitdir) && \
1329                 rm -f default.target ctrl-alt-del.target && \
1330                 $(LN_S) graphical.target default.target && \
1331                 $(LN_S) reboot.target ctrl-alt-del.target )
1332         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1333                 rm -f getty.target systemd-user-sessions.service systemd-ask-password-wall.path && \
1334                 $(LN_S) ../getty.target getty.target && \
1335                 $(LN_S) ../systemd-user-sessions.service systemd-user-sessions.service && \
1336                 $(LN_S) ../systemd-ask-password-wall.path systemd-ask-password-wall.path )
1337         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
1338                 rm -f getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service && \
1339                 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service && \
1340                 $(LN_S) $(systemunitdir)/getty@.service getty@tty2.service && \
1341                 $(LN_S) $(systemunitdir)/getty@.service getty@tty3.service && \
1342                 $(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \
1343                 $(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
1344                 $(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
1345         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
1346                 rm -f remote-fs.target && \
1347                 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
1348         ( cd $(DESTDIR)$(pkgsysconfdir)/system/sysinit.target.wants && \
1349                 rm -f hwclock-load.service && \
1350                 $(LN_S) $(systemunitdir)/hwclock-load.service hwclock-load.service )
1351         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1352                 rm -f dev-hugepages.automount \
1353                         dev-mqueue.automount \
1354                         proc-sys-fs-binfmt_misc.automount \
1355                         sys-kernel-debug.automount \
1356                         sys-kernel-security.automount \
1357                         systemd-vconsole-setup.service \
1358                         systemd-modules-load.service \
1359                         systemd-random-seed-load.service \
1360                         systemd-tmpfiles-setup.service \
1361                         systemd-sysctl.service \
1362                         systemd-ask-password-console.path \
1363                         systemd-kmsg-syslogd.service \
1364                         cryptsetup.target && \
1365                 $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
1366                 $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
1367                 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \
1368                 $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \
1369                 $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount && \
1370                 $(LN_S) ../systemd-vconsole-setup.service systemd-vconsole-setup.service && \
1371                 $(LN_S) ../systemd-modules-load.service systemd-modules-load.service && \
1372                 $(LN_S) ../systemd-random-seed-load.service systemd-random-seed-load.service && \
1373                 $(LN_S) ../systemd-tmpfiles-setup.service systemd-tmpfiles-setup.service && \
1374                 $(LN_S) ../systemd-sysctl.service systemd-sysctl.service && \
1375                 $(LN_S) ../systemd-ask-password-console.path systemd-ask-password-console.path && \
1376                 $(LN_S) ../systemd-kmsg-syslogd.service && \
1377                 $(LN_S) ../cryptsetup.target cryptsetup.target )
1378         ( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
1379                 rm -f systemd-tmpfiles-clean.timer && \
1380                 $(LN_S) ../systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.timer )
1381         ( cd $(DESTDIR)$(dbussessionservicedir) && \
1382                 rm -f org.freedesktop.systemd1.service && \
1383                 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
1384 if HAVE_PLYMOUTH
1385         $(MKDIR_P) -m 0755 \
1386                 $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) \
1387                 $(DESTDIR)$(systemunitdir)/reboot.target.wants \
1388                 $(DESTDIR)$(systemunitdir)/kexec.target.wants \
1389                 $(DESTDIR)$(systemunitdir)/poweroff.target.wants \
1390                 $(DESTDIR)$(systemunitdir)/halt.target.wants
1391         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1392                 rm -f plymouth-start.service plymouth-read-write.service && \
1393                 $(LN_S) ../plymouth-start.service plymouth-start.service && \
1394                 $(LN_S) ../plymouth-read-write.service plymouth-read-write.service )
1395         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1396                 rm -f plymouth-quit.service plymouth-quit-wait.service && \
1397                 $(LN_S) ../plymouth-quit.service plymouth-quit.service && \
1398                 $(LN_S) ../plymouth-quit-wait.service plymouth-quit-wait.service )
1399         ( cd $(DESTDIR)$(systemunitdir)/reboot.target.wants && \
1400                 rm -f plymouth-reboot.service && \
1401                 $(LN_S) ../plymouth-reboot.service plymouth-reboot.service )
1402         ( cd $(DESTDIR)$(systemunitdir)/kexec.target.wants && \
1403                 rm -f plymouth-kexec.service && \
1404                 $(LN_S) ../plymouth-kexec.service plymouth-kexec.service )
1405         ( cd $(DESTDIR)$(systemunitdir)/poweroff.target.wants && \
1406                 rm -f plymouth-poweroff.service && \
1407                 $(LN_S) ../plymouth-poweroff.service plymouth-poweroff.service )
1408         ( cd $(DESTDIR)$(systemunitdir)/halt.target.wants && \
1409                 rm -f plymouth-halt.service && \
1410                 $(LN_S) ../plymouth-halt.service plymouth-halt.service )
1411 endif
1412
1413 if TARGET_FEDORA
1414         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
1415         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1416                 rm -f rc-local.service && \
1417                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
1418         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
1419                 rm -f halt-local.service && \
1420                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
1421         ( cd $(DESTDIR)$(systemunitdir) && \
1422                 rm -f display-manager.service single.service && \
1423                 $(LN_S) prefdm.service display-manager.service && \
1424                 $(LN_S) rescue.service single.service )
1425         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
1426                 rm -f display-manager.service && \
1427                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
1428 endif
1429
1430 if TARGET_MANDRIVA
1431         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
1432         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1433                 rm -f rc-local.service && \
1434                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
1435         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
1436                 rm -f halt-local.service && \
1437                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
1438         ( cd $(DESTDIR)$(systemunitdir) && \
1439                 rm -f display-manager.service dm.service single.service && \
1440                 $(LN_S) prefdm.service display-manager.service && \
1441                 $(LN_S) prefdm.service dm.service && \
1442                 $(LN_S) rescue.service single.service )
1443         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
1444                 rm -f display-manager.service && \
1445                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
1446 endif
1447
1448 if TARGET_DEBIAN_OR_UBUNTU
1449         ( cd $(DESTDIR)$(systemunitdir) && \
1450                 rm -f runlevel5.target && \
1451                 $(LN_S) multi-user.target runlevel5.target )
1452 endif
1453
1454 DISTCHECK_CONFIGURE_FLAGS = \
1455         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
1456         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
1457         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
1458         --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
1459         --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
1460         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
1461         --with-rootdir=$$dc_install_base/$(rootdir)
1462
1463 upload: all distcheck
1464         cp -v systemd-$(VERSION).tar.bz2 /home/lennart/git.fedora/systemd/
1465         scp systemd-$(VERSION).tar.bz2 fdo:/srv/www.freedesktop.org/www/software/systemd/
1466         scp man/*.html tango:public/systemd-man/
1467
1468 git-tag:
1469         git tag "v$(VERSION)" -m "systemd $(VERSION)"