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