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