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