]> git.ipfire.org Git - thirdparty/systemd.git/blame - Makefile.am
shutdownd: kill /etc/nologin file before we go down
[thirdparty/systemd.git] / Makefile.am
CommitLineData
47be870b
LP
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
18ACLOCAL_AMFLAGS = -I m4
19
8c4a3079 20# Dirs of external packages
d122948d
LP
21dbuspolicydir=@dbuspolicydir@
22dbussessionservicedir=@dbussessionservicedir@
23dbussystemservicedir=@dbussystemservicedir@
24dbusinterfacedir=@dbusinterfacedir@
d1ab0ca0 25udevrulesdir=@udevrulesdir@
8c6db833
LP
26pamlibdir=@pamlibdir@
27pkgconfigdatadir=$(datadir)/pkgconfig
036643a2 28
8c4a3079 29# Our own, non-special dirs
d1ab0ca0 30pkgsysconfdir=$(sysconfdir)/systemd
d1ab0ca0 31sessionunitdir=$(pkgdatadir)/session
8c4a3079
LP
32
33# And these are the special ones for /
34rootdir=@rootdir@
8c4a3079
LP
35rootbindir=$(rootdir)/bin
36rootlibexecdir=$(rootdir)/lib/systemd
37systemunitdir=$(rootdir)/lib/systemd/system
70fcff31 38
47be870b
LP
39AM_CPPFLAGS = \
40 -include $(top_builddir)/config.h \
487393e9 41 -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \
036643a2 42 -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
70fcff31 43 -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
0571e011 44 -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
061978fa 45 -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
487393e9 46 -DSESSION_CONFIG_FILE=\"$(pkgsysconfdir)/session.conf\" \
036643a2 47 -DSESSION_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/session\" \
70fcff31 48 -DSESSION_DATA_UNIT_PATH=\"$(sessionunitdir)\" \
8c4a3079 49 -DCGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
f401faf5 50 -DSYSTEMD_BINARY_PATH=\"$(rootbindir)/systemd\" \
2cb1a60d 51 -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
8c6db833 52 -DRUNTIME_DIR=\"$(localstatedir)/run\" \
ca2cab5d 53 -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
e99e38bb 54 -I $(top_srcdir)/src
47be870b 55
8c4a3079 56rootbin_PROGRAMS = \
134dc482 57 systemd \
4a2a8b5a
LP
58 systemctl \
59 systemd-notify
a9b5b032 60
8c4a3079 61bin_PROGRAMS = \
fa776d8e 62 systemd-cgls
10e87ee7
LP
63
64if HAVE_GTK
65bin_PROGRAMS += \
8e274523 66 systemadm
a9b5b032 67endif
8e274523 68
8c4a3079 69rootlibexec_PROGRAMS = \
8e274523 70 systemd-logger \
0b7964b8 71 systemd-cgroups-agent \
4927fcae 72 systemd-initctl \
ca2cab5d 73 systemd-update-utmp \
f6144808
LP
74 systemd-random-seed \
75 systemd-shutdownd
47be870b
LP
76
77noinst_PROGRAMS = \
78 test-engine \
15ae422b 79 test-job-type \
af5bc85d 80 test-ns \
8c47c732 81 test-loopback \
8c6db833 82 test-daemon \
c24eb49e
LP
83 test-cgroup \
84 test-env-replace
8c6db833
LP
85
86if HAVE_PAM
87pamlib_LTLIBRARIES = \
88 pam_systemd.la
89endif
47be870b 90
487393e9
LP
91dist_pkgsysconf_DATA = \
92 src/system.conf
93
d1ab0ca0 94dist_dbuspolicy_DATA = \
dfac97b2 95 src/org.freedesktop.systemd1.conf
e24067c3 96
d122948d
LP
97dist_dbussystemservice_DATA = \
98 src/org.freedesktop.systemd1.service
99
d1ab0ca0 100dist_udevrules_DATA = \
dfac97b2 101 src/99-systemd.rules
5cc5d790 102
d122948d 103dbusinterface_DATA = \
4288f619
LP
104 org.freedesktop.systemd1.Manager.xml \
105 org.freedesktop.systemd1.Job.xml \
106 org.freedesktop.systemd1.Unit.xml \
107 org.freedesktop.systemd1.Service.xml \
108 org.freedesktop.systemd1.Socket.xml \
871d7de4 109 org.freedesktop.systemd1.Timer.xml \
4288f619
LP
110 org.freedesktop.systemd1.Target.xml \
111 org.freedesktop.systemd1.Device.xml \
112 org.freedesktop.systemd1.Mount.xml \
113 org.freedesktop.systemd1.Automount.xml \
114 org.freedesktop.systemd1.Snapshot.xml \
01f78473
LP
115 org.freedesktop.systemd1.Swap.xml \
116 org.freedesktop.systemd1.Path.xml
4288f619 117
d1ab0ca0 118dist_systemunit_DATA = \
70fcff31 119 units/emergency.service \
f057408c 120 units/emergency.target \
f92a18f5 121 units/basic.target \
5e6afdd3
LP
122 units/getty.target \
123 units/halt.target \
70449379
LP
124 units/local-fs.target \
125 units/network.target \
126 units/nss-lookup.target \
683f468c 127 units/mail-transfer-agent.target \
5e6afdd3
LP
128 units/poweroff.target \
129 units/reboot.target \
5e6afdd3 130 units/rescue.target \
f0b02ca2 131 units/rpcbind.target \
70449379
LP
132 units/rtc-set.target \
133 units/shutdown.target \
4e67ddd6 134 units/umount.target \
70449379
LP
135 units/sigpwr.target \
136 units/sockets.target \
137 units/swap.target \
83bda358 138 units/dbus.target \
70fcff31 139 units/systemd-initctl.socket \
670802d4 140 units/systemd-logger.socket \
f6144808 141 units/systemd-shutdownd.socket \
670802d4
LP
142 units/dev-hugepages.automount \
143 units/dev-hugepages.mount \
144 units/dev-mqueue.automount \
145 units/dev-mqueue.mount \
146 units/proc-sys-fs-binfmt_misc.automount \
147 units/proc-sys-fs-binfmt_misc.mount \
148 units/sys-kernel-debug.automount \
149 units/sys-kernel-debug.mount \
6d526de2
LP
150 units/sys-kernel-security.automount \
151 units/sys-kernel-security.mount \
152 units/var-lock.mount \
da78e1b4
LP
153 units/var-run.mount \
154 units/printer.target \
ceda54d9
LP
155 units/bluetooth.target \
156 units/smartcard.target
70fcff31 157
6f6083dc 158nodist_systemunit_DATA = \
f92a18f5 159 units/sysinit.target \
5e6afdd3
LP
160 units/getty@.service \
161 units/graphical.target \
6f6083dc 162 units/remote-fs.target \
5e6afdd3 163 units/multi-user.target \
dfac97b2 164 units/systemd-initctl.service \
a7b6f8e5 165 units/systemd-logger.service \
f6144808 166 units/systemd-shutdownd.service \
cd6d0a45
LP
167 units/systemd-update-utmp-runlevel.service \
168 units/systemd-update-utmp-shutdown.service \
ca2cab5d
LP
169 units/systemd-random-seed-save.service \
170 units/systemd-random-seed-load.service \
83bda358 171 units/syslog.target
d1ab0ca0 172
0d26c910
LP
173dist_sessionunit_DATA = \
174 units/session/default.target
175
6f6083dc 176nodist_sessionunit_DATA = \
a1b256b0
LP
177 units/session/remote-fs.target \
178 units/session/exit.service
fb1bd35a 179
e24067c3 180EXTRA_DIST = \
f92a18f5 181 units/sysinit.target.m4 \
5e6afdd3
LP
182 units/getty@.service.m4 \
183 units/graphical.target.m4 \
184 units/multi-user.target.m4 \
705dbf3a 185 units/remote-fs.target.m4 \
70fcff31 186 units/systemd-initctl.service.in \
70fcff31 187 units/systemd-logger.service.in \
f6144808 188 units/systemd-shutdownd.service.in \
cd6d0a45
LP
189 units/systemd-update-utmp-runlevel.service.in \
190 units/systemd-update-utmp-shutdown.service.in \
ca2cab5d
LP
191 units/systemd-random-seed-save.service.in \
192 units/systemd-random-seed-load.service.in \
a7b6f8e5 193 units/syslog.target.in \
a1b256b0 194 units/session/exit.service.in \
64ca679e 195 systemd.pc.in
e24067c3 196
5e6afdd3
LP
197if TARGET_FEDORA
198dist_systemunit_DATA += \
199 units/fedora/halt.service \
200 units/fedora/killall.service \
201 units/fedora/poweroff.service \
202 units/fedora/prefdm.service \
203 units/fedora/rc-local.service \
204 units/fedora/reboot.service \
f057408c 205 units/fedora/sysinit.service \
1310609b
LP
206 units/fedora/single.service \
207 units/fedora/plymouth-quit.service \
0278dfeb
LP
208 units/fedora/plymouth-reboot.service \
209 units/fedora/plymouth-poweroff.service \
210 units/fedora/plymouth-halt.service
5e6afdd3
LP
211endif
212
65b0095b
KS
213if TARGET_SUSE
214dist_systemunit_DATA += \
215 units/suse/halt.service \
216 units/suse/poweroff.service \
922cc001
LP
217 units/suse/reboot.service \
218 units/suse/fsck.target
65b0095b
KS
219endif
220
ea2d9ed4
MAP
221if TARGET_GENTOO
222dist_systemunit_DATA += \
223 units/gentoo/halt.service \
224 units/gentoo/killall.service \
225 units/gentoo/poweroff.service \
226 units/gentoo/reboot.service \
227 units/gentoo/xdm.service
228endif
229
1ebdf2d8
TG
230if TARGET_ARCH
231dist_systemunit_DATA += \
232 units/arch/sysinit.service \
233 units/arch/rc-local.service \
234 units/arch/halt.service \
235 units/arch/poweroff.service \
236 units/arch/reboot.service
237endif
238
240a3a85
LP
239dist_doc_DATA = \
240 README \
795750ca
LP
241 LICENSE \
242 DISTRO_PORTING \
240a3a85
LP
243 src/sd-daemon.h \
244 src/sd-daemon.c
245
8c6db833
LP
246pkgconfigdata_DATA = \
247 systemd.pc
248
139be57d
LP
249noinst_LTLIBRARIES = \
250 libsystemd-basic.la \
251 libsystemd-core.la
252
139be57d 253libsystemd_basic_la_SOURCES = \
e99e38bb 254 src/util.c \
e51bc1a2 255 src/label.c \
e99e38bb
LP
256 src/hashmap.c \
257 src/set.c \
258 src/strv.c \
259 src/conf-parser.c \
260 src/socket-util.c \
261 src/log.c \
262 src/ratelimit.c
47be870b 263
4927fcae
LP
264libsystemd_basic_la_CFLAGS = \
265 $(AM_CFLAGS) \
266 $(SELINUX_CFLAGS)
267
268libsystemd_basic_la_LIBADD = \
269 $(SELINUX_LIBS)
270
139be57d 271libsystemd_core_la_SOURCES = \
e99e38bb
LP
272 src/unit.c \
273 src/job.c \
274 src/manager.c \
84e3543e 275 src/path-lookup.c \
e99e38bb
LP
276 src/load-fragment.c \
277 src/service.c \
278 src/automount.c \
279 src/mount.c \
280 src/swap.c \
281 src/device.c \
282 src/target.c \
283 src/snapshot.c \
284 src/socket.c \
285 src/timer.c \
01f78473 286 src/path.c \
e99e38bb
LP
287 src/load-dropin.c \
288 src/execute.c \
289 src/dbus.c \
290 src/dbus-manager.c \
291 src/dbus-unit.c \
292 src/dbus-job.c \
293 src/dbus-service.c \
294 src/dbus-socket.c \
871d7de4 295 src/dbus-timer.c \
e99e38bb
LP
296 src/dbus-target.c \
297 src/dbus-mount.c \
298 src/dbus-automount.c \
299 src/dbus-swap.c \
300 src/dbus-snapshot.c \
301 src/dbus-device.c \
302 src/dbus-execute.c \
01f78473 303 src/dbus-path.c \
e99e38bb
LP
304 src/cgroup.c \
305 src/mount-setup.c \
306 src/hostname-setup.c \
307 src/loopback-setup.c \
11c3a4ee 308 src/kmod-setup.c \
fa0f4d8a 309 src/modprobe-setup.c \
e99e38bb
LP
310 src/specifier.c \
311 src/unit-name.c \
312 src/fdset.c \
0213c3f8 313 src/namespace.c \
8c6db833
LP
314 src/tcpwrap.c \
315 src/cgroup-util.c
47be870b 316
139be57d
LP
317libsystemd_core_la_CFLAGS = \
318 $(AM_CFLAGS) \
319 $(DBUS_CFLAGS) \
4927fcae
LP
320 $(UDEV_CFLAGS) \
321 $(LIBWRAP_CFLAGS) \
322 $(PAM_CFLAGS) \
323 $(AUDIT_CFLAGS)
139be57d
LP
324
325libsystemd_core_la_LIBADD = \
326 libsystemd-basic.la \
327 $(DBUS_LIBS) \
328 $(UDEV_LIBS) \
139be57d 329 $(LIBWRAP_LIBS) \
7a58bfa4 330 $(PAM_LIBS) \
4927fcae 331 $(AUDIT_LIBS)
139be57d 332
9a1ac7b9
LP
333# This is needed because automake is buggy in how it generates the
334# rules for C programs, but not Vala programs. We therefore can't
335# list the .h files as dependencies if we want make dist to work.
336
462b33e9 337EXTRA_DIST += \
139be57d
LP
338 ${libsystemd_basic_la_SOURCES:.c=.h} \
339 ${libsystemd_core_la_SOURCES:.c=.h} \
e99e38bb
LP
340 src/macro.h \
341 src/ioprio.h \
342 src/missing.h \
343 src/list.h \
344 src/securebits.h \
345 src/linux/auto_dev-ioctl.h \
346 src/initreq.h \
514f4ef5 347 src/sd-daemon.h \
9a1ac7b9 348 src/special.h \
398ef8ba 349 src/dbus-common.h \
ab35fb1b 350 src/bus-errors.h \
cd6d0a45 351 src/cgroup-show.h \
302e27c8 352 src/utmp-wtmp.h \
f6144808
LP
353 src/build.h \
354 src/shutdownd.h
6f6083dc
LP
355
356MANPAGES = \
160cd5c9 357 man/systemd.1 \
6f6083dc
LP
358 man/systemctl.1 \
359 man/systemadm.1 \
fa776d8e 360 man/systemd-cgls.1 \
c5abba08 361 man/systemd-notify.1 \
f9378423
LP
362 man/sd_notify.3 \
363 man/sd_booted.3 \
364 man/sd_listen_fds.3 \
365 man/sd_is_fifo.3 \
6f6083dc
LP
366 man/systemd.unit.5 \
367 man/systemd.service.5 \
1f812fea 368 man/systemd.socket.5 \
cdb788e4 369 man/systemd.mount.5 \
65232ea7 370 man/systemd.automount.5 \
e0cabd4b 371 man/systemd.swap.5 \
11fcc3ab 372 man/systemd.timer.5 \
b36b082c 373 man/systemd.path.5 \
da49e9ab 374 man/systemd.target.5 \
eec575d8 375 man/systemd.device.5 \
b2c20dd9 376 man/systemd.snapshot.5 \
dd1eb43b 377 man/systemd.exec.5 \
6f6083dc 378 man/daemon.7 \
359957ee
LP
379 man/sd-daemon.7 \
380 man/runlevel.8 \
160cd5c9
LP
381 man/telinit.8 \
382 man/halt.8 \
383 man/shutdown.8 \
f3e219a2
LP
384 man/pam_systemd.8 \
385 man/systemd.conf.5
6f6083dc
LP
386
387MANPAGES_ALIAS = \
388 man/reboot.8 \
389 man/poweroff.8 \
390 man/sd_is_socket.3 \
391 man/sd_is_socket_unix.3 \
392 man/sd_is_socket_inet.3 \
393 man/sd_notifyf.3 \
394 man/init.1
395
396man/reboot.8: man/halt.8
397man/poweroff.8: man/halt.8
398man/sd_is_socket.3: man/sd_is_fifo.3
399man/sd_is_socket_unix.3: man/sd_is_fifo.3
400man/sd_is_socket_inet.3: man/sd_is_fifo.3
401man/sd_notifyf.3: man/sd_notify.3
402man/init.1: man/systemd.1
403
404dist_man_MANS = \
405 $(MANPAGES) \
406 $(MANPAGES_ALIAS)
9f2c5942
LP
407
408nodist_man_MANS = \
9f235308 409 man/systemd.special.7
d1ab0ca0 410
6f6083dc
LP
411XML_FILES = \
412 ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
413
414XML_IN_FILES = \
415 ${patsubst %.1,%.xml.in,${patsubst %.3,%.xml.in,${patsubst %.5,%.xml.in,${patsubst %.7,%.xml.in,${patsubst %.8,%.xml.in,$(nodist_man_MANS)}}}}}
416
9f2c5942 417dist_noinst_DATA = \
6f6083dc 418 ${XML_FILES:.xml=.html}
d1ab0ca0 419
9f2c5942 420nodist_noinst_DATA = \
6f6083dc 421 ${XML_IN_FILES:.xml.in=.html}
d1ab0ca0
LP
422
423EXTRA_DIST += \
6f6083dc
LP
424 $(XML_FILES) \
425 $(XML_IN_FILES) \
426 ${nodist_man_MANS:=.in} \
427 ${XML_IN_FILES:.xml.in=.html.in}
d1ab0ca0 428
47be870b 429systemd_SOURCES = \
e99e38bb 430 src/main.c
47be870b 431
10e87ee7
LP
432systemd_CFLAGS = \
433 $(AM_CFLAGS) \
47be870b 434 $(DBUS_CFLAGS) \
35d2e7ec 435 $(UDEV_CFLAGS)
47be870b
LP
436
437systemd_LDADD = \
139be57d 438 libsystemd-core.la
47be870b
LP
439
440test_engine_SOURCES = \
e99e38bb 441 src/test-engine.c
47be870b 442
10e87ee7 443test_engine_CFLAGS = $(systemd_CFLAGS)
47be870b
LP
444test_engine_LDADD = $(systemd_LDADD)
445
446test_job_type_SOURCES = \
e1d680ad 447 src/test-job-type.c
47be870b 448
10e87ee7 449test_job_type_CFLAGS = $(systemd_CFLAGS)
47be870b
LP
450test_job_type_LDADD = $(systemd_LDADD)
451
15ae422b 452test_ns_SOURCES = \
139be57d 453 src/test-ns.c
15ae422b 454
10e87ee7 455test_ns_CFLAGS = $(systemd_CFLAGS)
15ae422b
LP
456test_ns_LDADD = $(systemd_LDADD)
457
af5bc85d 458test_loopback_SOURCES = \
e99e38bb
LP
459 src/test-loopback.c \
460 src/loopback-setup.c
af5bc85d 461
139be57d
LP
462test_loopback_LDADD = \
463 libsystemd-basic.la
464
8c47c732 465test_daemon_SOURCES = \
8c47c732
LP
466 src/test-daemon.c \
467 src/sd-daemon.c
af5bc85d 468
139be57d
LP
469test_daemon_LDADD = \
470 libsystemd-basic.la
471
8c6db833
LP
472test_cgroup_SOURCES = \
473 src/test-cgroup.c \
474 src/cgroup-util.c
475
476test_cgroup_CFLAGS = \
35d2e7ec 477 $(AM_CFLAGS)
8c6db833
LP
478
479test_cgroup_LDADD = \
35d2e7ec 480 libsystemd-basic.la
8c6db833 481
c24eb49e
LP
482test_env_replace_SOURCES = \
483 src/test-env-replace.c
484
485test_env_replace_CFLAGS = \
486 $(AM_CFLAGS)
487
488test_env_replace_LDADD = \
489 libsystemd-basic.la
490
47be870b 491systemd_logger_SOURCES = \
e99e38bb 492 src/logger.c \
0213c3f8
LP
493 src/sd-daemon.c \
494 src/tcpwrap.c
495
496systemd_logger_LDADD = \
139be57d 497 libsystemd-basic.la \
0213c3f8 498 $(LIBWRAP_LIBS)
47be870b 499
0b7964b8 500systemd_initctl_SOURCES = \
e99e38bb 501 src/initctl.c \
a822056b
LP
502 src/sd-daemon.c \
503 src/dbus-common.c
0b7964b8 504
10e87ee7
LP
505systemd_initctl_CFLAGS = \
506 $(AM_CFLAGS) \
0b7964b8
LP
507 $(DBUS_CFLAGS)
508
509systemd_initctl_LDADD = \
139be57d 510 libsystemd-basic.la \
0b7964b8
LP
511 $(DBUS_LIBS)
512
4927fcae
LP
513systemd_update_utmp_SOURCES = \
514 src/update-utmp.c \
515 src/dbus-common.c \
516 src/utmp-wtmp.c
517
518systemd_update_utmp_CFLAGS = \
519 $(AM_CFLAGS) \
520 $(DBUS_CFLAGS) \
521 $(AUDIT_CFLAGS)
522
523systemd_update_utmp_LDADD = \
524 libsystemd-basic.la \
525 $(DBUS_LIBS) \
526 $(AUDIT_LIBS)
527
ca2cab5d
LP
528systemd_random_seed_SOURCES = \
529 src/random-seed.c
530
531systemd_random_seed_CFLAGS = \
532 $(AM_CFLAGS)
533
534systemd_random_seed_LDADD = \
535 libsystemd-basic.la
536
f6144808 537systemd_shutdownd_SOURCES = \
9be9828c 538 src/utmp-wtmp.c \
f6144808
LP
539 src/sd-daemon.c \
540 src/shutdownd.c
541
542systemd_shutdownd_CFLAGS = \
543 $(AM_CFLAGS)
544
545systemd_shutdownd_LDADD = \
546 libsystemd-basic.la
547
8e274523 548systemd_cgroups_agent_SOURCES = \
3c661fad
LP
549 src/cgroups-agent.c \
550 src/dbus-common.c
8e274523 551
10e87ee7
LP
552systemd_cgroups_agent_CFLAGS = \
553 $(AM_CFLAGS) \
8e274523
LP
554 $(DBUS_CFLAGS)
555
556systemd_cgroups_agent_LDADD = \
139be57d 557 libsystemd-basic.la \
8e274523
LP
558 $(DBUS_LIBS)
559
7e4249b9
LP
560systemctl_SOURCES = \
561 src/systemctl.c \
9a1ac7b9 562 src/utmp-wtmp.c \
ab35fb1b 563 src/dbus-common.c \
ee5762e3
LP
564 src/path-lookup.c \
565 src/sd-daemon.c \
c6c18be3
LP
566 src/cgroup-show.c \
567 src/cgroup-util.c
139be57d
LP
568
569systemctl_CFLAGS = \
570 $(AM_CFLAGS) \
35d2e7ec 571 $(DBUS_CFLAGS)
7e4249b9 572
139be57d
LP
573systemctl_LDADD = \
574 libsystemd-basic.la \
35d2e7ec 575 $(DBUS_LIBS)
7e4249b9 576
4a2a8b5a
LP
577systemd_notify_SOURCES = \
578 src/notify.c \
139be57d
LP
579 src/sd-daemon.c
580
581systemd_notify_LDADD = \
582 libsystemd-basic.la
4a2a8b5a 583
fa776d8e 584systemd_cgls_SOURCES = \
d04247cf 585 src/cgls.c \
c6c18be3
LP
586 src/cgroup-show.c \
587 src/cgroup-util.c
fa776d8e
LP
588
589systemd_cgls_CFLAGS = \
35d2e7ec 590 $(AM_CFLAGS)
c6c18be3
LP
591
592systemd_cgls_LDADD = \
35d2e7ec 593 libsystemd-basic.la
fa776d8e 594
47be870b 595systemadm_SOURCES = \
e99e38bb
LP
596 src/systemadm.vala \
597 src/systemd-interfaces.vala
47be870b 598
10e87ee7
LP
599systemadm_CFLAGS = \
600 $(AM_CFLAGS) \
601 $(DBUSGLIB_CFLAGS) \
602 $(GTK_CFLAGS) \
603 -Wno-unused-variable \
604 -Wno-unused-function \
605 -Wno-shadow \
606 -Wno-format-nonliteral
607
608systemadm_VALAFLAGS = \
609 --pkg=dbus-glib-1 \
610 --pkg=posix \
611 --pkg=gtk+-2.0 \
612 -g
613
139be57d
LP
614systemadm_LDADD = \
615 $(DBUSGLIB_LIBS) \
616 $(GTK_LIBS)
c1e1601e 617
8c6db833
LP
618pam_systemd_la_SOURCES = \
619 src/pam-module.c \
620 src/cgroup-util.c \
621 src/sd-daemon.c
622
623pam_systemd_la_CFLAGS = \
35d2e7ec 624 $(AM_CFLAGS)
8c6db833
LP
625 -fvisibility=hidden
626
627pam_systemd_la_LDFLAGS = \
628 -module \
629 -export-dynamic \
630 -avoid-version \
631 -shared \
632 -export-symbols-regex '^pam_sm_.*'
633
634pam_systemd_la_LIBADD = \
635 libsystemd-basic.la \
35d2e7ec 636 $(PAM_LIBS)
8c6db833 637
5e6afdd3 638SED_PROCESS = \
a00e4879 639 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1136a371 640 $(SED) -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
5e6afdd3 641 -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
1136a371 642 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
8c6db833
LP
643 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
644 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
645 -e 's,@systemunitdir\@,$(systemunitdir),g' \
646 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
647 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
648 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
649 -e 's,@prefix\@,$(prefix),g' \
2d02719c 650 < $< > $@
70fcff31 651
9f2c5942 652units/%: units/%.in Makefile
5e6afdd3
LP
653 $(SED_PROCESS)
654
2a3d6294 655man/%: man/%.in Makefile
5e6afdd3
LP
656 $(SED_PROCESS)
657
8c6db833
LP
658%.pc: %.pc.in Makefile
659 $(SED_PROCESS)
660
fb1bd35a 661M4_PROCESS_SYSTEM = \
a00e4879 662 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
9f2c5942 663 $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@
fb1bd35a
LP
664
665M4_PROCESS_SESSION = \
a00e4879 666 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
9f2c5942 667 $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SESSION=1 < $< > $@
5e6afdd3 668
9f2c5942 669units/%: units/%.m4 Makefile
fb1bd35a 670 $(M4_PROCESS_SYSTEM)
5e6afdd3 671
9f2c5942 672units/session/%: units/%.m4 Makefile
fb1bd35a 673 $(M4_PROCESS_SESSION)
a7b6f8e5 674
c1e1601e 675CLEANFILES = \
6f6083dc
LP
676 $(nodist_systemunit_DATA) \
677 $(nodist_sessionunit_DATA) \
678 $(nodist_man_MANS) \
679 ${XML_IN_FILES:.xml.in=.html} \
680 $(pkgconfigdata_DATA)
4697132b 681
42e39f0b
LP
682if HAVE_VALAC
683CLEANFILES += \
6f6083dc 684 ${systemadm_SOURCES:.vala=.c}
42e39f0b
LP
685endif
686
c3bd7322 687if HAVE_XSLTPROC
c6365917
LP
688XSLTPROC_FLAGS = \
689 --nonet \
690 --param funcsynopsis.style "'ansi'"
691
9f2c5942 692XSLTPROC_PROCESS_MAN = \
a00e4879 693 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
c6365917 694 $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
d1ab0ca0 695
9f2c5942 696XSLTPROC_PROCESS_MAN_IN = \
a00e4879 697 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
c6365917 698 $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
9f2c5942
LP
699 mv ${@:.in=} $@
700
701XSLTPROC_PROCESS_HTML = \
a00e4879 702 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
c6365917 703 $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
d1ab0ca0 704
9f2c5942 705XSLTPROC_PROCESS_HTML_IN = \
a00e4879 706 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
c6365917 707 $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
9f2c5942
LP
708 mv ${@:.in=} $@
709
6f6083dc 710man/%.1: man/%.xml
f9378423
LP
711 $(XSLTPROC_PROCESS_MAN)
712
6f6083dc 713man/%.1.in: man/%.xml.in
f9378423
LP
714 $(XSLTPROC_PROCESS_MAN)
715
6f6083dc 716man/%.3: man/%.xml
359957ee
LP
717 $(XSLTPROC_PROCESS_MAN)
718
6f6083dc 719man/%.3.in: man/%.xml.in
359957ee
LP
720 $(XSLTPROC_PROCESS_MAN)
721
9f2c5942
LP
722man/%.5: man/%.xml
723 $(XSLTPROC_PROCESS_MAN)
724
725man/%.5.in: man/%.xml.in
726 $(XSLTPROC_PROCESS_MAN)
727
728man/%.7: man/%.xml
729 $(XSLTPROC_PROCESS_MAN)
730
731man/%.7.in: man/%.xml.in
732 $(XSLTPROC_PROCESS_MAN_IN)
733
f9378423
LP
734man/%.8: man/%.xml
735 $(XSLTPROC_PROCESS_MAN)
736
737man/%.8.in: man/%.xml.in
738 $(XSLTPROC_PROCESS_MAN_IN)
739
9f2c5942
LP
740man/%.html: man/%.xml
741 $(XSLTPROC_PROCESS_HTML)
742
743man/%.html.in: man/%.xml.in
744 $(XSLTPROC_PROCESS_HTML_IN)
745
d1ab0ca0
LP
746CLEANFILES += \
747 $(dist_man_MANS) \
6f6083dc
LP
748 ${nodist_man_MANS:=.in} \
749 ${XML_FILES:.xml=.html} \
750 ${XML_IN_FILES:.xml.in=.html.in}
c3bd7322 751endif
d1ab0ca0 752
4288f619 753org.freedesktop.systemd1.%.xml: systemd
4627d396 754 $(AM_V_GEN)SYSTEMD_SKIP_API_MOUNTS=1 ./systemd --introspect=${@:.xml=} > $@
4288f619 755
6f6083dc
LP
756CLEANFILES += \
757 $(dbusinterface_DATA)
4288f619 758
4697132b 759install-data-hook:
64c1b5bf 760 $(MKDIR_P) -m 0755 \
43aa226d
LP
761 $(DESTDIR)$(systemunitdir) \
762 $(DESTDIR)$(sessionunitdir) \
5e6afdd3 763 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
f92a18f5 764 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
cd6d0a45
LP
765 $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
766 $(DESTDIR)$(systemunitdir)/runlevel1.target.wants \
767 $(DESTDIR)$(systemunitdir)/runlevel2.target.wants \
768 $(DESTDIR)$(systemunitdir)/runlevel3.target.wants \
769 $(DESTDIR)$(systemunitdir)/runlevel4.target.wants \
770 $(DESTDIR)$(systemunitdir)/runlevel5.target.wants \
64c1b5bf 771 $(DESTDIR)$(pkgsysconfdir)/system \
5e6afdd3
LP
772 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
773 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
774 $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants \
64c1b5bf 775 $(DESTDIR)$(pkgsysconfdir)/session \
e82e442b 776 $(DESTDIR)$(sysconfdir)/xdg/systemd
a3723b97
LP
777 $(MKDIR_P) -m 0755 $(DESTDIR)/cgroup || \
778 echo "Don't forget to create /cgroup! Couldn't create it for you, continuing anyway."
e9da3678
LP
779 ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
780 rm -f session && \
5e6afdd3
LP
781 $(LN_S) $(pkgsysconfdir)/session session )
782 ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
a145090c 783 rm -f systemd-initctl.socket systemd-logger.socket systemd-shutdownd.socket && \
5e6afdd3 784 $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
a145090c
LP
785 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket && \
786 $(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket )
cd6d0a45
LP
787 ( cd $(DESTDIR)$(systemunitdir)/runlevel1.target.wants && \
788 rm -f systemd-update-utmp-runlevel.service && \
789 $(LN_S) ../systemd-update-utmp-runlevel.service )
790 ( cd $(DESTDIR)$(systemunitdir)/runlevel2.target.wants && \
791 rm -f systemd-update-utmp-runlevel.service && \
792 $(LN_S) ../systemd-update-utmp-runlevel.service )
793 ( cd $(DESTDIR)$(systemunitdir)/runlevel3.target.wants && \
794 rm -f systemd-update-utmp-runlevel.service && \
795 $(LN_S) ../systemd-update-utmp-runlevel.service )
796 ( cd $(DESTDIR)$(systemunitdir)/runlevel4.target.wants && \
797 rm -f systemd-update-utmp-runlevel.service && \
798 $(LN_S) ../systemd-update-utmp-runlevel.service )
799 ( cd $(DESTDIR)$(systemunitdir)/runlevel5.target.wants && \
800 rm -f systemd-update-utmp-runlevel.service && \
801 $(LN_S) ../systemd-update-utmp-runlevel.service )
802 ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
803 rm -f systemd-update-utmp-shutdown.service && \
804 $(LN_S) ../systemd-update-utmp-shutdown.service )
70449379 805 ( cd $(DESTDIR)$(sessionunitdir) && \
da78e1b4 806 rm -f shutdown.target sockets.target local-fs.target swap.target bluetooth.target printer.target && \
8c4a3079
LP
807 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
808 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
809 $(LN_S) $(systemunitdir)/local-fs.target local-fs.target && \
da78e1b4
LP
810 $(LN_S) $(systemunitdir)/swap.target swap.target && \
811 $(LN_S) $(systemunitdir)/bluetooth.target bluetooth.target && \
812 $(LN_S) $(systemunitdir)/printer.target printer.target)
5e6afdd3 813 ( cd $(DESTDIR)$(systemunitdir) && \
c88f64bd 814 rm -f runlevel0.target runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target runlevel6.target && \
5e6afdd3
LP
815 $(LN_S) poweroff.target runlevel0.target && \
816 $(LN_S) rescue.target runlevel1.target && \
c88f64bd
LP
817 $(LN_S) multi-user.target runlevel2.target && \
818 $(LN_S) multi-user.target runlevel3.target && \
819 $(LN_S) multi-user.target runlevel4.target && \
820 $(LN_S) graphical.target runlevel5.target && \
5e6afdd3
LP
821 $(LN_S) reboot.target runlevel6.target )
822 ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
823 rm -f default.target ctrl-alt-del.target kbrequest.target && \
824 $(LN_S) $(systemunitdir)/graphical.target default.target && \
825 $(LN_S) $(systemunitdir)/reboot.target ctrl-alt-del.target && \
c88f64bd 826 $(LN_S) $(systemunitdir)/rescue.target kbrequest.target )
5e6afdd3
LP
827 ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
828 rm -f getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service && \
829 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service && \
830 $(LN_S) $(systemunitdir)/getty@.service getty@tty2.service && \
831 $(LN_S) $(systemunitdir)/getty@.service getty@tty3.service && \
832 $(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \
833 $(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
834 $(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
835 ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
f92a18f5
LP
836 rm -f getty.target remote-fs.target && \
837 $(LN_S) $(systemunitdir)/getty.target getty.target && \
838 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
839 ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
6d526de2
LP
840 rm -f dev-hugepages.automount \
841 dev-mqueue.automount \
842 proc-sys-fs-binfmt_misc.automount \
843 sys-kernel-debug.automount \
6d526de2 844 sys-kernel-security.automount && \
670802d4
LP
845 $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
846 $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
847 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \
6d526de2 848 $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \
8c4a3079 849 $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount )
d122948d
LP
850 ( cd $(DESTDIR)$(dbussessionservicedir) && \
851 rm -f org.freedesktop.systemd1.service && \
852 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
5e6afdd3 853if TARGET_FEDORA
a3723b97 854 $(MKDIR_P) -m 0755 \
f057408c 855 $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) \
3cc144eb
LP
856 $(DESTDIR)$(systemunitdir)/reboot.target.wants \
857 $(DESTDIR)$(systemunitdir)/poweroff.target.wants \
858 $(DESTDIR)$(systemunitdir)/halt.target.wants \
859 $(DESTDIR)$(systemunitdir)/rescue.target.wants \
860 $(DESTDIR)$(systemunitdir)/multi-user.target.wants
1e287fe3
LP
861 ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
862 rm -f display-manager.service && \
863 $(LN_S) $(systemunitdir)/prefdm.service display-manager.service )
5e6afdd3 864 ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
af65a091 865 rm -f prefdm.service && \
83698d60 866 $(LN_S) $(systemunitdir)/prefdm.service prefdm.service )
5e6afdd3 867 ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
3cc144eb
LP
868 rm -f rc-local.service && \
869 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
f057408c
LP
870 ( cd $(DESTDIR)$(systemunitdir)/rescue.target.wants && \
871 rm -f single.service && \
872 $(LN_S) $(systemunitdir)/single.service single.service )
3cc144eb
LP
873 ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
874 rm -f plymouth-quit.service && \
875 $(LN_S) ../plymouth-quit.service plymouth-quit.service )
876 ( cd $(DESTDIR)$(systemunitdir)/reboot.target.wants && \
0278dfeb 877 rm -f plymouth-reboot.service && \
3cc144eb
LP
878 $(LN_S) ../plymouth-reboot.service plymouth-reboot.service )
879 ( cd $(DESTDIR)$(systemunitdir)/poweroff.target.wants && \
0278dfeb 880 rm -f plymouth-poweroff.service && \
3cc144eb
LP
881 $(LN_S) ../plymouth-poweroff.service plymouth-poweroff.service )
882 ( cd $(DESTDIR)$(systemunitdir)/halt.target.wants && \
0278dfeb 883 rm -f plymouth-halt.service && \
3cc144eb 884 $(LN_S) ../plymouth-halt.service plymouth-halt.service )
5e6afdd3
LP
885 ( cd $(DESTDIR)$(systemunitdir) && \
886 rm -f local.service && \
887 $(LN_S) rc-local.service local.service )
a3723b97 888 ( cd $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) && \
1afaf573 889 $(LN_S) halt reboot > /dev/null 2>&1 || true )
5e6afdd3 890endif
f306f4c4
MAP
891if TARGET_GENTOO
892 ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
893 rm -f display-manager.service && \
894 $(LN_S) $(systemunitdir)/xdm.service display-manager.service )
895 ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
83698d60
LP
896 rm -f xdm.service && \
897 $(LN_S) $(systemunitdir)/xdm.service xdm.service )
f306f4c4 898endif
922cc001
LP
899if !TARGET_SUSE
900 ( cd $(DESTDIR)$(systemunitdir) && \
901 rm -f fsck.target && \
902 $(LN_S) sysinit.target fsck.target )
903endif
5e6afdd3 904
d1ab0ca0 905DISTCHECK_CONFIGURE_FLAGS = \
d2d12cd1
LP
906 --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
907 --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
908 --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
909 --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
8c4a3079 910 --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
8c6db833 911 --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
8c4a3079 912 --with-rootdir=$$dc_install_base/$(rootdir)
a45f61d7
LP
913
914upload: all distcheck
915 cp -v systemd-$(VERSION).tar.bz2 /home/lennart/cvs.fedora/systemd/devel/
916 scp systemd-$(VERSION).tar.bz2 fdo:/srv/www.freedesktop.org/www/software/systemd/
917 scp man/*.html tango:public/systemd-man/
918
919git-tag:
920 git tag "v$(VERSION)" -m "systemd $(VERSION)"