chiark / gitweb /
readahead: fix SSD check
[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
30 # Our own, non-special dirs
31 pkgsysconfdir=$(sysconfdir)/systemd
32 sessionunitdir=$(pkgdatadir)/session
33
34 # And these are the special ones for /
35 rootdir=@rootdir@
36 rootbindir=$(rootdir)/bin
37 rootlibexecdir=$(rootdir)/lib/systemd
38 systemunitdir=$(rootdir)/lib/systemd/system
39
40 AM_CPPFLAGS = \
41         -include $(top_builddir)/config.h \
42         -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \
43         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
44         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
45         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
46         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
47         -DSESSION_CONFIG_FILE=\"$(pkgsysconfdir)/session.conf\" \
48         -DSESSION_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/session\" \
49         -DSESSION_DATA_UNIT_PATH=\"$(sessionunitdir)\" \
50         -DCGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
51         -DSYSTEMD_BINARY_PATH=\"$(rootbindir)/systemd\" \
52         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
53         -DRUNTIME_DIR=\"$(localstatedir)/run\" \
54         -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
55         -I $(top_srcdir)/src
56
57 if TARGET_GENTOO
58 AM_CPPFLAGS += \
59         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
60         -DKBD_SETFONT=\"/usr/bin/setfont\" \
61         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
62 else
63 AM_CPPFLAGS += \
64         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
65         -DKBD_SETFONT=\"/bin/setfont\" \
66         -DDEFAULT_FONT=\"latarcyrheb-sun16\"
67 endif
68
69 rootbin_PROGRAMS = \
70         systemd \
71         systemctl \
72         systemd-notify \
73         systemd-ask-password
74
75 bin_PROGRAMS = \
76         systemd-cgls
77
78 if HAVE_GTK
79 bin_PROGRAMS += \
80         systemadm \
81         systemd-ask-password-agent
82 endif
83
84 rootlibexec_PROGRAMS = \
85         systemd-logger \
86         systemd-cgroups-agent \
87         systemd-initctl \
88         systemd-update-utmp \
89         systemd-random-seed \
90         systemd-shutdownd \
91         systemd-modules-load \
92         systemd-remount-api-vfs \
93         systemd-kmsg-syslogd \
94         systemd-vconsole-setup \
95         systemd-reply-password \
96         systemd-readahead-collect \
97         systemd-readahead-replay \
98         systemd-tempfiles
99
100 noinst_PROGRAMS = \
101         test-engine \
102         test-job-type \
103         test-ns \
104         test-loopback \
105         test-hostname \
106         test-daemon \
107         test-cgroup \
108         test-env-replace
109
110 if HAVE_PAM
111 pamlib_LTLIBRARIES = \
112         pam_systemd.la
113 endif
114
115 dist_pkgsysconf_DATA = \
116         src/system.conf
117
118 dist_dbuspolicy_DATA = \
119         src/org.freedesktop.systemd1.conf
120
121 dist_dbussystemservice_DATA = \
122         src/org.freedesktop.systemd1.service
123
124 dist_udevrules_DATA = \
125         src/99-systemd.rules
126
127 dbusinterface_DATA = \
128         org.freedesktop.systemd1.Manager.xml \
129         org.freedesktop.systemd1.Job.xml \
130         org.freedesktop.systemd1.Unit.xml \
131         org.freedesktop.systemd1.Service.xml \
132         org.freedesktop.systemd1.Socket.xml \
133         org.freedesktop.systemd1.Timer.xml \
134         org.freedesktop.systemd1.Target.xml \
135         org.freedesktop.systemd1.Device.xml \
136         org.freedesktop.systemd1.Mount.xml \
137         org.freedesktop.systemd1.Automount.xml \
138         org.freedesktop.systemd1.Snapshot.xml \
139         org.freedesktop.systemd1.Swap.xml \
140         org.freedesktop.systemd1.Path.xml
141
142 dist_systemunit_DATA = \
143         units/emergency.service \
144         units/emergency.target \
145         units/basic.target \
146         units/getty.target \
147         units/halt.target \
148         units/local-fs.target \
149         units/network.target \
150         units/nss-lookup.target \
151         units/mail-transfer-agent.target \
152         units/http-daemon.target \
153         units/poweroff.target \
154         units/reboot.target \
155         units/rescue.target \
156         units/rpcbind.target \
157         units/rtc-set.target \
158         units/shutdown.target \
159         units/umount.target \
160         units/sigpwr.target \
161         units/sockets.target \
162         units/swap.target \
163         units/dbus.target \
164         units/systemd-initctl.socket \
165         units/systemd-logger.socket \
166         units/systemd-shutdownd.socket \
167         units/systemd-kmsg-syslogd.socket \
168         units/dev-hugepages.automount \
169         units/dev-hugepages.mount \
170         units/dev-mqueue.automount \
171         units/dev-mqueue.mount \
172         units/proc-sys-fs-binfmt_misc.automount \
173         units/proc-sys-fs-binfmt_misc.mount \
174         units/sys-kernel-debug.automount \
175         units/sys-kernel-debug.mount \
176         units/sys-kernel-security.automount \
177         units/sys-kernel-security.mount \
178         units/tmp.mount \
179         units/tmp.service \
180         units/var-lock.mount \
181         units/var-lock.service \
182         units/var-run.mount \
183         units/var-run.service \
184         units/hwclock-load.service \
185         units/hwclock-save.service \
186         units/sysctl.service \
187         units/remount-rootfs.service \
188         units/printer.target \
189         units/bluetooth.target \
190         units/smartcard.target \
191         units/tmpwatch.service \
192         units/tmpwatch.timer
193
194 nodist_systemunit_DATA = \
195         units/sysinit.target \
196         units/getty@.service \
197         units/serial-getty@.service \
198         units/graphical.target \
199         units/remote-fs.target \
200         units/multi-user.target \
201         units/systemd-initctl.service \
202         units/systemd-logger.service \
203         units/systemd-shutdownd.service \
204         units/systemd-kmsg-syslogd.service \
205         units/systemd-modules-load.service \
206         units/systemd-vconsole-setup.service \
207         units/systemd-remount-api-vfs.service \
208         units/systemd-update-utmp-runlevel.service \
209         units/systemd-update-utmp-shutdown.service \
210         units/systemd-random-seed-save.service \
211         units/systemd-random-seed-load.service \
212         units/systemd-readahead-collect.service \
213         units/systemd-readahead-replay.service \
214         units/syslog.target
215
216 dist_sessionunit_DATA = \
217         units/session/default.target
218
219 nodist_sessionunit_DATA = \
220         units/session/remote-fs.target \
221         units/session/exit.service
222
223 EXTRA_DIST = \
224         units/sysinit.target.m4 \
225         units/getty@.service.m4 \
226         units/serial-getty@.service.m4 \
227         units/graphical.target.m4 \
228         units/multi-user.target.m4 \
229         units/remote-fs.target.m4 \
230         units/systemd-initctl.service.in \
231         units/systemd-logger.service.in \
232         units/systemd-shutdownd.service.in \
233         units/systemd-kmsg-syslogd.service.in \
234         units/systemd-modules-load.service.in \
235         units/systemd-vconsole-setup.service.in \
236         units/systemd-remount-api-vfs.service.in \
237         units/systemd-update-utmp-runlevel.service.in \
238         units/systemd-update-utmp-shutdown.service.in \
239         units/systemd-random-seed-save.service.in \
240         units/systemd-random-seed-load.service.in \
241         units/systemd-readahead-collect.service.in \
242         units/systemd-readahead-replay.service.in \
243         units/syslog.target.in \
244         units/session/exit.service.in \
245         systemd.pc.in
246
247 if TARGET_FEDORA
248 dist_systemunit_DATA += \
249         units/fedora/halt.service \
250         units/fedora/killall.service \
251         units/fedora/poweroff.service \
252         units/fedora/prefdm.service \
253         units/fedora/rc-local.service \
254         units/fedora/reboot.service \
255         units/fedora/sysinit.service \
256         units/fedora/single.service \
257         units/fedora/plymouth-quit.service \
258         units/fedora/plymouth-reboot.service \
259         units/fedora/plymouth-poweroff.service \
260         units/fedora/plymouth-halt.service
261 endif
262
263 if TARGET_DEBIAN
264 dist_systemunit_DATA += \
265         units/debian/halt.service \
266         units/debian/killall.service \
267         units/debian/poweroff.service \
268         units/debian/reboot.service \
269         units/debian/fsck.target \
270         units/debian/umountfs.service \
271         units/debian/umountnfs.service \
272         units/debian/umountroot.service
273 endif
274
275 if TARGET_SUSE
276 dist_systemunit_DATA += \
277         units/suse/halt.service \
278         units/suse/poweroff.service \
279         units/suse/reboot.service \
280         units/suse/fsck.target
281 endif
282
283 if TARGET_GENTOO
284 dist_systemunit_DATA += \
285         units/gentoo/halt.service \
286         units/gentoo/killall.service \
287         units/gentoo/poweroff.service \
288         units/gentoo/reboot.service \
289         units/gentoo/xdm.service
290 endif
291
292 if TARGET_ARCH
293 dist_systemunit_DATA += \
294         units/arch/sysinit.service \
295         units/arch/rc-local.service \
296         units/arch/halt.service \
297         units/arch/poweroff.service \
298         units/arch/reboot.service
299 endif
300
301 dist_doc_DATA = \
302         README \
303         LICENSE \
304         DISTRO_PORTING \
305         src/sd-daemon.h \
306         src/sd-daemon.c
307
308 pkgconfigdata_DATA = \
309         systemd.pc
310
311 dist_polkitpolicy_DATA = \
312         src/org.freedesktop.systemd1.policy
313
314 noinst_LTLIBRARIES = \
315         libsystemd-basic.la \
316         libsystemd-core.la
317
318 libsystemd_basic_la_SOURCES = \
319         src/util.c \
320         src/label.c \
321         src/hashmap.c \
322         src/set.c \
323         src/strv.c \
324         src/conf-parser.c \
325         src/socket-util.c \
326         src/log.c \
327         src/ratelimit.c
328
329 libsystemd_basic_la_CFLAGS = \
330         $(AM_CFLAGS) \
331         $(SELINUX_CFLAGS)
332
333 libsystemd_basic_la_LIBADD = \
334         $(SELINUX_LIBS)
335
336 libsystemd_core_la_SOURCES = \
337         src/unit.c \
338         src/job.c \
339         src/manager.c \
340         src/path-lookup.c \
341         src/load-fragment.c \
342         src/service.c \
343         src/automount.c \
344         src/mount.c \
345         src/swap.c \
346         src/device.c \
347         src/target.c \
348         src/snapshot.c \
349         src/socket.c \
350         src/timer.c \
351         src/path.c \
352         src/load-dropin.c \
353         src/execute.c \
354         src/exit-status.c \
355         src/dbus.c \
356         src/dbus-manager.c \
357         src/dbus-unit.c \
358         src/dbus-job.c \
359         src/dbus-service.c \
360         src/dbus-socket.c \
361         src/dbus-timer.c \
362         src/dbus-target.c \
363         src/dbus-mount.c \
364         src/dbus-automount.c \
365         src/dbus-swap.c \
366         src/dbus-snapshot.c \
367         src/dbus-device.c \
368         src/dbus-execute.c \
369         src/dbus-path.c \
370         src/cgroup.c \
371         src/mount-setup.c \
372         src/hostname-setup.c \
373         src/loopback-setup.c \
374         src/kmod-setup.c \
375         src/locale-setup.c \
376         src/specifier.c \
377         src/unit-name.c \
378         src/fdset.c \
379         src/namespace.c \
380         src/tcpwrap.c \
381         src/cgroup-util.c
382
383 libsystemd_core_la_CFLAGS = \
384         $(AM_CFLAGS) \
385         $(DBUS_CFLAGS) \
386         $(UDEV_CFLAGS) \
387         $(LIBWRAP_CFLAGS) \
388         $(PAM_CFLAGS) \
389         $(AUDIT_CFLAGS)
390
391 libsystemd_core_la_LIBADD = \
392         libsystemd-basic.la \
393         $(DBUS_LIBS) \
394         $(UDEV_LIBS) \
395         $(LIBWRAP_LIBS) \
396         $(PAM_LIBS) \
397         $(AUDIT_LIBS)
398
399 # This is needed because automake is buggy in how it generates the
400 # rules for C programs, but not Vala programs.  We therefore can't
401 # list the .h files as dependencies if we want make dist to work.
402
403 EXTRA_DIST += \
404         ${libsystemd_basic_la_SOURCES:.c=.h} \
405         ${libsystemd_core_la_SOURCES:.c=.h} \
406         src/macro.h \
407         src/ioprio.h \
408         src/missing.h \
409         src/list.h \
410         src/securebits.h \
411         src/linux/auto_dev-ioctl.h \
412         src/linux/fanotify.h \
413         src/initreq.h \
414         src/sd-daemon.h \
415         src/special.h \
416         src/dbus-common.h \
417         src/bus-errors.h \
418         src/cgroup-show.h \
419         src/utmp-wtmp.h \
420         src/build.h \
421         src/shutdownd.h \
422         src/readahead-common.h
423
424 MANPAGES = \
425         man/systemd.1 \
426         man/systemctl.1 \
427         man/systemadm.1 \
428         man/systemd-cgls.1 \
429         man/systemd-notify.1 \
430         man/sd_notify.3 \
431         man/sd_readahead.3 \
432         man/sd_booted.3 \
433         man/sd_listen_fds.3 \
434         man/sd_is_fifo.3 \
435         man/systemd.unit.5 \
436         man/systemd.service.5 \
437         man/systemd.socket.5 \
438         man/systemd.mount.5 \
439         man/systemd.automount.5 \
440         man/systemd.swap.5 \
441         man/systemd.timer.5 \
442         man/systemd.path.5 \
443         man/systemd.target.5 \
444         man/systemd.device.5 \
445         man/systemd.snapshot.5 \
446         man/systemd.exec.5 \
447         man/daemon.7 \
448         man/sd-daemon.7 \
449         man/runlevel.8 \
450         man/telinit.8 \
451         man/halt.8 \
452         man/shutdown.8 \
453         man/pam_systemd.8 \
454         man/systemd.conf.5
455
456 MANPAGES_ALIAS = \
457         man/reboot.8 \
458         man/poweroff.8 \
459         man/sd_is_socket.3 \
460         man/sd_is_socket_unix.3 \
461         man/sd_is_socket_inet.3 \
462         man/sd_notifyf.3 \
463         man/init.1
464
465 man/reboot.8: man/halt.8
466 man/poweroff.8: man/halt.8
467 man/sd_is_socket.3: man/sd_is_fifo.3
468 man/sd_is_socket_unix.3: man/sd_is_fifo.3
469 man/sd_is_socket_inet.3: man/sd_is_fifo.3
470 man/sd_notifyf.3: man/sd_notify.3
471 man/init.1: man/systemd.1
472
473 dist_man_MANS = \
474         $(MANPAGES) \
475         $(MANPAGES_ALIAS)
476
477 nodist_man_MANS = \
478         man/systemd.special.7
479
480 XML_FILES = \
481         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
482
483 XML_IN_FILES = \
484         ${patsubst %.1,%.xml.in,${patsubst %.3,%.xml.in,${patsubst %.5,%.xml.in,${patsubst %.7,%.xml.in,${patsubst %.8,%.xml.in,$(nodist_man_MANS)}}}}}
485
486 dist_noinst_DATA = \
487         ${XML_FILES:.xml=.html}
488
489 nodist_noinst_DATA = \
490         ${XML_IN_FILES:.xml.in=.html}
491
492 EXTRA_DIST += \
493         $(XML_FILES) \
494         $(XML_IN_FILES) \
495         ${nodist_man_MANS:=.in} \
496         ${XML_IN_FILES:.xml.in=.html.in}
497
498 systemd_SOURCES = \
499         src/main.c
500
501 systemd_CFLAGS = \
502         $(AM_CFLAGS) \
503         $(DBUS_CFLAGS) \
504         $(UDEV_CFLAGS)
505
506 systemd_LDADD = \
507         libsystemd-core.la
508
509 test_engine_SOURCES = \
510         src/test-engine.c
511
512 test_engine_CFLAGS = $(systemd_CFLAGS)
513 test_engine_LDADD = $(systemd_LDADD)
514
515 test_job_type_SOURCES = \
516         src/test-job-type.c
517
518 test_job_type_CFLAGS = $(systemd_CFLAGS)
519 test_job_type_LDADD = $(systemd_LDADD)
520
521 test_ns_SOURCES = \
522         src/test-ns.c
523
524 test_ns_CFLAGS = $(systemd_CFLAGS)
525 test_ns_LDADD = $(systemd_LDADD)
526
527 test_loopback_SOURCES = \
528         src/test-loopback.c \
529         src/loopback-setup.c
530
531 test_loopback_LDADD = \
532         libsystemd-basic.la
533
534 test_hostname_SOURCES = \
535         src/test-hostname.c \
536         src/hostname-setup.c
537
538 test_hostname_LDADD = \
539         libsystemd-basic.la
540
541 test_daemon_SOURCES = \
542         src/test-daemon.c \
543         src/sd-daemon.c
544
545 test_daemon_LDADD = \
546         libsystemd-basic.la
547
548 test_cgroup_SOURCES = \
549         src/test-cgroup.c \
550         src/cgroup-util.c
551
552 test_cgroup_CFLAGS = \
553         $(AM_CFLAGS)
554
555 test_cgroup_LDADD = \
556         libsystemd-basic.la
557
558 test_env_replace_SOURCES = \
559         src/test-env-replace.c
560
561 test_env_replace_CFLAGS = \
562         $(AM_CFLAGS)
563
564 test_env_replace_LDADD = \
565         libsystemd-basic.la
566
567 systemd_logger_SOURCES = \
568         src/logger.c \
569         src/sd-daemon.c \
570         src/tcpwrap.c
571
572 systemd_logger_LDADD = \
573         libsystemd-basic.la \
574         $(LIBWRAP_LIBS)
575
576 systemd_initctl_SOURCES = \
577         src/initctl.c \
578         src/sd-daemon.c \
579         src/dbus-common.c
580
581 systemd_initctl_CFLAGS = \
582         $(AM_CFLAGS) \
583         $(DBUS_CFLAGS)
584
585 systemd_initctl_LDADD = \
586         libsystemd-basic.la \
587         $(DBUS_LIBS)
588
589 systemd_update_utmp_SOURCES = \
590         src/update-utmp.c \
591         src/dbus-common.c \
592         src/utmp-wtmp.c
593
594 systemd_update_utmp_CFLAGS = \
595         $(AM_CFLAGS) \
596         $(DBUS_CFLAGS) \
597         $(AUDIT_CFLAGS)
598
599 systemd_update_utmp_LDADD = \
600         libsystemd-basic.la \
601         $(DBUS_LIBS) \
602         $(AUDIT_LIBS)
603
604 systemd_random_seed_SOURCES = \
605         src/random-seed.c
606
607 systemd_random_seed_CFLAGS = \
608         $(AM_CFLAGS)
609
610 systemd_random_seed_LDADD = \
611         libsystemd-basic.la
612
613 systemd_shutdownd_SOURCES = \
614         src/utmp-wtmp.c \
615         src/sd-daemon.c \
616         src/shutdownd.c
617
618 systemd_shutdownd_CFLAGS = \
619         $(AM_CFLAGS)
620
621 systemd_shutdownd_LDADD = \
622         libsystemd-basic.la
623
624 systemd_modules_load_SOURCES = \
625         src/modules-load.c
626
627 systemd_modules_load_CFLAGS = \
628         $(AM_CFLAGS)
629
630 systemd_tempfiles_LDADD = \
631         libsystemd-basic.la
632
633 systemd_tempfiles_SOURCES = \
634         src/tempfiles.c
635
636 systemd_tempfiles_CFLAGS = \
637         $(AM_CFLAGS)
638
639 systemd_modules_load_LDADD = \
640         libsystemd-basic.la
641
642 systemd_vconsole_setup_SOURCES = \
643         src/vconsole-setup.c
644
645 systemd_vconsole_setup_CFLAGS = \
646         $(AM_CFLAGS)
647
648 systemd_vconsole_setup_LDADD = \
649         libsystemd-basic.la
650
651 systemd_remount_api_vfs_SOURCES = \
652         src/remount-api-vfs.c \
653         src/mount-setup.c
654
655 systemd_remount_api_vfs_CFLAGS = \
656         $(AM_CFLAGS)
657
658 systemd_remount_api_vfs_LDADD = \
659         libsystemd-basic.la
660
661 systemd_cgroups_agent_SOURCES = \
662         src/cgroups-agent.c \
663         src/dbus-common.c
664
665 systemd_cgroups_agent_CFLAGS = \
666         $(AM_CFLAGS) \
667         $(DBUS_CFLAGS)
668
669 systemd_cgroups_agent_LDADD = \
670         libsystemd-basic.la \
671         $(DBUS_LIBS)
672
673 systemd_kmsg_syslogd_SOURCES = \
674         src/kmsg-syslogd.c \
675         src/sd-daemon.c \
676         src/fdset.c
677
678 systemd_kmsg_syslogd_CFLAGS = \
679         $(AM_CFLAGS)
680
681 systemd_kmsg_syslogd_LDADD = \
682         libsystemd-basic.la
683
684 systemctl_SOURCES = \
685         src/systemctl.c \
686         src/utmp-wtmp.c \
687         src/dbus-common.c \
688         src/path-lookup.c \
689         src/sd-daemon.c \
690         src/cgroup-show.c \
691         src/cgroup-util.c \
692         src/exit-status.c
693
694 systemctl_CFLAGS = \
695         $(AM_CFLAGS) \
696         $(DBUS_CFLAGS)
697
698 systemctl_LDADD = \
699         libsystemd-basic.la \
700         $(DBUS_LIBS)
701
702 systemd_notify_SOURCES = \
703         src/notify.c \
704         src/sd-daemon.c
705
706 systemd_notify_LDADD = \
707         libsystemd-basic.la
708
709 systemd_ask_password_SOURCES = \
710         src/ask-password.c
711
712 systemd_ask_password_LDADD = \
713         libsystemd-basic.la
714
715 systemd_reply_password_SOURCES = \
716         src/reply-password.c
717
718 systemd_reply_password_LDADD = \
719         libsystemd-basic.la
720
721 systemd_readahead_collect_SOURCES = \
722         src/readahead-collect.c \
723         src/sd-daemon.c \
724         src/readahead-common.c
725
726 systemd_readahead_collect_CFLAGS = \
727         $(UDEV_CFLAGS)
728
729 systemd_readahead_collect_LDADD = \
730         libsystemd-basic.la \
731         $(UDEV_LIBS)
732
733 systemd_readahead_replay_SOURCES = \
734         src/readahead-replay.c \
735         src/sd-daemon.c \
736         src/readahead-common.c
737
738 systemd_readahead_replay_CFLAGS = \
739         $(UDEV_CFLAGS)
740
741 systemd_readahead_replay_LDADD = \
742         libsystemd-basic.la \
743         $(UDEV_LIBS)
744
745 systemd_cgls_SOURCES = \
746         src/cgls.c \
747         src/cgroup-show.c \
748         src/cgroup-util.c
749
750 systemd_cgls_CFLAGS = \
751         $(AM_CFLAGS)
752
753 systemd_cgls_LDADD = \
754         libsystemd-basic.la
755
756 systemadm_SOURCES = \
757         src/systemadm.vala \
758         src/systemd-interfaces.vala
759
760 systemadm_CFLAGS = \
761         $(AM_CFLAGS) \
762         $(DBUSGLIB_CFLAGS) \
763         $(GTK_CFLAGS) \
764         -Wno-unused-variable \
765         -Wno-unused-function \
766         -Wno-shadow \
767         -Wno-format-nonliteral
768
769 systemadm_VALAFLAGS = \
770         --pkg=dbus-glib-1 \
771         --pkg=posix \
772         --pkg=gtk+-2.0 \
773         -g
774
775 systemadm_LDADD = \
776         $(DBUSGLIB_LIBS) \
777         $(GTK_LIBS)
778
779 systemd_ask_password_agent_SOURCES = \
780         src/ask-password-agent.vala
781
782 systemd_ask_password_agent_CFLAGS = \
783         $(AM_CFLAGS) \
784         $(DBUSGLIB_CFLAGS) \
785         $(GTK_CFLAGS) \
786         -Wno-unused-variable \
787         -Wno-unused-function \
788         -Wno-shadow \
789         -Wno-format-nonliteral
790
791 systemd_ask_password_agent_VALAFLAGS = \
792         --pkg=dbus-glib-1 \
793         --pkg=posix \
794         --pkg=gtk+-2.0 \
795         --pkg=linux \
796         --pkg=gio-unix-2.0 \
797         --pkg=libnotify \
798         -g
799
800 systemd_ask_password_agent_LDADD = \
801         $(DBUSGLIB_LIBS) \
802         $(GTK_LIBS)
803
804 pam_systemd_la_SOURCES = \
805         src/pam-module.c \
806         src/cgroup-util.c \
807         src/sd-daemon.c
808
809 pam_systemd_la_CFLAGS = \
810         $(AM_CFLAGS)
811         -fvisibility=hidden
812
813 pam_systemd_la_LDFLAGS = \
814         -module \
815         -export-dynamic \
816         -avoid-version \
817         -shared \
818         -export-symbols-regex '^pam_sm_.*'
819
820 pam_systemd_la_LIBADD = \
821         libsystemd-basic.la \
822         $(PAM_LIBS)
823
824 SED_PROCESS = \
825         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
826         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
827                 -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
828                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
829                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
830                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
831                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
832                 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
833                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
834                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
835                 -e 's,@prefix\@,$(prefix),g' \
836                 < $< > $@
837
838 units/%: units/%.in Makefile
839         $(SED_PROCESS)
840
841 man/%: man/%.in Makefile
842         $(SED_PROCESS)
843
844 %.pc: %.pc.in Makefile
845         $(SED_PROCESS)
846
847 M4_PROCESS_SYSTEM = \
848         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
849         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@
850
851 M4_PROCESS_SESSION = \
852         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
853         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SESSION=1 < $< > $@
854
855 units/%: units/%.m4 Makefile
856         $(M4_PROCESS_SYSTEM)
857
858 units/session/%: units/%.m4 Makefile
859         $(M4_PROCESS_SESSION)
860
861 CLEANFILES = \
862         $(nodist_systemunit_DATA) \
863         $(nodist_sessionunit_DATA) \
864         $(nodist_man_MANS) \
865         ${XML_IN_FILES:.xml.in=.html} \
866         $(pkgconfigdata_DATA)
867
868 if HAVE_VALAC
869 CLEANFILES += \
870         ${systemadm_SOURCES:.vala=.c}
871 endif
872
873 if HAVE_XSLTPROC
874 XSLTPROC_FLAGS = \
875         --nonet \
876         --param funcsynopsis.style "'ansi'"
877
878 XSLTPROC_PROCESS_MAN = \
879         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
880         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
881
882 XSLTPROC_PROCESS_MAN_IN = \
883         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
884         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
885         mv ${@:.in=} $@
886
887 XSLTPROC_PROCESS_HTML = \
888         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
889         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
890
891 XSLTPROC_PROCESS_HTML_IN = \
892         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
893         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
894         mv ${@:.in=} $@
895
896 man/%.1: man/%.xml
897         $(XSLTPROC_PROCESS_MAN)
898
899 man/%.1.in: man/%.xml.in
900         $(XSLTPROC_PROCESS_MAN)
901
902 man/%.3: man/%.xml
903         $(XSLTPROC_PROCESS_MAN)
904
905 man/%.3.in: man/%.xml.in
906         $(XSLTPROC_PROCESS_MAN)
907
908 man/%.5: man/%.xml
909         $(XSLTPROC_PROCESS_MAN)
910
911 man/%.5.in: man/%.xml.in
912         $(XSLTPROC_PROCESS_MAN)
913
914 man/%.7: man/%.xml
915         $(XSLTPROC_PROCESS_MAN)
916
917 man/%.7.in: man/%.xml.in
918         $(XSLTPROC_PROCESS_MAN_IN)
919
920 man/%.8: man/%.xml
921         $(XSLTPROC_PROCESS_MAN)
922
923 man/%.8.in: man/%.xml.in
924         $(XSLTPROC_PROCESS_MAN_IN)
925
926 man/%.html: man/%.xml
927         $(XSLTPROC_PROCESS_HTML)
928
929 man/%.html.in: man/%.xml.in
930         $(XSLTPROC_PROCESS_HTML_IN)
931
932 CLEANFILES += \
933         $(dist_man_MANS) \
934         ${nodist_man_MANS:=.in} \
935         ${XML_FILES:.xml=.html} \
936         ${XML_IN_FILES:.xml.in=.html.in}
937 endif
938
939 org.freedesktop.systemd1.%.xml: systemd
940         $(AM_V_GEN)SYSTEMD_SKIP_API_MOUNTS=1 ./systemd --introspect=${@:.xml=} > $@
941
942 CLEANFILES += \
943         $(dbusinterface_DATA)
944
945 install-data-hook:
946         $(MKDIR_P) -m 0755 \
947                 $(DESTDIR)$(systemunitdir) \
948                 $(DESTDIR)$(sessionunitdir) \
949                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
950                 $(DESTDIR)$(systemunitdir)/basic.target.wants \
951                 $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
952                 $(DESTDIR)$(systemunitdir)/local-fs.target.wants \
953                 $(DESTDIR)$(systemunitdir)/runlevel1.target.wants \
954                 $(DESTDIR)$(systemunitdir)/runlevel2.target.wants \
955                 $(DESTDIR)$(systemunitdir)/runlevel3.target.wants \
956                 $(DESTDIR)$(systemunitdir)/runlevel4.target.wants \
957                 $(DESTDIR)$(systemunitdir)/runlevel5.target.wants \
958                 $(DESTDIR)$(systemunitdir)/multi-user.target.wants \
959                 $(DESTDIR)$(pkgsysconfdir)/system \
960                 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
961                 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
962                 $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants \
963                 $(DESTDIR)$(pkgsysconfdir)/session \
964                 $(DESTDIR)$(sysconfdir)/xdg/systemd
965         ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
966                 rm -f session && \
967                 $(LN_S) $(pkgsysconfdir)/session session )
968         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
969                 rm -f systemd-initctl.socket systemd-logger.socket systemd-shutdownd.socket && \
970                 $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
971                 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket && \
972                 $(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket )
973         ( cd $(DESTDIR)$(systemunitdir)/runlevel1.target.wants && \
974                 rm -f systemd-update-utmp-runlevel.service && \
975                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
976         ( cd $(DESTDIR)$(systemunitdir)/runlevel2.target.wants && \
977                 rm -f systemd-update-utmp-runlevel.service && \
978                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
979         ( cd $(DESTDIR)$(systemunitdir)/runlevel3.target.wants && \
980                 rm -f systemd-update-utmp-runlevel.service && \
981                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
982         ( cd $(DESTDIR)$(systemunitdir)/runlevel4.target.wants && \
983                 rm -f systemd-update-utmp-runlevel.service && \
984                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
985         ( cd $(DESTDIR)$(systemunitdir)/runlevel5.target.wants && \
986                 rm -f systemd-update-utmp-runlevel.service && \
987                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
988         ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
989                 rm -f systemd-update-utmp-shutdown.service \
990                         hwclock-save.service \
991                         systemd-random-seed-save.service && \
992                 $(LN_S) ../systemd-update-utmp-shutdown.service systemd-update-utmp-shutdown.service && \
993                 $(LN_S) ../hwclock-save.service hwclock-save.service && \
994                 $(LN_S) ../systemd-random-seed-save.service systemd-random-seed-save.service )
995         ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \
996                 rm -f systemd-remount-api-vfs.service \
997                         remount-rootfs.service \
998                         var-run.mount \
999                         var-run.service \
1000                         var-lock.mount \
1001                         var-lock.service && \
1002                 $(LN_S) ../systemd-remount-api-vfs.service systemd-remount-api-vfs.service && \
1003                 $(LN_S) ../remount-rootfs.service remount-rootfs.service && \
1004                 $(LN_S) ../var-run.mount var-run.mount && \
1005                 $(LN_S) ../var-run.service var-run.service && \
1006                 $(LN_S) ../var-lock.mount var-lock.mount && \
1007                 $(LN_S) ../var-lock.service var-lock.service )
1008         ( cd $(DESTDIR)$(sessionunitdir) && \
1009                 rm -f shutdown.target sockets.target local-fs.target swap.target bluetooth.target printer.target && \
1010                 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
1011                 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
1012                 $(LN_S) $(systemunitdir)/local-fs.target local-fs.target && \
1013                 $(LN_S) $(systemunitdir)/swap.target swap.target && \
1014                 $(LN_S) $(systemunitdir)/bluetooth.target bluetooth.target && \
1015                 $(LN_S) $(systemunitdir)/printer.target printer.target)
1016         ( cd $(DESTDIR)$(systemunitdir) && \
1017                 rm -f runlevel0.target runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target runlevel6.target && \
1018                 $(LN_S) poweroff.target runlevel0.target && \
1019                 $(LN_S) rescue.target runlevel1.target && \
1020                 $(LN_S) multi-user.target runlevel2.target && \
1021                 $(LN_S) multi-user.target runlevel3.target && \
1022                 $(LN_S) multi-user.target runlevel4.target && \
1023                 $(LN_S) graphical.target runlevel5.target && \
1024                 $(LN_S) reboot.target runlevel6.target )
1025         ( cd $(DESTDIR)$(systemunitdir) && \
1026                 rm -f default.target ctrl-alt-del.target && \
1027                 $(LN_S) graphical.target default.target && \
1028                 $(LN_S) reboot.target ctrl-alt-del.target )
1029         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1030                 rm -f getty.target && \
1031                 $(LN_S) ../getty.target getty.target )
1032         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
1033                 rm -f getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service && \
1034                 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service && \
1035                 $(LN_S) $(systemunitdir)/getty@.service getty@tty2.service && \
1036                 $(LN_S) $(systemunitdir)/getty@.service getty@tty3.service && \
1037                 $(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \
1038                 $(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
1039                 $(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
1040         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
1041                 rm -f remote-fs.target && \
1042                 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
1043         ( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
1044                 rm -f dev-hugepages.automount \
1045                         dev-mqueue.automount \
1046                         proc-sys-fs-binfmt_misc.automount \
1047                         sys-kernel-debug.automount \
1048                         sys-kernel-security.automount \
1049                         systemd-vconsole-setup.service \
1050                         systemd-modules-load.service \
1051                         systemd-random-seed-load.service \
1052                         sysctl.service \
1053                         tmpwatch.timer \
1054                         tmpwatch.service && \
1055                 $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
1056                 $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
1057                 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \
1058                 $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \
1059                 $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount && \
1060                 $(LN_S) ../systemd-vconsole-setup.service systemd-vconsole-setup.service && \
1061                 $(LN_S) ../systemd-modules-load.service systemd-modules-load.service && \
1062                 $(LN_S) ../systemd-random-seed-load.service systemd-random-seed-load.service && \
1063                 $(LN_S) ../sysctl.service sysctl.service && \
1064                 $(LN_S) ../tmpwatch.timer tmpwatch.timer && \
1065                 $(LN_S) ../tmpwatch.service tmpwatch.service )
1066         ( cd $(DESTDIR)$(dbussessionservicedir) && \
1067                 rm -f org.freedesktop.systemd1.service && \
1068                 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
1069 if TARGET_FEDORA
1070         $(MKDIR_P) -m 0755 \
1071                 $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) \
1072                 $(DESTDIR)$(systemunitdir)/reboot.target.wants \
1073                 $(DESTDIR)$(systemunitdir)/poweroff.target.wants \
1074                 $(DESTDIR)$(systemunitdir)/halt.target.wants \
1075                 $(DESTDIR)$(systemunitdir)/rescue.target.wants \
1076                 $(DESTDIR)$(systemunitdir)/multi-user.target.wants
1077         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
1078                 rm -f display-manager.service && \
1079                 $(LN_S) $(systemunitdir)/prefdm.service display-manager.service )
1080         ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
1081                 rm -f prefdm.service && \
1082                 $(LN_S) $(systemunitdir)/prefdm.service prefdm.service )
1083         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
1084                 rm -f rc-local.service && \
1085                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
1086         ( cd $(DESTDIR)$(systemunitdir)/rescue.target.wants && \
1087                 rm -f single.service && \
1088                 $(LN_S) $(systemunitdir)/single.service single.service )
1089         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1090                 rm -f plymouth-quit.service && \
1091                 $(LN_S) ../plymouth-quit.service plymouth-quit.service )
1092         ( cd $(DESTDIR)$(systemunitdir)/reboot.target.wants && \
1093                 rm -f plymouth-reboot.service && \
1094                 $(LN_S) ../plymouth-reboot.service plymouth-reboot.service )
1095         ( cd $(DESTDIR)$(systemunitdir)/poweroff.target.wants && \
1096                 rm -f plymouth-poweroff.service && \
1097                 $(LN_S) ../plymouth-poweroff.service plymouth-poweroff.service )
1098         ( cd $(DESTDIR)$(systemunitdir)/halt.target.wants && \
1099                 rm -f plymouth-halt.service && \
1100                 $(LN_S) ../plymouth-halt.service plymouth-halt.service )
1101         ( cd $(DESTDIR)$(systemunitdir) && \
1102                 rm -f local.service && \
1103                 $(LN_S) rc-local.service local.service )
1104         ( cd $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) && \
1105                 $(LN_S) halt reboot > /dev/null 2>&1 || true )
1106 endif
1107 if TARGET_GENTOO
1108         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
1109                 rm -f display-manager.service && \
1110                 $(LN_S) $(systemunitdir)/xdm.service display-manager.service )
1111         ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
1112                 rm -f xdm.service && \
1113                 $(LN_S) $(systemunitdir)/xdm.service xdm.service )
1114 endif
1115 if TARGET_DEBIAN
1116         $(MKDIR_P) -m 0755 \
1117                 $(DESTDIR)$(systemunitdir)/umount.target.wants
1118         ( cd $(DESTDIR)$(systemunitdir)/umount.target.wants && \
1119                 rm -f umountfs.service umountnfs.service umountroot.service && \
1120                 $(LN_S) ../umountfs.service umountfs.service && \
1121                 $(LN_S) ../umountnfs.service umountnfs.service && \
1122                 $(LN_S) ../umountroot.service umountroot.service )
1123         ( cd $(DESTDIR)$(systemunitdir) && \
1124                 rm -f runlevel5.target && \
1125                 $(LN_S) multi-user.target runlevel5.target )
1126 endif
1127 if !TARGET_SUSE
1128 if !TARGET_DEBIAN
1129         ( cd $(DESTDIR)$(systemunitdir) && \
1130                 rm -f fsck.target && \
1131                 $(LN_S) sysinit.target fsck.target )
1132 endif
1133 endif
1134
1135 DISTCHECK_CONFIGURE_FLAGS = \
1136         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
1137         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
1138         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
1139         --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
1140         --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
1141         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
1142         --with-rootdir=$$dc_install_base/$(rootdir)
1143
1144 upload: all distcheck
1145         cp -v systemd-$(VERSION).tar.bz2 /home/lennart/git.fedora/systemd/
1146         scp systemd-$(VERSION).tar.bz2 fdo:/srv/www.freedesktop.org/www/software/systemd/
1147         scp man/*.html tango:public/systemd-man/
1148
1149 git-tag:
1150         git tag "v$(VERSION)" -m "systemd $(VERSION)"
1151
1152 # Opt out from a few services on Fedora for now, as long as rc.sysinit does this job
1153 fedora: install
1154         rm /lib/systemd/system/local-fs.target.wants/var-run.service
1155         rm /lib/systemd/system/local-fs.target.wants/var-run.mount
1156         rm /lib/systemd/system/local-fs.target.wants/var-lock.service
1157         rm /lib/systemd/system/local-fs.target.wants/var-lock.mount