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