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