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