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