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