]> git.ipfire.org Git - thirdparty/systemd.git/blame_incremental - Makefile.am
systemctl: fix broken list-unit-files with --root
[thirdparty/systemd.git] / Makefile.am
... / ...
CommitLineData
1# -*- Mode: makefile; indent-tabs-mode: t -*-
2#
3# This file is part of systemd.
4#
5# Copyright 2010-2012 Lennart Poettering
6# Copyright 2010-2012 Kay Sievers
7# Copyright 2013 Zbigniew Jędrzejewski-Szmek
8# Copyright 2013 David Strauss
9#
10# systemd is free software; you can redistribute it and/or modify it
11# under the terms of the GNU Lesser General Public License as published by
12# the Free Software Foundation; either version 2.1 of the License, or
13# (at your option) any later version.
14#
15# systemd is distributed in the hope that it will be useful, but
16# WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18# Lesser General Public License for more details.
19#
20# You should have received a copy of the GNU Lesser General Public License
21# along with systemd; If not, see <http://www.gnu.org/licenses/>.
22
23ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
24AM_MAKEFLAGS = --no-print-directory
25AUTOMAKE_OPTIONS = color-tests parallel-tests
26
27SUBDIRS = . po
28
29# remove targets if the command fails
30.DELETE_ON_ERROR:
31
32# keep intermediate files
33.SECONDARY:
34
35# Keep the test-suite.log
36.PRECIOUS: $(TEST_SUITE_LOG) Makefile
37
38LIBUDEV_CURRENT=7
39LIBUDEV_REVISION=0
40LIBUDEV_AGE=6
41
42LIBGUDEV_CURRENT=2
43LIBGUDEV_REVISION=0
44LIBGUDEV_AGE=2
45
46LIBSYSTEMD_CURRENT=4
47LIBSYSTEMD_REVISION=0
48LIBSYSTEMD_AGE=4
49
50# The following four libraries only exist for compatibility reasons,
51# their version info should not be bumped anymore
52LIBSYSTEMD_LOGIN_CURRENT=9
53LIBSYSTEMD_LOGIN_REVISION=3
54LIBSYSTEMD_LOGIN_AGE=9
55
56LIBSYSTEMD_DAEMON_CURRENT=0
57LIBSYSTEMD_DAEMON_REVISION=12
58LIBSYSTEMD_DAEMON_AGE=0
59
60LIBSYSTEMD_ID128_CURRENT=0
61LIBSYSTEMD_ID128_REVISION=28
62LIBSYSTEMD_ID128_AGE=0
63
64LIBSYSTEMD_JOURNAL_CURRENT=11
65LIBSYSTEMD_JOURNAL_REVISION=5
66LIBSYSTEMD_JOURNAL_AGE=11
67
68# Dirs of external packages
69dbuspolicydir=@dbuspolicydir@
70dbussessionservicedir=@dbussessionservicedir@
71dbussystemservicedir=@dbussystemservicedir@
72pamlibdir=@pamlibdir@
73pamconfdir=@pamconfdir@
74pkgconfigdatadir=$(datadir)/pkgconfig
75pkgconfiglibdir=$(libdir)/pkgconfig
76polkitpolicydir=$(datadir)/polkit-1/actions
77bashcompletiondir=@bashcompletiondir@
78zshcompletiondir=@zshcompletiondir@
79rpmmacrosdir=$(prefix)/lib/rpm/macros.d
80sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
81sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
82varlogdir=$(localstatedir)/log
83systemdstatedir=$(localstatedir)/lib/systemd
84catalogstatedir=$(systemdstatedir)/catalog
85
86# Our own, non-special dirs
87pkgsysconfdir=$(sysconfdir)/systemd
88userunitdir=$(prefix)/lib/systemd/user
89userpresetdir=$(prefix)/lib/systemd/user-preset
90tmpfilesdir=$(prefix)/lib/tmpfiles.d
91sysusersdir=$(prefix)/lib/sysusers.d
92sysctldir=$(prefix)/lib/sysctl.d
93binfmtdir=$(prefix)/lib/binfmt.d
94modulesloaddir=$(prefix)/lib/modules-load.d
95networkdir=$(rootprefix)/lib/systemd/network
96pkgincludedir=$(includedir)/systemd
97systemgeneratordir=$(rootlibexecdir)/system-generators
98usergeneratordir=$(prefix)/lib/systemd/user-generators
99systemshutdowndir=$(rootlibexecdir)/system-shutdown
100systemsleepdir=$(rootlibexecdir)/system-sleep
101systemunitdir=$(rootprefix)/lib/systemd/system
102systempresetdir=$(rootprefix)/lib/systemd/system-preset
103udevlibexecdir=$(rootprefix)/lib/udev
104udevhomedir=$(udevlibexecdir)
105udevrulesdir=$(udevlibexecdir)/rules.d
106udevhwdbdir=$(udevlibexecdir)/hwdb.d
107catalogdir=$(prefix)/lib/systemd/catalog
108kernelinstalldir = $(prefix)/lib/kernel/install.d
109factory_etcdir = $(prefix)/share/factory/etc
110factory_pamdir = $(prefix)/share/factory/etc/pam.d
111
112# And these are the special ones for /
113rootprefix=@rootprefix@
114rootbindir=$(rootprefix)/bin
115rootlibexecdir=$(rootprefix)/lib/systemd
116
117CLEANFILES = $(BUILT_SOURCES)
118DISTCLEANFILES =
119EXTRA_DIST =
120BUILT_SOURCES =
121INSTALL_EXEC_HOOKS =
122UNINSTALL_EXEC_HOOKS =
123INSTALL_DATA_HOOKS =
124UNINSTALL_DATA_HOOKS =
125DISTCLEAN_LOCAL_HOOKS =
126CLEAN_LOCAL_HOOKS =
127pkginclude_HEADERS =
128noinst_LTLIBRARIES =
129lib_LTLIBRARIES =
130include_HEADERS =
131noinst_DATA =
132pkgconfiglib_DATA =
133polkitpolicy_in_in_files =
134polkitpolicy_in_files =
135polkitpolicy_files =
136dist_udevrules_DATA =
137nodist_udevrules_DATA =
138dist_pkgsysconf_DATA =
139nodist_pkgsysconf_DATA =
140dist_pkgdata_DATA =
141dist_dbuspolicy_DATA =
142dist_dbussystemservice_DATA =
143check_PROGRAMS =
144check_DATA =
145tests=
146manual_tests =
147if ENABLE_TESTS
148noinst_PROGRAMS = $(manual_tests) $(tests)
149TESTS = $(tests)
150else
151noinst_PROGRAMS =
152TESTS =
153endif
154udevlibexec_PROGRAMS =
155
156.PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
157 $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
158 $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
159
160AM_CPPFLAGS = \
161 -include $(top_builddir)/config.h \
162 -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
163 -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
164 -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
165 -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
166 -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
167 -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
168 -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
169 -DCERTIFICATE_ROOT=\"$(CERTIFICATEROOT)\" \
170 -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
171 -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
172 -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
173 -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
174 -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
175 -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
176 -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
177 -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
178 -DROOTPREFIX=\"$(rootprefix)\" \
179 -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" \
180 -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \
181 -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
182 -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
183 -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
184 -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
185 -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
186 -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
187 -DX_SERVER=\"$(bindir)/X\" \
188 -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
189 -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
190 -DQUOTACHECK=\"$(QUOTACHECK)\" \
191 -DKEXEC=\"$(KEXEC)\" \
192 -DLIBDIR=\"$(libdir)\" \
193 -DROOTLIBDIR=\"$(rootlibdir)\" \
194 -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
195 -I $(top_srcdir)/src \
196 -I $(top_builddir)/src/shared \
197 -I $(top_srcdir)/src/shared \
198 -I $(top_srcdir)/src/network \
199 -I $(top_srcdir)/src/login \
200 -I $(top_srcdir)/src/journal \
201 -I $(top_srcdir)/src/timedate \
202 -I $(top_srcdir)/src/timesync \
203 -I $(top_srcdir)/src/resolve \
204 -I $(top_builddir)/src/resolve \
205 -I $(top_srcdir)/src/systemd \
206 -I $(top_builddir)/src/core \
207 -I $(top_srcdir)/src/core \
208 -I $(top_srcdir)/src/libudev \
209 -I $(top_srcdir)/src/udev \
210 -I $(top_srcdir)/src/udev/net \
211 -I $(top_builddir)/src/udev \
212 -I $(top_srcdir)/src/libsystemd/sd-bus \
213 -I $(top_srcdir)/src/libsystemd/sd-event \
214 -I $(top_srcdir)/src/libsystemd/sd-rtnl \
215 -I $(top_srcdir)/src/libsystemd/sd-network \
216 -I $(top_srcdir)/src/libsystemd-network \
217 -I $(top_srcdir)/src/libsystemd-terminal \
218 $(OUR_CPPFLAGS)
219
220AM_CFLAGS = $(OUR_CFLAGS)
221AM_LDFLAGS = $(OUR_LDFLAGS)
222
223# ------------------------------------------------------------------------------
224define move-to-rootlibdir
225 if test "$(libdir)" != "$(rootlibdir)"; then \
226 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
227 so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
228 rm -f $(DESTDIR)$(libdir)/$$libname && \
229 $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
230 mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
231 fi
232endef
233
234INSTALL_DIRS =
235
236RUNLEVEL1_TARGET_WANTS =
237RUNLEVEL2_TARGET_WANTS =
238RUNLEVEL3_TARGET_WANTS =
239RUNLEVEL4_TARGET_WANTS =
240RUNLEVEL5_TARGET_WANTS =
241SHUTDOWN_TARGET_WANTS =
242LOCAL_FS_TARGET_WANTS =
243MULTI_USER_TARGET_WANTS =
244SYSINIT_TARGET_WANTS =
245SOCKETS_TARGET_WANTS =
246BUSNAMES_TARGET_WANTS =
247TIMERS_TARGET_WANTS =
248USER_SOCKETS_TARGET_WANTS =
249USER_BUSNAMES_TARGET_WANTS =
250
251SYSTEM_UNIT_ALIASES =
252USER_UNIT_ALIASES =
253GENERAL_ALIASES =
254
255install-target-wants-hook:
256 what="$(RUNLEVEL1_TARGET_WANTS)" && wants=runlevel1.target && dir=$(systemunitdir) && $(add-wants)
257 what="$(RUNLEVEL2_TARGET_WANTS)" && wants=runlevel2.target && dir=$(systemunitdir) && $(add-wants)
258 what="$(RUNLEVEL3_TARGET_WANTS)" && wants=runlevel3.target && dir=$(systemunitdir) && $(add-wants)
259 what="$(RUNLEVEL4_TARGET_WANTS)" && wants=runlevel4.target && dir=$(systemunitdir) && $(add-wants)
260 what="$(RUNLEVEL5_TARGET_WANTS)" && wants=runlevel5.target && dir=$(systemunitdir) && $(add-wants)
261 what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && dir=$(systemunitdir) && $(add-wants)
262 what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && dir=$(systemunitdir) && $(add-wants)
263 what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
264 what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
265 what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
266 what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
267 what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
268 what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
269 what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
270 what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
271
272define add-wants
273 [ -z "$$what" ] || ( \
274 dir=$(DESTDIR)$$dir/$$wants.wants && \
275 $(MKDIR_P) -m 0755 $$dir && \
276 cd $$dir && \
277 rm -f $$what && \
278 for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
279endef
280
281install-directories-hook:
282 $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
283
284install-aliases-hook:
285 set -- $(SYSTEM_UNIT_ALIASES) && \
286 dir=$(systemunitdir) && $(install-aliases)
287 set -- $(USER_UNIT_ALIASES) && \
288 dir=$(userunitdir) && $(install-relative-aliases)
289 set -- $(GENERAL_ALIASES) && \
290 dir= && $(install-relative-aliases)
291
292define install-aliases
293 while [ -n "$$1" ]; do \
294 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
295 rm -f $(DESTDIR)$$dir/$$2 && \
296 $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
297 shift 2 || exit $$?; \
298 done
299endef
300
301define install-relative-aliases
302 while [ -n "$$1" ]; do \
303 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
304 rm -f $(DESTDIR)$$dir/$$2 && \
305 $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
306 shift 2 || exit $$?; \
307 done
308endef
309
310install-touch-usr-hook:
311 touch -c $(DESTDIR)/$(prefix)
312
313INSTALL_EXEC_HOOKS += \
314 install-target-wants-hook \
315 install-directories-hook \
316 install-aliases-hook \
317 install-touch-usr-hook
318
319# ------------------------------------------------------------------------------
320AM_V_M4 = $(AM_V_M4_$(V))
321AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
322AM_V_M4_0 = @echo " M4 " $@;
323
324AM_V_XSLT = $(AM_V_XSLT_$(V))
325AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
326AM_V_XSLT_0 = @echo " XSLT " $@;
327
328AM_V_GPERF = $(AM_V_GPERF_$(V))
329AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
330AM_V_GPERF_0 = @echo " GPERF " $@;
331
332AM_V_LN = $(AM_V_LN_$(V))
333AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
334AM_V_LN_0 = @echo " LN " $@;
335
336AM_V_RM = $(AM_V_RM_$(V))
337AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY))
338AM_V_RM_0 = @echo " RM " $@;
339
340# ------------------------------------------------------------------------------
341rootbin_PROGRAMS = \
342 systemctl \
343 systemd-notify \
344 systemd-ask-password \
345 systemd-tty-ask-password-agent \
346 systemd-machine-id-setup \
347 systemd-escape
348
349bin_PROGRAMS = \
350 systemd-cgls \
351 systemd-cgtop \
352 systemd-nspawn \
353 systemd-detect-virt \
354 systemd-delta \
355 systemd-analyze \
356 systemd-run \
357 systemd-path
358
359dist_bin_SCRIPTS = \
360 src/kernel-install/kernel-install
361
362dist_kernelinstall_SCRIPTS = \
363 src/kernel-install/50-depmod.install \
364 src/kernel-install/90-loaderentry.install
365
366rootlibexec_PROGRAMS = \
367 systemd \
368 systemd-cgroups-agent \
369 systemd-initctl \
370 systemd-update-utmp \
371 systemd-shutdownd \
372 systemd-shutdown \
373 systemd-remount-fs \
374 systemd-reply-password \
375 systemd-fsck \
376 systemd-ac-power \
377 systemd-sysctl \
378 systemd-sleep \
379 systemd-bus-proxyd \
380 systemd-socket-proxyd \
381 systemd-update-done \
382 systemd-hibernate-resume
383
384systemgenerator_PROGRAMS = \
385 systemd-getty-generator \
386 systemd-fstab-generator \
387 systemd-system-update-generator \
388 systemd-debug-generator \
389 systemd-hibernate-resume-generator
390
391dist_bashcompletion_DATA = \
392 shell-completion/bash/busctl \
393 shell-completion/bash/journalctl \
394 shell-completion/bash/systemd-analyze \
395 shell-completion/bash/systemd-cat \
396 shell-completion/bash/systemd-cgls \
397 shell-completion/bash/systemd-cgtop \
398 shell-completion/bash/systemd-delta \
399 shell-completion/bash/systemd-detect-virt \
400 shell-completion/bash/systemd-nspawn \
401 shell-completion/bash/systemd-run \
402 shell-completion/bash/udevadm \
403 shell-completion/bash/kernel-install
404
405nodist_bashcompletion_DATA = \
406 shell-completion/bash/systemctl
407
408dist_zshcompletion_DATA = \
409 shell-completion/zsh/_journalctl \
410 shell-completion/zsh/_udevadm \
411 shell-completion/zsh/_kernel-install \
412 shell-completion/zsh/_systemd-nspawn \
413 shell-completion/zsh/_systemd-analyze \
414 shell-completion/zsh/_systemd-run \
415 shell-completion/zsh/_sd_hosts_or_user_at_host \
416 shell-completion/zsh/_sd_outputmodes \
417 shell-completion/zsh/_sd_unit_files \
418 shell-completion/zsh/_systemd-delta \
419 shell-completion/zsh/_systemd
420
421nodist_zshcompletion_DATA = \
422 shell-completion/zsh/_systemctl
423
424EXTRA_DIST += \
425 shell-completion/bash/systemctl.in \
426 shell-completion/zsh/_systemctl.in
427
428CLEANFILES += \
429 $(nodist_bashcompletion_DATA) \
430 $(nodist_zshcompletion_DATA)
431
432dist_sysctl_DATA = \
433 sysctl.d/50-default.conf
434
435dist_systemunit_DATA = \
436 units/graphical.target \
437 units/multi-user.target \
438 units/emergency.target \
439 units/sysinit.target \
440 units/basic.target \
441 units/getty.target \
442 units/halt.target \
443 units/kexec.target \
444 units/local-fs.target \
445 units/local-fs-pre.target \
446 units/initrd.target \
447 units/initrd-fs.target \
448 units/initrd-root-fs.target \
449 units/remote-fs.target \
450 units/remote-fs-pre.target \
451 units/network.target \
452 units/network-pre.target \
453 units/network-online.target \
454 units/nss-lookup.target \
455 units/nss-user-lookup.target \
456 units/hibernate.target \
457 units/hybrid-sleep.target \
458 units/poweroff.target \
459 units/reboot.target \
460 units/rescue.target \
461 units/rpcbind.target \
462 units/time-sync.target \
463 units/shutdown.target \
464 units/final.target \
465 units/umount.target \
466 units/sigpwr.target \
467 units/sleep.target \
468 units/sockets.target \
469 units/busnames.target \
470 units/timers.target \
471 units/paths.target \
472 units/suspend.target \
473 units/swap.target \
474 units/slices.target \
475 units/system.slice \
476 units/x-.slice \
477 units/systemd-initctl.socket \
478 units/systemd-shutdownd.socket \
479 units/syslog.socket \
480 units/dev-hugepages.mount \
481 units/dev-mqueue.mount \
482 units/sys-kernel-config.mount \
483 units/sys-kernel-debug.mount \
484 units/sys-fs-fuse-connections.mount \
485 units/tmp.mount \
486 units/printer.target \
487 units/sound.target \
488 units/bluetooth.target \
489 units/smartcard.target \
490 units/systemd-ask-password-wall.path \
491 units/systemd-ask-password-console.path \
492 units/systemd-udevd-control.socket \
493 units/systemd-udevd-kernel.socket \
494 units/system-update.target \
495 units/initrd-switch-root.target
496
497nodist_systemunit_DATA = \
498 units/getty@.service \
499 units/serial-getty@.service \
500 units/console-shell.service \
501 units/console-getty.service \
502 units/container-getty@.service \
503 units/systemd-initctl.service \
504 units/systemd-shutdownd.service \
505 units/systemd-remount-fs.service \
506 units/systemd-update-utmp.service \
507 units/systemd-update-utmp-runlevel.service \
508 units/systemd-ask-password-wall.service \
509 units/systemd-ask-password-console.service \
510 units/systemd-sysctl.service \
511 units/emergency.service \
512 units/rescue.service \
513 units/user@.service \
514 units/systemd-hibernate.service \
515 units/systemd-hybrid-sleep.service \
516 units/systemd-suspend.service \
517 units/systemd-halt.service \
518 units/systemd-poweroff.service \
519 units/systemd-reboot.service \
520 units/systemd-kexec.service \
521 units/systemd-fsck@.service \
522 units/systemd-fsck-root.service \
523 units/systemd-udevd.service \
524 units/systemd-udev-trigger.service \
525 units/systemd-udev-settle.service \
526 units/systemd-udev-hwdb-update.service \
527 units/debug-shell.service \
528 units/initrd-parse-etc.service \
529 units/initrd-cleanup.service \
530 units/initrd-udevadm-cleanup-db.service \
531 units/initrd-switch-root.service \
532 units/systemd-nspawn@.service \
533 units/systemd-update-done.service \
534 units/systemd-hibernate-resume@.service
535
536dist_userunit_DATA = \
537 units/user/basic.target \
538 units/user/default.target \
539 units/user/exit.target
540
541nodist_userunit_DATA = \
542 units/user/systemd-exit.service
543
544dist_systempreset_DATA = \
545 system-preset/90-systemd.preset
546
547EXTRA_DIST += \
548 units/getty@.service.m4 \
549 units/serial-getty@.service.m4 \
550 units/console-shell.service.m4.in \
551 units/console-getty.service.m4.in \
552 units/container-getty@.service.m4.in \
553 units/rescue.service.m4.in \
554 units/systemd-initctl.service.in \
555 units/systemd-shutdownd.service.in \
556 units/systemd-remount-fs.service.in \
557 units/systemd-update-utmp.service.in \
558 units/systemd-update-utmp-runlevel.service.in \
559 units/systemd-ask-password-wall.service.in \
560 units/systemd-ask-password-console.service.in \
561 units/systemd-sysctl.service.in \
562 units/emergency.service.in \
563 units/systemd-halt.service.in \
564 units/systemd-poweroff.service.in \
565 units/systemd-reboot.service.in \
566 units/systemd-kexec.service.in \
567 units/user/systemd-exit.service.in \
568 units/systemd-fsck@.service.in \
569 units/systemd-fsck-root.service.in \
570 units/user@.service.in \
571 units/debug-shell.service.in \
572 units/systemd-hibernate.service.in \
573 units/systemd-hybrid-sleep.service.in \
574 units/systemd-suspend.service.in \
575 units/quotaon.service.in \
576 units/initrd-parse-etc.service.in \
577 units/initrd-cleanup.service.in \
578 units/initrd-udevadm-cleanup-db.service.in \
579 units/initrd-switch-root.service.in \
580 units/systemd-nspawn@.service.in \
581 units/systemd-update-done.service.in \
582 units/systemd-hibernate-resume@.service.in
583
584CLEANFILES += \
585 units/console-shell.service.m4 \
586 units/console-getty.service.m4 \
587 units/container-getty@.service.m4 \
588 units/rescue.service.m4 \
589 units/user@.service.m4
590
591if HAVE_SYSV_COMPAT
592nodist_systemunit_DATA += \
593 units/rc-local.service \
594 units/halt-local.service
595
596systemgenerator_PROGRAMS += \
597 systemd-sysv-generator \
598 systemd-rc-local-generator
599endif
600
601EXTRA_DIST += \
602 units/rc-local.service.in \
603 units/halt-local.service.in
604
605# automake is broken and can't handle files with a dash in front
606# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14728#8
607units-install-hook:
608 mv $(DESTDIR)$(systemunitdir)/x-.slice $(DESTDIR)/$(systemunitdir)/-.slice
609
610units-uninstall-hook:
611 rm -f $(DESTDIR)/$(systemunitdir)/-.slice
612
613INSTALL_DATA_HOOKS += units-install-hook
614UNINSTALL_DATA_HOOKS += units-uninstall-hook
615
616dist_doc_DATA = \
617 README \
618 NEWS \
619 LICENSE.LGPL2.1 \
620 LICENSE.GPL2 \
621 LICENSE.MIT \
622 DISTRO_PORTING \
623 src/libsystemd/sd-bus/PORTING-DBUS1 \
624 src/libsystemd/sd-bus/DIFFERENCES \
625 src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
626
627@INTLTOOL_POLICY_RULE@
628
629# ------------------------------------------------------------------------------
630
631MANPAGES =
632MANPAGES_ALIAS =
633
634include Makefile-man.am
635
636.PHONY: man update-man-list
637man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
638
639XML_FILES = \
640 ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
641HTML_FILES = \
642 ${XML_FILES:.xml=.html}
643HTML_ALIAS = \
644 ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
645
646if ENABLE_MANPAGES
647man_MANS = \
648 $(MANPAGES) \
649 $(MANPAGES_ALIAS)
650
651noinst_DATA += \
652 $(HTML_FILES) \
653 $(HTML_ALIAS)
654
655CLEANFILES += \
656 $(man_MANS) \
657 $(HTML_FILES) \
658 $(HTML_ALIAS)
659
660docs/html/man:
661 $(AM_V_at)$(MKDIR_P) $(dir $@)
662 $(AM_V_LN)$(LN_S) -f ../../man $@
663
664noinst_DATA += \
665 docs/html/man
666
667CLEANFILES += \
668 docs/html/man
669
670if HAVE_PYTHON
671man/index.html: man/systemd.index.html
672 $(AM_V_LN)$(LN_S) -f systemd.index.html $@
673
674noinst_DATA += \
675 man/index.html
676
677CLEANFILES += \
678 man/index.html
679
680XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_builddir)/man/*.xml)
681NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
682SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
683
684update-man-list: $(top_srcdir)/tools/make-man-rules.py $(XML_GLOB)
685 $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
686 $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
687 @echo "Makefile-man.am has been regenerated"
688
689man/systemd.index.xml: $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES)
690 $(AM_V_at)$(MKDIR_P) $(dir $@)
691 $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
692
693man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py $(SOURCE_XML_FILES)
694 $(AM_V_at)$(MKDIR_P) $(dir $@)
695 $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
696
697EXTRA_DIST += \
698 man/systemd.index.xml \
699 man/index.html \
700 man/systemd.directives.xml
701
702CLEANFILES += \
703 man/systemd.index.xml \
704 man/systemd.directives.xml
705
706endif
707
708endif
709
710EXTRA_DIST += \
711 $(XML_FILES) \
712 $(HTML_FILES) \
713 $(HTML_ALIAS) \
714 $(man_MANS) \
715 tools/make-man-index.py \
716 tools/make-directive-index.py \
717 tools/make-man-rules.py \
718 tools/xml_helper.py
719
720# ------------------------------------------------------------------------------
721noinst_LTLIBRARIES += \
722 libsystemd-shared.la
723
724libsystemd_shared_la_SOURCES = \
725 src/shared/linux/auto_dev-ioctl.h \
726 src/shared/linux/fanotify.h \
727 src/shared/ioprio.h \
728 src/shared/missing.h \
729 src/shared/initreq.h \
730 src/shared/securebits.h \
731 src/shared/special.h \
732 src/shared/list.h \
733 src/shared/macro.h \
734 src/shared/def.h \
735 src/shared/sparse-endian.h \
736 src/shared/refcnt.h \
737 src/shared/udev-util.h \
738 src/shared/bus-errors.h \
739 src/shared/device-nodes.c \
740 src/shared/device-nodes.h \
741 src/shared/util.c \
742 src/shared/util.h \
743 src/shared/virt.c \
744 src/shared/virt.h \
745 src/shared/architecture.c \
746 src/shared/architecture.h \
747 src/shared/efivars.c \
748 src/shared/efivars.h \
749 src/shared/path-util.c \
750 src/shared/path-util.h \
751 src/shared/time-util.c \
752 src/shared/time-util.h \
753 src/shared/locale-util.c \
754 src/shared/locale-util.h \
755 src/shared/hashmap.c \
756 src/shared/hashmap.h \
757 src/shared/siphash24.c \
758 src/shared/siphash24.h \
759 src/shared/set.c \
760 src/shared/set.h \
761 src/shared/fdset.c \
762 src/shared/fdset.h \
763 src/shared/prioq.c \
764 src/shared/prioq.h \
765 src/shared/sleep-config.c \
766 src/shared/sleep-config.h \
767 src/shared/strv.c \
768 src/shared/strv.h \
769 src/shared/env-util.c \
770 src/shared/env-util.h \
771 src/shared/strbuf.c \
772 src/shared/strbuf.h \
773 src/shared/strxcpyx.c \
774 src/shared/strxcpyx.h \
775 src/shared/conf-parser.c \
776 src/shared/conf-parser.h \
777 src/shared/log.c \
778 src/shared/log.h \
779 src/shared/ratelimit.h \
780 src/shared/ratelimit.c \
781 src/shared/exit-status.c \
782 src/shared/exit-status.h \
783 src/shared/utf8.c \
784 src/shared/utf8.h \
785 src/shared/gunicode.c \
786 src/shared/gunicode.h \
787 src/shared/pager.c \
788 src/shared/pager.h \
789 src/shared/socket-util.c \
790 src/shared/socket-util.h \
791 src/shared/in-addr-util.c \
792 src/shared/in-addr-util.h \
793 src/shared/conf-files.c \
794 src/shared/conf-files.h \
795 src/shared/cgroup-util.c \
796 src/shared/cgroup-util.h \
797 src/shared/cgroup-show.c \
798 src/shared/cgroup-show.h \
799 src/shared/unit-name.c \
800 src/shared/unit-name.h \
801 src/shared/utmp-wtmp.c \
802 src/shared/utmp-wtmp.h \
803 src/shared/watchdog.c \
804 src/shared/watchdog.h \
805 src/shared/spawn-ask-password-agent.c \
806 src/shared/spawn-ask-password-agent.h \
807 src/shared/replace-var.c \
808 src/shared/replace-var.h \
809 src/shared/spawn-polkit-agent.c \
810 src/shared/spawn-polkit-agent.h \
811 src/shared/clock-util.c \
812 src/shared/clock-util.h \
813 src/shared/time-dst.c \
814 src/shared/time-dst.h \
815 src/shared/calendarspec.c \
816 src/shared/calendarspec.h \
817 src/shared/fileio.c \
818 src/shared/fileio.h \
819 src/shared/output-mode.h \
820 src/shared/MurmurHash2.c \
821 src/shared/MurmurHash2.h \
822 src/shared/acpi-fpdt.h \
823 src/shared/acpi-fpdt.c \
824 src/shared/boot-timestamps.h \
825 src/shared/boot-timestamps.c \
826 src/shared/mkdir.c \
827 src/shared/mkdir.h \
828 src/shared/smack-util.c \
829 src/shared/smack-util.h \
830 src/shared/apparmor-util.c \
831 src/shared/apparmor-util.h \
832 src/shared/ima-util.c \
833 src/shared/ima-util.h \
834 src/shared/ptyfwd.c \
835 src/shared/ptyfwd.h \
836 src/shared/errno-list.c \
837 src/shared/errno-list.h \
838 src/shared/af-list.c \
839 src/shared/af-list.h \
840 src/shared/arphrd-list.c \
841 src/shared/arphrd-list.h \
842 src/shared/audit.c \
843 src/shared/audit.h \
844 src/shared/xml.c \
845 src/shared/xml.h \
846 src/shared/condition-util.c \
847 src/shared/condition-util.h \
848 src/shared/bus-label.c \
849 src/shared/bus-label.h \
850 src/shared/gpt.h \
851 src/shared/clean-ipc.h \
852 src/shared/clean-ipc.c \
853 src/shared/login-shared.c \
854 src/shared/login-shared.h \
855 src/shared/ring.c \
856 src/shared/ring.h \
857 src/shared/barrier.c \
858 src/shared/barrier.h \
859 src/shared/pty.c \
860 src/shared/pty.h \
861 src/shared/async.c \
862 src/shared/async.h \
863 src/shared/copy.c \
864 src/shared/copy.h \
865 src/shared/base-filesystem.c \
866 src/shared/base-filesystem.h \
867 src/shared/memfd.c \
868 src/shared/memfd.h \
869 src/shared/uid-range.c \
870 src/shared/uid-range.h \
871 src/shared/nss-util.h
872
873nodist_libsystemd_shared_la_SOURCES = \
874 src/shared/errno-from-name.h \
875 src/shared/errno-to-name.h \
876 src/shared/af-from-name.h \
877 src/shared/af-to-name.h \
878 src/shared/arphrd-from-name.h \
879 src/shared/arphrd-to-name.h
880
881libsystemd_shared_la_CFLAGS = \
882 $(AM_CFLAGS) \
883 $(SECCOMP_CFLAGS) \
884 -pthread
885
886# ------------------------------------------------------------------------------
887noinst_LTLIBRARIES += \
888 libsystemd-units.la
889
890libsystemd_units_la_SOURCES = \
891 src/shared/install.c \
892 src/shared/install.h \
893 src/shared/install-printf.c \
894 src/shared/install-printf.h \
895 src/shared/path-lookup.c \
896 src/shared/path-lookup.h \
897 src/shared/specifier.c \
898 src/shared/specifier.h
899
900# ------------------------------------------------------------------------------
901noinst_LTLIBRARIES += \
902 libsystemd-label.la
903
904libsystemd_label_la_SOURCES = \
905 src/shared/socket-label.c \
906 src/shared/label.c \
907 src/shared/label.h \
908 src/shared/selinux-util.c \
909 src/shared/selinux-util.h \
910 src/shared/mkdir-label.c \
911 src/shared/ask-password-api.c \
912 src/shared/ask-password-api.h \
913 src/shared/fileio-label.c \
914 src/shared/fileio-label.h \
915 src/shared/dev-setup.c \
916 src/shared/dev-setup.h \
917 src/shared/dropin.c \
918 src/shared/dropin.h \
919 src/shared/generator.h \
920 src/shared/generator.c
921
922libsystemd_label_la_CFLAGS = \
923 $(AM_CFLAGS) \
924 $(SELINUX_CFLAGS)
925
926libsystemd_label_la_LIBADD = \
927 $(SELINUX_LIBS)
928
929# -----------------------------------------------------------------------------
930
931if ENABLE_LDCONFIG
932dist_systemunit_DATA += \
933 units/ldconfig.service
934
935SYSINIT_TARGET_WANTS += \
936 ldconfig.service
937endif
938
939# ------------------------------------------------------------------------------
940
941if HAVE_SECCOMP
942noinst_LTLIBRARIES += \
943 libsystemd-seccomp.la
944
945libsystemd_seccomp_la_SOURCES = \
946 src/shared/seccomp-util.h \
947 src/shared/seccomp-util.c
948
949libsystemd_seccomp_la_CFLAGS = \
950 $(AM_CFLAGS) \
951 $(SECCOMP_CFLAGS)
952
953libsystemd_seccomp_la_LIBADD = \
954 $(SECCOMP_LIBS)
955endif
956
957# ------------------------------------------------------------------------------
958noinst_LTLIBRARIES += \
959 libsystemd-logs.la
960
961libsystemd_logs_la_SOURCES = \
962 src/shared/logs-show.c \
963 src/shared/logs-show.h
964
965# ------------------------------------------------------------------------------
966noinst_LTLIBRARIES += \
967 libsystemd-capability.la
968
969libsystemd_capability_la_SOURCES = \
970 src/shared/capability.c \
971 src/shared/capability.h
972
973libsystemd_capability_la_CFLAGS = \
974 $(AM_CFLAGS) \
975 $(CAP_CFLAGS)
976
977libsystemd_capability_la_LIBADD = \
978 $(CAP_LIBS)
979
980# ------------------------------------------------------------------------------
981if HAVE_ACL
982noinst_LTLIBRARIES += \
983 libsystemd-acl.la
984
985libsystemd_acl_la_SOURCES = \
986 src/shared/acl-util.c \
987 src/shared/acl-util.h
988
989libsystemd_acl_la_CFLAGS = \
990 $(AM_CFLAGS) \
991 $(ACL_CFLAGS)
992
993libsystemd_acl_la_LIBADD = \
994 $(ACL_LIBS)
995endif
996
997# ------------------------------------------------------------------------------
998noinst_LTLIBRARIES += \
999 libsystemd-core.la
1000
1001libsystemd_core_la_SOURCES = \
1002 src/core/unit.c \
1003 src/core/unit.h \
1004 src/core/unit-printf.c \
1005 src/core/unit-printf.h \
1006 src/core/job.c \
1007 src/core/job.h \
1008 src/core/manager.c \
1009 src/core/manager.h \
1010 src/core/transaction.c \
1011 src/core/transaction.h \
1012 src/core/load-fragment.c \
1013 src/core/load-fragment.h \
1014 src/core/service.c \
1015 src/core/service.h \
1016 src/core/socket.c \
1017 src/core/socket.h \
1018 src/core/busname.c \
1019 src/core/busname.h \
1020 src/core/target.c \
1021 src/core/target.h \
1022 src/core/snapshot.c \
1023 src/core/snapshot.h \
1024 src/core/device.c \
1025 src/core/device.h \
1026 src/core/mount.c \
1027 src/core/mount.h \
1028 src/core/automount.c \
1029 src/core/automount.h \
1030 src/core/swap.c \
1031 src/core/swap.h \
1032 src/core/timer.c \
1033 src/core/timer.h \
1034 src/core/path.c \
1035 src/core/path.h \
1036 src/core/slice.c \
1037 src/core/slice.h \
1038 src/core/scope.c \
1039 src/core/scope.h \
1040 src/core/load-dropin.c \
1041 src/core/load-dropin.h \
1042 src/core/execute.c \
1043 src/core/execute.h \
1044 src/core/kill.c \
1045 src/core/kill.h \
1046 src/core/dbus.c \
1047 src/core/dbus.h \
1048 src/core/dbus-manager.c \
1049 src/core/dbus-manager.h \
1050 src/core/dbus-unit.c \
1051 src/core/dbus-unit.h \
1052 src/core/dbus-job.c \
1053 src/core/dbus-job.h \
1054 src/core/dbus-service.c \
1055 src/core/dbus-service.h \
1056 src/core/dbus-socket.c \
1057 src/core/dbus-socket.h \
1058 src/core/dbus-busname.c \
1059 src/core/dbus-busname.h \
1060 src/core/dbus-target.c \
1061 src/core/dbus-target.h \
1062 src/core/dbus-snapshot.c \
1063 src/core/dbus-snapshot.h \
1064 src/core/dbus-device.c \
1065 src/core/dbus-device.h \
1066 src/core/dbus-mount.c \
1067 src/core/dbus-mount.h \
1068 src/core/dbus-automount.c \
1069 src/core/dbus-automount.h \
1070 src/core/dbus-swap.c \
1071 src/core/dbus-swap.h \
1072 src/core/dbus-timer.c \
1073 src/core/dbus-timer.h \
1074 src/core/dbus-path.c \
1075 src/core/dbus-path.h \
1076 src/core/dbus-slice.c \
1077 src/core/dbus-slice.h \
1078 src/core/dbus-scope.c \
1079 src/core/dbus-scope.h \
1080 src/core/dbus-execute.c \
1081 src/core/dbus-execute.h \
1082 src/core/dbus-kill.c \
1083 src/core/dbus-kill.h \
1084 src/core/dbus-cgroup.c \
1085 src/core/dbus-cgroup.h \
1086 src/core/cgroup.c \
1087 src/core/cgroup.h \
1088 src/core/selinux-access.c \
1089 src/core/selinux-access.h \
1090 src/core/selinux-setup.c \
1091 src/core/selinux-setup.h \
1092 src/core/smack-setup.c \
1093 src/core/smack-setup.h \
1094 src/core/ima-setup.c \
1095 src/core/ima-setup.h \
1096 src/core/locale-setup.h \
1097 src/core/locale-setup.c \
1098 src/core/hostname-setup.c \
1099 src/core/hostname-setup.h \
1100 src/core/machine-id-setup.c \
1101 src/core/machine-id-setup.h \
1102 src/core/mount-setup.c \
1103 src/core/mount-setup.h \
1104 src/core/loopback-setup.h \
1105 src/core/loopback-setup.c \
1106 src/core/condition.c \
1107 src/core/condition.h \
1108 src/core/namespace.c \
1109 src/core/namespace.h \
1110 src/core/build.h \
1111 src/core/sysfs-show.h \
1112 src/core/switch-root.h \
1113 src/core/switch-root.c \
1114 src/core/killall.h \
1115 src/core/killall.c \
1116 src/core/audit-fd.c \
1117 src/core/audit-fd.h \
1118 src/core/show-status.c \
1119 src/core/show-status.h \
1120 src/core/failure-action.c \
1121 src/core/failure-action.h
1122
1123if HAVE_KMOD
1124libsystemd_core_la_SOURCES += \
1125 src/core/kmod-setup.c \
1126 src/core/kmod-setup.h
1127endif
1128
1129nodist_libsystemd_core_la_SOURCES = \
1130 src/core/load-fragment-gperf.c \
1131 src/core/load-fragment-gperf-nulstr.c
1132
1133libsystemd_core_la_CFLAGS = \
1134 $(AM_CFLAGS) \
1135 $(PAM_CFLAGS) \
1136 $(AUDIT_CFLAGS) \
1137 $(CAP_CFLAGS) \
1138 $(KMOD_CFLAGS) \
1139 $(APPARMOR_CFLAGS) \
1140 $(SECCOMP_CFLAGS) \
1141 -pthread
1142
1143libsystemd_core_la_LIBADD = \
1144 libsystemd-capability.la \
1145 libsystemd-units.la \
1146 libsystemd-label.la \
1147 libudev-internal.la \
1148 libsystemd-shared.la \
1149 libsystemd-internal.la \
1150 $(PAM_LIBS) \
1151 $(AUDIT_LIBS) \
1152 $(CAP_LIBS) \
1153 $(KMOD_LIBS) \
1154 $(APPARMOR_LIBS) \
1155 $(SECCOMP_LIBS)
1156
1157if HAVE_SECCOMP
1158libsystemd_core_la_LIBADD += \
1159 libsystemd-seccomp.la
1160endif
1161
1162src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1163 $(AM_V_at)$(MKDIR_P) $(dir $@)
1164 $(AM_V_GEN)$(AWK) 'BEGIN{ keywords=0 ; FS="," ; print "extern const char load_fragment_gperf_nulstr[];" ; print "const char load_fragment_gperf_nulstr[] ="} ; keyword==1 { print "\"" $$1 "\\0\"" } ; /%%/ { keyword=1} ; END { print ";" }' < $< > $@
1165
1166EXTRA_DIST += \
1167 src/core/load-fragment-gperf.gperf.m4
1168
1169CLEANFILES += \
1170 src/core/load-fragment-gperf.gperf \
1171 src/core/load-fragment-gperf.c \
1172 src/core/load-fragment-gperf-nulstr.c \
1173 src/shared/errno-list.txt \
1174 src/shared/errno-from-name.gperf \
1175 src/shared/af-list.txt \
1176 src/shared/af-from-name.gperf \
1177 src/shared/arphrd-list.txt \
1178 src/shared/arphrd-from-name.gperf \
1179 src/shared/dns_type-list.txt \
1180 src/shared/dns_type-from-name.gperf
1181
1182BUILT_SOURCES += \
1183 src/shared/errno-from-name.h \
1184 src/shared/errno-to-name.h \
1185 src/shared/af-from-name.h \
1186 src/shared/af-to-name.h \
1187 src/shared/arphrd-from-name.h \
1188 src/shared/arphrd-to-name.h \
1189 src/resolve/dns_type-from-name.h \
1190 src/resolve/dns_type-to-name.h
1191
1192%-from-name.gperf: %-list.txt
1193 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
1194
1195%-from-name.h: %-from-name.gperf
1196 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
1197
1198
1199src/shared/errno-list.txt:
1200 $(AM_V_at)$(MKDIR_P) $(dir $@)
1201 $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
1202
1203src/shared/errno-to-name.h: src/shared/errno-list.txt
1204 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1205
1206
1207src/shared/af-list.txt:
1208 $(AM_V_at)$(MKDIR_P) $(dir $@)
1209 $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/socket.h - </dev/null | grep -v AF_UNSPEC | grep -v AF_MAX | $(AWK) '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $$2; }' >$@
1210
1211src/shared/af-to-name.h: src/shared/af-list.txt
1212 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const af_names[] = { "} !/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1213
1214src/shared/arphrd-list.txt:
1215 $(AM_V_at)$(MKDIR_P) $(dir $@)
1216 $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include net/if_arp.h - </dev/null | $(AWK) '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $$2; }' | sed -e 's/ARPHRD_//' >$@
1217
1218src/shared/arphrd-to-name.h: src/shared/arphrd-list.txt
1219 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1220
1221src/shared/arphrd-from-name.gperf: src/shared/arphrd-list.txt
1222 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct arphrd_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, ARPHRD_%s\n", $$1, $$1 }' <$< >$@
1223
1224
1225src/resolve/dns_type-list.txt: src/resolve/dns-type.h
1226 $(AM_V_at)$(MKDIR_P) $(dir $@)
1227 $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@
1228
1229src/resolve/dns_type-to-name.h: src/resolve/dns_type-list.txt
1230 $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *dns_type_to_string(int type) {\n\tswitch(type) {" } {printf " case DNS_TYPE_%s: return ", $$1; sub(/_/, "-"); printf "\"%s\";\n", $$1 } END{ print "\ndefault: return NULL;\n\t}\n}\n" }' <$< >$@
1231
1232src/resolve/dns_type-from-name.gperf: src/resolve/dns_type-list.txt
1233 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct dns_type_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { s=$$1; sub(/_/, "-", s); printf "%s, ", $$s; printf "DNS_TYPE_%s\n", $$1 }' <$< >$@
1234
1235# ------------------------------------------------------------------------------
1236systemd_SOURCES = \
1237 src/core/main.c
1238
1239systemd_CFLAGS = \
1240 $(AM_CFLAGS) \
1241 $(SECCOMP_CFLAGS)
1242
1243systemd_LDADD = \
1244 libsystemd-core.la \
1245 $(RT_LIBS)
1246
1247dist_pkgsysconf_DATA += \
1248 src/core/system.conf \
1249 src/core/user.conf
1250
1251dist_dbuspolicy_DATA += \
1252 src/core/org.freedesktop.systemd1.conf
1253
1254dist_dbussystemservice_DATA += \
1255 src/core/org.freedesktop.systemd1.service
1256
1257polkitpolicy_in_in_files += \
1258 src/core/org.freedesktop.systemd1.policy.in.in
1259
1260pkgconfigdata_DATA = \
1261 src/core/systemd.pc
1262
1263nodist_rpmmacros_DATA = \
1264 src/core/macros.systemd
1265
1266EXTRA_DIST += \
1267 src/core/systemd.pc.in \
1268 src/core/macros.systemd.in
1269
1270CLEANFILES += \
1271 src/core/macros.systemd \
1272 src/core/org.freedesktop.systemd1.policy.in
1273
1274# ------------------------------------------------------------------------------
1275
1276manual_tests += \
1277 test-ns \
1278 test-loopback \
1279 test-hostname \
1280 test-daemon \
1281 test-cgroup \
1282 test-install \
1283 test-watchdog \
1284 test-log \
1285 test-ipcrm
1286
1287if HAVE_KMOD
1288manual_tests += \
1289 test-rtnl-manual
1290endif
1291
1292tests += \
1293 test-engine \
1294 test-cgroup-mask \
1295 test-job-type \
1296 test-env-replace \
1297 test-strbuf \
1298 test-strv \
1299 test-path-util \
1300 test-strxcpyx \
1301 test-unit-name \
1302 test-unit-file \
1303 test-utf8 \
1304 test-ellipsize \
1305 test-util \
1306 test-ring \
1307 test-barrier \
1308 test-pty \
1309 test-tmpfiles \
1310 test-namespace \
1311 test-date \
1312 test-sleep \
1313 test-replace-var \
1314 test-sched-prio \
1315 test-calendarspec \
1316 test-strip-tab-ansi \
1317 test-cgroup-util \
1318 test-prioq \
1319 test-fileio \
1320 test-time \
1321 test-hashmap \
1322 test-list \
1323 test-tables \
1324 test-device-nodes \
1325 test-xml \
1326 test-architecture \
1327 test-socket-util \
1328 test-fdset \
1329 test-conf-files \
1330 test-capability \
1331 test-async \
1332 test-ratelimit \
1333 test-condition-util \
1334 test-uid-range
1335
1336EXTRA_DIST += \
1337 test/a.service \
1338 test/basic.target \
1339 test/b.service \
1340 test/c.service \
1341 test/daughter.service \
1342 test/d.service \
1343 test/end.service \
1344 test/e.service \
1345 test/f.service \
1346 test/grandchild.service \
1347 test/g.service \
1348 test/hello-after-sleep.target \
1349 test/hello.service \
1350 test/h.service \
1351 test/parent-deep.slice \
1352 test/parent.slice \
1353 test/paths.target \
1354 test/sched_idle_bad.service \
1355 test/sched_idle_ok.service \
1356 test/sched_rr_bad.service \
1357 test/sched_rr_change.service \
1358 test/sched_rr_ok.service \
1359 test/shutdown.target \
1360 test/sleep.service \
1361 test/sockets.target \
1362 test/son.service \
1363 test/sysinit.target \
1364 test/testsuite.target \
1365 test/timers.target \
1366 test/unstoppable.service
1367
1368EXTRA_DIST += \
1369 src/test/test-helper.h
1370
1371test_device_nodes_SOURCES = \
1372 src/test/test-device-nodes.c
1373
1374test_device_nodes_LDADD = \
1375 libsystemd-shared.la
1376
1377test_engine_SOURCES = \
1378 src/test/test-engine.c
1379
1380test_engine_CFLAGS = \
1381 $(AM_CFLAGS) \
1382 $(SECCOMP_CFLAGS)
1383
1384test_engine_LDADD = \
1385 libsystemd-core.la \
1386 $(RT_LIBS)
1387
1388test_job_type_SOURCES = \
1389 src/test/test-job-type.c
1390
1391test_job_type_CFLAGS = \
1392 $(AM_CFLAGS) \
1393 $(SECCOMP_CFLAGS)
1394
1395test_job_type_LDADD = \
1396 libsystemd-core.la \
1397 $(RT_LIBS)
1398
1399test_ns_SOURCES = \
1400 src/test/test-ns.c
1401
1402test_ns_CFLAGS = \
1403 $(AM_CFLAGS) \
1404 $(SECCOMP_CFLAGS)
1405
1406test_ns_LDADD = \
1407 libsystemd-core.la
1408
1409test_loopback_SOURCES = \
1410 src/test/test-loopback.c
1411
1412test_loopback_LDADD = \
1413 libsystemd-core.la
1414
1415test_hostname_SOURCES = \
1416 src/test/test-hostname.c
1417
1418test_hostname_LDADD = \
1419 libsystemd-core.la
1420
1421if ENABLE_EFI
1422manual_tests += \
1423 test-boot-timestamp
1424
1425test_boot_timestamp_SOURCES = \
1426 src/test/test-boot-timestamps.c
1427
1428test_boot_timestamp_LDADD = \
1429 libsystemd-shared.la
1430endif
1431
1432test_unit_name_SOURCES = \
1433 src/test/test-unit-name.c
1434
1435test_unit_name_CFLAGS = \
1436 $(AM_CFLAGS) \
1437 $(SECCOMP_CFLAGS)
1438
1439test_unit_name_LDADD = \
1440 libsystemd-core.la \
1441 $(RT_LIBS)
1442
1443test_unit_file_SOURCES = \
1444 src/test/test-unit-file.c
1445
1446test_unit_file_CFLAGS = \
1447 $(AM_CFLAGS) \
1448 $(SECCOMP_CFLAGS)
1449
1450test_unit_file_LDADD = \
1451 libsystemd-core.la \
1452 $(RT_LIBS)
1453
1454test_utf8_SOURCES = \
1455 src/test/test-utf8.c
1456
1457test_utf8_LDADD = \
1458 libsystemd-shared.la
1459
1460test_capability_SOURCES = \
1461 src/test/test-capability.c
1462
1463test_capability_LDADD = \
1464 libsystemd-shared.la \
1465 libsystemd-capability.la
1466
1467test_async_SOURCES = \
1468 src/test/test-async.c
1469
1470test_async_LDADD = \
1471 libsystemd-shared.la
1472
1473test_condition_util_SOURCES = \
1474 src/test/test-condition-util.c
1475
1476test_condition_util_LDADD = \
1477 libsystemd-shared.la \
1478 libsystemd-internal.la
1479
1480
1481test_fdset_SOURCES = \
1482 src/test/test-fdset.c
1483
1484test_fdset_LDADD = \
1485 libsystemd-core.la
1486
1487test_ratelimit_SOURCES = \
1488 src/test/test-ratelimit.c
1489
1490test_ratelimit_LDADD = \
1491 libsystemd-shared.la
1492
1493test_util_SOURCES = \
1494 src/test/test-util.c
1495
1496test_util_LDADD = \
1497 libsystemd-core.la
1498
1499test_uid_range_SOURCES = \
1500 src/test/test-uid-range.c
1501
1502test_uid_range_LDADD = \
1503 libsystemd-core.la
1504
1505test_socket_util_SOURCES = \
1506 src/test/test-socket-util.c
1507
1508test_socket_util_LDADD = \
1509 libsystemd-core.la
1510
1511test_ring_SOURCES = \
1512 src/test/test-ring.c
1513
1514test_ring_LDADD = \
1515 libsystemd-core.la
1516
1517test_barrier_SOURCES = \
1518 src/test/test-barrier.c
1519
1520test_barrier_LDADD = \
1521 libsystemd-core.la
1522
1523test_pty_SOURCES = \
1524 src/test/test-pty.c
1525
1526test_pty_LDADD = \
1527 libsystemd-core.la
1528
1529test_tmpfiles_SOURCES = \
1530 src/test/test-tmpfiles.c
1531
1532test_tmpfiles_LDADD = \
1533 libsystemd-shared.la
1534
1535test_namespace_SOURCES = \
1536 src/test/test-namespace.c
1537
1538test_namespace_LDADD = \
1539 libsystemd-core.la
1540
1541test_hashmap_SOURCES = \
1542 src/test/test-hashmap.c
1543
1544test_hashmap_LDADD = \
1545 libsystemd-core.la
1546
1547test_xml_SOURCES = \
1548 src/test/test-xml.c
1549
1550test_xml_LDADD = \
1551 libsystemd-shared.la
1552
1553test_list_SOURCES = \
1554 src/test/test-list.c
1555
1556test_list_LDADD = \
1557 libsystemd-core.la
1558
1559test_tables_SOURCES = \
1560 src/test/test-tables.c \
1561 src/shared/test-tables.h \
1562 src/bus-proxyd/bus-policy.c \
1563 src/bus-proxyd/bus-policy.h \
1564 src/journal/journald-server.c \
1565 src/journal/journald-server.h
1566
1567test_tables_CPPFLAGS = \
1568 $(AM_CPPFLAGS) \
1569 -I$(top_srcdir)/src/bus-proxyd
1570
1571test_tables_CFLAGS = \
1572 $(AM_CFLAGS) \
1573 $(SECCOMP_CFLAGS)
1574
1575test_tables_LDADD = \
1576 libsystemd-logs.la \
1577 libsystemd-journal-internal.la \
1578 libsystemd-journal-core.la \
1579 libsystemd-core.la \
1580 libudev-core.la \
1581 $(RT_LIBS)
1582
1583test_prioq_SOURCES = \
1584 src/test/test-prioq.c
1585
1586test_prioq_LDADD = \
1587 libsystemd-core.la
1588
1589test_fileio_SOURCES = \
1590 src/test/test-fileio.c
1591
1592test_fileio_LDADD = \
1593 libsystemd-core.la
1594
1595test_time_SOURCES = \
1596 src/test/test-time.c
1597
1598test_time_LDADD = \
1599 libsystemd-core.la
1600
1601test_architecture_SOURCES = \
1602 src/test/test-architecture.c
1603
1604test_architecture_LDADD = \
1605 libsystemd-shared.la
1606
1607test_log_SOURCES = \
1608 src/test/test-log.c
1609
1610test_log_LDADD = \
1611 libsystemd-core.la
1612
1613test_ipcrm_SOURCES = \
1614 src/test/test-ipcrm.c
1615
1616test_ipcrm_LDADD = \
1617 libsystemd-shared.la \
1618 -lrt
1619
1620test_rtnl_manual_SOURCES = \
1621 src/test/test-rtnl-manual.c
1622
1623test_rtnl_manual_CFLAGS = \
1624 $(AM_CFLAGS) \
1625 $(KMOD_CFLAGS)
1626
1627test_rtnl_manual_LDADD = \
1628 libsystemd-internal.la \
1629 libsystemd-shared.la \
1630 $(KMOD_LIBS)
1631
1632test_ellipsize_SOURCES = \
1633 src/test/test-ellipsize.c
1634
1635test_ellipsize_LDADD = \
1636 libsystemd-core.la
1637
1638test_date_SOURCES = \
1639 src/test/test-date.c
1640
1641test_date_LDADD = \
1642 libsystemd-core.la
1643
1644test_sleep_SOURCES = \
1645 src/test/test-sleep.c
1646
1647test_sleep_LDADD = \
1648 libsystemd-core.la
1649
1650test_replace_var_SOURCES = \
1651 src/test/test-replace-var.c
1652
1653test_replace_var_LDADD = \
1654 libsystemd-shared.la
1655
1656test_calendarspec_SOURCES = \
1657 src/test/test-calendarspec.c
1658
1659test_calendarspec_LDADD = \
1660 libsystemd-shared.la
1661
1662test_strip_tab_ansi_SOURCES = \
1663 src/test/test-strip-tab-ansi.c
1664
1665test_strip_tab_ansi_LDADD = \
1666 libsystemd-shared.la
1667
1668test_daemon_SOURCES = \
1669 src/test/test-daemon.c
1670
1671test_daemon_LDADD = \
1672 libsystemd-internal.la \
1673 libsystemd-shared.la
1674
1675test_cgroup_SOURCES = \
1676 src/test/test-cgroup.c
1677
1678test_cgroup_LDADD = \
1679 libsystemd-label.la \
1680 libsystemd-shared.la \
1681 libsystemd-internal.la
1682
1683test_cgroup_mask_SOURCES = \
1684 src/test/test-cgroup-mask.c
1685
1686test_cgroup_mask_CPPFLAGS = \
1687 $(AM_CPPFLAGS) \
1688 -DTEST_DIR=\"$(abs_top_srcdir)/test\"
1689
1690test_cgroup_mask_CFLAGS = \
1691 $(AM_CFLAGS) \
1692 $(SECCOMP_CFLAGS)
1693
1694test_cgroup_mask_LDADD = \
1695 libsystemd-core.la \
1696 $(RT_LIBS)
1697
1698test_cgroup_util_SOURCES = \
1699 src/test/test-cgroup-util.c
1700
1701test_cgroup_util_LDADD = \
1702 libsystemd-label.la \
1703 libsystemd-internal.la \
1704 libsystemd-shared.la
1705
1706test_env_replace_SOURCES = \
1707 src/test/test-env-replace.c
1708
1709test_env_replace_LDADD = \
1710 libsystemd-shared.la
1711
1712test_strbuf_SOURCES = \
1713 src/test/test-strbuf.c
1714
1715test_strbuf_LDADD = \
1716 libsystemd-shared.la
1717
1718test_strv_SOURCES = \
1719 src/test/test-strv.c
1720
1721test_strv_LDADD = \
1722 libsystemd-units.la \
1723 libsystemd-internal.la \
1724 libsystemd-shared.la
1725
1726test_path_util_SOURCES = \
1727 src/test/test-path-util.c
1728
1729test_path_util_LDADD = \
1730 libsystemd-shared.la
1731
1732test_strxcpyx_SOURCES = \
1733 src/test/test-strxcpyx.c
1734
1735test_strxcpyx_LDADD = \
1736 libsystemd-shared.la
1737
1738test_install_SOURCES = \
1739 src/test/test-install.c
1740
1741test_install_LDADD = \
1742 libsystemd-units.la \
1743 libsystemd-label.la \
1744 libsystemd-shared.la \
1745 libsystemd-internal.la
1746
1747test_watchdog_SOURCES = \
1748 src/test/test-watchdog.c
1749
1750test_watchdog_LDADD = \
1751 libsystemd-shared.la
1752
1753test_sched_prio_SOURCES = \
1754 src/test/test-sched-prio.c
1755
1756test_sched_prio_CPPFLAGS = \
1757 $(AM_CPPFLAGS) \
1758 -DTEST_DIR=\"$(abs_top_srcdir)/test\"
1759
1760test_sched_prio_CFLAGS = \
1761 $(AM_CFLAGS) \
1762 $(SECCOMP_CFLAGS)
1763
1764test_sched_prio_LDADD = \
1765 libsystemd-core.la \
1766 $(RT_LIBS)
1767
1768test_conf_files_SOURCES = \
1769 src/test/test-conf-files.c
1770
1771test_conf_files_LDADD = \
1772 libsystemd-shared.la
1773
1774# ------------------------------------------------------------------------------
1775## .PHONY so it always rebuilds it
1776.PHONY: coverage lcov-run lcov-report coverage-sync
1777
1778# run lcov from scratch, always
1779coverage: all
1780 $(MAKE) lcov-run
1781 $(MAKE) lcov-report
1782
1783coverage_dir = coverage
1784coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
1785
1786if ENABLE_COVERAGE
1787# reset run coverage tests
1788lcov-run:
1789 @rm -rf $(coverage_dir)
1790 lcov $(coverage_opts) --zerocounters
1791 -$(MAKE) check
1792
1793# generate report based on current coverage data
1794lcov-report:
1795 $(MKDIR_P) $(coverage_dir)
1796 lcov $(coverage_opts) --compat-libtool --capture --no-external \
1797 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
1798 genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov.info
1799 @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
1800
1801# lcov doesn't work properly with vpath builds, make sure that bad
1802# output is not uploaded by mistake.
1803coverage-sync: coverage
1804 test "$(builddir)" = "$(srcdir)"
1805 rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
1806
1807else
1808lcov-run lcov-report:
1809 echo "Need to reconfigure with --enable-coverage"
1810endif
1811
1812# ------------------------------------------------------------------------------
1813systemd_analyze_SOURCES = \
1814 src/analyze/analyze.c \
1815 src/analyze/analyze-verify.c \
1816 src/analyze/analyze-verify.h
1817
1818systemd_verify_CFLAGS = \
1819 $(AM_CFLAGS) \
1820 $(SECCOMP_CFLAGS)
1821
1822systemd_analyze_LDADD = \
1823 libsystemd-core.la \
1824 libsystemd-internal.la \
1825 libsystemd-shared.la \
1826 $(RT_LIBS)
1827
1828# ------------------------------------------------------------------------------
1829systemd_initctl_SOURCES = \
1830 src/initctl/initctl.c
1831
1832systemd_initctl_LDADD = \
1833 libsystemd-internal.la \
1834 libsystemd-shared.la
1835
1836# ------------------------------------------------------------------------------
1837systemd_update_utmp_SOURCES = \
1838 src/update-utmp/update-utmp.c
1839
1840systemd_update_utmp_CFLAGS = \
1841 $(AM_CFLAGS) \
1842 $(AUDIT_CFLAGS)
1843
1844systemd_update_utmp_LDADD = \
1845 libsystemd-internal.la \
1846 libsystemd-shared.la \
1847 $(AUDIT_LIBS)
1848
1849# ------------------------------------------------------------------------------
1850systemd_update_done_SOURCES = \
1851 src/update-done/update-done.c
1852
1853systemd_update_done_LDADD = \
1854 libsystemd-internal.la \
1855 libsystemd-label.la \
1856 libsystemd-shared.la
1857
1858# ------------------------------------------------------------------------------
1859systemd_shutdownd_SOURCES = \
1860 src/shutdownd/shutdownd.c
1861
1862systemd_shutdownd_LDADD = \
1863 libsystemd-label.la \
1864 libsystemd-internal.la \
1865 libsystemd-shared.la
1866
1867dist_doc_DATA += \
1868 src/systemd/sd-shutdown.h
1869
1870# ------------------------------------------------------------------------------
1871systemd_shutdown_SOURCES = \
1872 src/core/umount.c \
1873 src/core/umount.h \
1874 src/core/shutdown.c \
1875 src/core/mount-setup.c \
1876 src/core/mount-setup.h \
1877 src/core/killall.h \
1878 src/core/killall.c
1879
1880systemd_shutdown_LDADD = \
1881 libsystemd-label.la \
1882 libudev-internal.la \
1883 libsystemd-shared.la
1884
1885# ------------------------------------------------------------------------------
1886if HAVE_KMOD
1887systemd_modules_load_SOURCES = \
1888 src/modules-load/modules-load.c
1889
1890systemd_modules_load_CFLAGS = \
1891 $(AM_CFLAGS) \
1892 $(KMOD_CFLAGS)
1893
1894systemd_modules_load_LDADD = \
1895 libsystemd-shared.la \
1896 $(KMOD_LIBS)
1897
1898rootlibexec_PROGRAMS += \
1899 systemd-modules-load
1900
1901nodist_systemunit_DATA += \
1902 units/systemd-modules-load.service
1903
1904SYSINIT_TARGET_WANTS += \
1905 systemd-modules-load.service
1906
1907if ENABLE_TMPFILES
1908nodist_systemunit_DATA += \
1909 units/kmod-static-nodes.service
1910
1911SYSINIT_TARGET_WANTS += \
1912 kmod-static-nodes.service
1913endif
1914endif
1915
1916EXTRA_DIST += \
1917 units/systemd-modules-load.service.in \
1918 units/kmod-static-nodes.service.in
1919
1920# ------------------------------------------------------------------------------
1921if ENABLE_TMPFILES
1922systemd_tmpfiles_SOURCES = \
1923 src/tmpfiles/tmpfiles.c
1924
1925systemd_tmpfiles_LDADD = \
1926 libsystemd-units.la \
1927 libsystemd-label.la \
1928 libsystemd-capability.la \
1929 libsystemd-internal.la \
1930 libsystemd-shared.la
1931
1932rootbin_PROGRAMS += \
1933 systemd-tmpfiles
1934
1935dist_systemunit_DATA += \
1936 units/systemd-tmpfiles-clean.timer
1937
1938nodist_systemunit_DATA += \
1939 units/systemd-tmpfiles-setup-dev.service \
1940 units/systemd-tmpfiles-setup.service \
1941 units/systemd-tmpfiles-clean.service
1942
1943dist_tmpfiles_DATA = \
1944 tmpfiles.d/systemd.conf \
1945 tmpfiles.d/systemd-nologin.conf \
1946 tmpfiles.d/systemd-remote.conf \
1947 tmpfiles.d/tmp.conf \
1948 tmpfiles.d/x11.conf \
1949 tmpfiles.d/var.conf \
1950 tmpfiles.d/etc.conf
1951
1952if HAVE_SYSV_COMPAT
1953dist_tmpfiles_DATA += \
1954 tmpfiles.d/legacy.conf
1955endif
1956
1957SYSINIT_TARGET_WANTS += \
1958 systemd-tmpfiles-setup-dev.service \
1959 systemd-tmpfiles-setup.service
1960
1961dist_zshcompletion_DATA += \
1962 shell-completion/zsh/_systemd-tmpfiles
1963
1964TIMERS_TARGET_WANTS += \
1965 systemd-tmpfiles-clean.timer
1966
1967INSTALL_DIRS += \
1968 $(tmpfilesdir) \
1969 $(sysconfdir)/tmpfiles.d
1970endif
1971
1972EXTRA_DIST += \
1973 units/systemd-tmpfiles-setup-dev.service.in \
1974 units/systemd-tmpfiles-setup.service.in \
1975 units/systemd-tmpfiles-clean.service.in
1976
1977# ------------------------------------------------------------------------------
1978if ENABLE_SYSUSERS
1979systemd_sysusers_SOURCES = \
1980 src/sysusers/sysusers.c
1981
1982systemd_sysusers_LDADD = \
1983 libsystemd-units.la \
1984 libsystemd-label.la \
1985 libsystemd-capability.la \
1986 libsystemd-internal.la \
1987 libsystemd-shared.la
1988
1989rootbin_PROGRAMS += \
1990 systemd-sysusers
1991
1992nodist_systemunit_DATA += \
1993 units/systemd-sysusers.service
1994
1995SYSINIT_TARGET_WANTS += \
1996 systemd-sysusers.service
1997
1998dist_sysusers_DATA = \
1999 sysusers.d/systemd.conf \
2000 sysusers.d/systemd-remote.conf
2001
2002nodist_sysusers_DATA = \
2003 sysusers.d/basic.conf
2004
2005EXTRA_DIST += \
2006 units/systemd-sysusers.service.in \
2007 sysusers.d/basic.conf.in
2008
2009CLEANFILES += \
2010 sysusers.d/basic.conf
2011
2012INSTALL_DIRS += \
2013 $(sysusersdir)
2014endif
2015
2016# ------------------------------------------------------------------------------
2017dist_factory_etc_DATA = \
2018 factory/etc/nsswitch.conf
2019
2020dist_factory_pam_DATA = \
2021 factory/etc/pam.d/system-auth \
2022 factory/etc/pam.d/other
2023
2024# ------------------------------------------------------------------------------
2025if ENABLE_FIRSTBOOT
2026systemd_firstboot_SOURCES = \
2027 src/firstboot/firstboot.c
2028
2029systemd_firstboot_LDADD = \
2030 libsystemd-units.la \
2031 libsystemd-label.la \
2032 libsystemd-capability.la \
2033 libsystemd-internal.la \
2034 libsystemd-shared.la \
2035 -lcrypt
2036
2037rootbin_PROGRAMS += \
2038 systemd-firstboot
2039
2040nodist_systemunit_DATA += \
2041 units/systemd-firstboot.service
2042
2043EXTRA_DIST += \
2044 units/systemd-firstboot.service.in
2045
2046SYSINIT_TARGET_WANTS += \
2047 systemd-firstboot.service
2048endif
2049
2050# ------------------------------------------------------------------------------
2051systemd_machine_id_setup_SOURCES = \
2052 src/machine-id-setup/machine-id-setup-main.c \
2053 src/core/machine-id-setup.c \
2054 src/core/machine-id-setup.h
2055
2056systemd_machine_id_setup_LDADD = \
2057 libsystemd-label.la \
2058 libsystemd-internal.la \
2059 libsystemd-shared.la
2060
2061# ------------------------------------------------------------------------------
2062systemd_sysctl_SOURCES = \
2063 src/sysctl/sysctl.c
2064
2065systemd_sysctl_LDADD = \
2066 libsystemd-shared.la
2067
2068# ------------------------------------------------------------------------------
2069systemd_sleep_SOURCES = \
2070 src/sleep/sleep.c
2071
2072systemd_sleep_LDADD = \
2073 libsystemd-shared.la
2074
2075# ------------------------------------------------------------------------------
2076systemd_fsck_SOURCES = \
2077 src/fsck/fsck.c
2078
2079systemd_fsck_LDADD = \
2080 libsystemd-internal.la \
2081 libudev-internal.la \
2082 libsystemd-shared.la
2083
2084# ------------------------------------------------------------------------------
2085systemd_ac_power_SOURCES = \
2086 src/ac-power/ac-power.c
2087
2088systemd_ac_power_LDADD = \
2089 libudev-internal.la \
2090 libsystemd-shared.la
2091
2092# ------------------------------------------------------------------------------
2093systemd_detect_virt_SOURCES = \
2094 src/detect-virt/detect-virt.c
2095
2096systemd_detect_virt_LDADD = \
2097 libsystemd-shared.la
2098
2099INSTALL_EXEC_HOOKS += \
2100 systemd-detect-virt-install-hook
2101
2102# ------------------------------------------------------------------------------
2103systemd_delta_SOURCES = \
2104 src/delta/delta.c
2105
2106systemd_delta_LDADD = \
2107 libsystemd-shared.la
2108
2109# ------------------------------------------------------------------------------
2110systemd_hibernate_resume_SOURCES = \
2111 src/hibernate-resume/hibernate-resume.c
2112
2113systemd_hibernate_resume_LDADD = \
2114 libsystemd-internal.la \
2115 libsystemd-shared.la
2116
2117# ------------------------------------------------------------------------------
2118systemd_getty_generator_SOURCES = \
2119 src/getty-generator/getty-generator.c
2120
2121systemd_getty_generator_LDADD = \
2122 libsystemd-label.la \
2123 libsystemd-shared.la
2124
2125# ------------------------------------------------------------------------------
2126systemd_debug_generator_SOURCES = \
2127 src/debug-generator/debug-generator.c
2128
2129systemd_debug_generator_LDADD = \
2130 libsystemd-label.la \
2131 libsystemd-shared.la
2132
2133# ------------------------------------------------------------------------------
2134systemd_fstab_generator_SOURCES = \
2135 src/fstab-generator/fstab-generator.c \
2136 src/core/mount-setup.c
2137
2138systemd_fstab_generator_LDADD = \
2139 libsystemd-label.la \
2140 libsystemd-shared.la
2141
2142# ------------------------------------------------------------------------------
2143systemd_system_update_generator_SOURCES = \
2144 src/system-update-generator/system-update-generator.c
2145
2146systemd_system_update_generator_LDADD = \
2147 libsystemd-label.la \
2148 libsystemd-shared.la
2149
2150# ------------------------------------------------------------------------------
2151systemd_hibernate_resume_generator_SOURCES = \
2152 src/resume-generator/resume-generator.c
2153
2154systemd_hibernate_resume_generator_LDADD = \
2155 libsystemd-label.la \
2156 libsystemd-shared.la
2157
2158if ENABLE_EFI
2159# ------------------------------------------------------------------------------
2160systemgenerator_PROGRAMS += \
2161 systemd-efi-boot-generator
2162
2163systemd_efi_boot_generator_SOURCES = \
2164 src/efi-boot-generator/efi-boot-generator.c
2165
2166systemd_efi_boot_generator_LDADD = \
2167 libsystemd-label.la \
2168 libsystemd-shared.la
2169
2170# ------------------------------------------------------------------------------
2171bootctl_SOURCES = \
2172 src/boot/boot.h \
2173 src/boot/boot-loader.h \
2174 src/boot/bootctl.c \
2175 src/boot/boot-loader.c \
2176 src/boot/boot-efi.c
2177
2178bootctl_LDADD = \
2179 libsystemd-shared.la \
2180 libsystemd-internal.la
2181
2182bin_PROGRAMS += \
2183 bootctl
2184
2185dist_bashcompletion_DATA += \
2186 shell-completion/bash/bootctl
2187
2188dist_zshcompletion_DATA += \
2189 shell-completion/zsh/_bootctl
2190
2191endif
2192
2193# ------------------------------------------------------------------------------
2194if HAVE_BLKID
2195systemgenerator_PROGRAMS += \
2196 systemd-gpt-auto-generator
2197
2198systemd_gpt_auto_generator_SOURCES = \
2199 src/gpt-auto-generator/gpt-auto-generator.c \
2200 src/shared/blkid-util.h
2201
2202systemd_gpt_auto_generator_LDADD = \
2203 libsystemd-label.la \
2204 libsystemd-internal.la \
2205 libudev-internal.la \
2206 libsystemd-shared.la \
2207 $(BLKID_LIBS)
2208
2209systemd_gpt_auto_generator_CFLAGS = \
2210 $(AM_CFLAGS) \
2211 $(BLKID_CFLAGS)
2212endif
2213
2214# ------------------------------------------------------------------------------
2215if ENABLE_KDBUS
2216systemgenerator_PROGRAMS += \
2217 systemd-dbus1-generator
2218
2219systemd_dbus1_generator_SOURCES = \
2220 src/dbus1-generator/dbus1-generator.c
2221
2222systemd_dbus1_generator_LDADD = \
2223 libsystemd-label.la \
2224 libsystemd-shared.la \
2225 libsystemd-internal.la
2226
2227dbus1-generator-install-hook:
2228 $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
2229 $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2230 $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2231
2232dbus1-generator-uninstall-hook:
2233 rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2234
2235INSTALL_EXEC_HOOKS += dbus1-generator-install-hook
2236UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook
2237endif
2238
2239# ------------------------------------------------------------------------------
2240systemd_sysv_generator_SOURCES = \
2241 src/sysv-generator/sysv-generator.c
2242
2243systemd_sysv_generator_LDADD = \
2244 libsystemd-core.la \
2245 libsystemd-label.la \
2246 libsystemd-shared.la
2247
2248# ------------------------------------------------------------------------------
2249systemd_rc_local_generator_SOURCES = \
2250 src/rc-local-generator/rc-local-generator.c
2251
2252systemd_rc_local_generator_LDADD = \
2253 libsystemd-label.la \
2254 libsystemd-shared.la
2255
2256# ------------------------------------------------------------------------------
2257systemd_remount_fs_SOURCES = \
2258 src/remount-fs/remount-fs.c \
2259 src/core/mount-setup.c \
2260 src/core/mount-setup.h
2261
2262systemd_remount_fs_LDADD = \
2263 libsystemd-label.la \
2264 libsystemd-shared.la
2265
2266# ------------------------------------------------------------------------------
2267systemd_cgroups_agent_SOURCES = \
2268 src/cgroups-agent/cgroups-agent.c
2269
2270systemd_cgroups_agent_LDADD = \
2271 libsystemd-internal.la \
2272 libsystemd-shared.la
2273
2274# ------------------------------------------------------------------------------
2275systemd_escape_SOURCES = \
2276 src/escape/escape.c
2277
2278systemd_escape_LDADD = \
2279 libsystemd-shared.la
2280
2281# -----------------------------------------------------------------------------
2282systemctl_SOURCES = \
2283 src/systemctl/systemctl.c
2284
2285systemctl_LDADD = \
2286 libsystemd-units.la \
2287 libsystemd-label.la \
2288 libsystemd-internal.la \
2289 libsystemd-logs.la \
2290 libsystemd-journal-internal.la \
2291 libsystemd-shared.la
2292
2293# ------------------------------------------------------------------------------
2294systemd_notify_SOURCES = \
2295 src/notify/notify.c \
2296 src/readahead/sd-readahead.c
2297
2298systemd_notify_LDADD = \
2299 libsystemd-internal.la \
2300 libsystemd-shared.la
2301
2302# ------------------------------------------------------------------------------
2303systemd_path_SOURCES = \
2304 src/path/path.c
2305
2306systemd_path_LDADD = \
2307 libsystemd-internal.la \
2308 libsystemd-shared.la
2309
2310# ------------------------------------------------------------------------------
2311systemd_ask_password_SOURCES = \
2312 src/ask-password/ask-password.c
2313
2314systemd_ask_password_LDADD = \
2315 libsystemd-label.la \
2316 libsystemd-shared.la
2317
2318# ------------------------------------------------------------------------------
2319systemd_reply_password_SOURCES = \
2320 src/reply-password/reply-password.c
2321
2322systemd_reply_password_LDADD = \
2323 libsystemd-shared.la
2324
2325# ------------------------------------------------------------------------------
2326systemd_cgls_SOURCES = \
2327 src/cgls/cgls.c
2328
2329systemd_cgls_LDADD = \
2330 libsystemd-internal.la \
2331 libsystemd-shared.la
2332
2333# ------------------------------------------------------------------------------
2334systemd_cgtop_SOURCES = \
2335 src/cgtop/cgtop.c
2336
2337systemd_cgtop_LDADD = \
2338 libsystemd-shared.la
2339
2340# ------------------------------------------------------------------------------
2341systemd_nspawn_SOURCES = \
2342 src/nspawn/nspawn.c \
2343 src/core/mount-setup.c \
2344 src/core/mount-setup.h \
2345 src/core/loopback-setup.c \
2346 src/core/loopback-setup.h
2347
2348systemd_nspawn_CFLAGS = \
2349 $(AM_CFLAGS) \
2350 $(SECCOMP_CFLAGS) \
2351 $(BLKID_CFLAGS)
2352
2353systemd_nspawn_LDADD = \
2354 libsystemd-label.la \
2355 libsystemd-capability.la \
2356 libsystemd-internal.la \
2357 libudev-internal.la \
2358 libsystemd-shared.la \
2359 $(BLKID_LIBS)
2360
2361if HAVE_SECCOMP
2362systemd_nspawn_LDADD += \
2363 libsystemd-seccomp.la \
2364 $(SECCOMP_LIBS)
2365endif
2366
2367# ------------------------------------------------------------------------------
2368systemd_run_SOURCES = \
2369 src/run/run.c
2370
2371systemd_run_LDADD = \
2372 libsystemd-label.la \
2373 libsystemd-capability.la \
2374 libsystemd-internal.la \
2375 libsystemd-shared.la
2376
2377# ------------------------------------------------------------------------------
2378systemd_bus_proxyd_SOURCES = \
2379 src/bus-proxyd/bus-proxyd.c \
2380 src/bus-proxyd/bus-policy.c \
2381 src/bus-proxyd/bus-policy.h
2382
2383systemd_bus_proxyd_LDADD = \
2384 libsystemd-capability.la \
2385 libsystemd-internal.la \
2386 libsystemd-shared.la
2387
2388bus-proxyd-install-hook:
2389 $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir)
2390 $(AM_V_RM)rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
2391 $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
2392
2393bus-proxyd-uninstall-hook:
2394 rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
2395
2396INSTALL_EXEC_HOOKS += bus-proxyd-install-hook
2397UNINSTALL_EXEC_HOOKS += bus-proxyd-uninstall-hook
2398
2399if ENABLE_KDBUS
2400nodist_systemunit_DATA += \
2401 units/systemd-bus-proxyd@.service
2402
2403dist_systemunit_DATA += \
2404 units/systemd-bus-proxyd.socket
2405
2406dist_userunit_DATA += \
2407 units/user/systemd-bus-proxyd.socket \
2408 units/user/systemd-bus-proxyd@.service
2409endif
2410
2411EXTRA_DIST += \
2412 units/systemd-bus-proxyd@.service.in
2413
2414# ------------------------------------------------------------------------------
2415systemd_tty_ask_password_agent_SOURCES = \
2416 src/tty-ask-password-agent/tty-ask-password-agent.c
2417
2418systemd_tty_ask_password_agent_LDADD = \
2419 libsystemd-label.la \
2420 libsystemd-shared.la
2421
2422# ------------------------------------------------------------------------------
2423libsystemd_internal_la_SOURCES = \
2424 src/systemd/sd-bus.h \
2425 src/systemd/sd-bus-protocol.h \
2426 src/systemd/sd-bus-vtable.h \
2427 src/systemd/sd-utf8.h \
2428 src/systemd/sd-event.h \
2429 src/systemd/sd-rtnl.h \
2430 src/systemd/sd-resolve.h \
2431 src/systemd/sd-login.h \
2432 src/systemd/sd-id128.h \
2433 src/systemd/sd-daemon.h \
2434 src/systemd/sd-path.h \
2435 src/systemd/sd-network.h \
2436 src/libsystemd/sd-bus/sd-bus.c \
2437 src/libsystemd/sd-bus/bus-control.c \
2438 src/libsystemd/sd-bus/bus-control.h \
2439 src/libsystemd/sd-bus/bus-error.c \
2440 src/libsystemd/sd-bus/bus-error.h \
2441 src/libsystemd/sd-bus/bus-internal.c \
2442 src/libsystemd/sd-bus/bus-internal.h \
2443 src/libsystemd/sd-bus/bus-socket.c \
2444 src/libsystemd/sd-bus/bus-socket.h \
2445 src/libsystemd/sd-bus/bus-kernel.c \
2446 src/libsystemd/sd-bus/bus-kernel.h \
2447 src/libsystemd/sd-bus/bus-container.c \
2448 src/libsystemd/sd-bus/bus-container.h \
2449 src/libsystemd/sd-bus/bus-message.c \
2450 src/libsystemd/sd-bus/bus-message.h \
2451 src/libsystemd/sd-bus/bus-creds.c \
2452 src/libsystemd/sd-bus/bus-creds.h \
2453 src/libsystemd/sd-bus/bus-signature.c \
2454 src/libsystemd/sd-bus/bus-signature.h \
2455 src/libsystemd/sd-bus/bus-type.c \
2456 src/libsystemd/sd-bus/bus-type.h \
2457 src/libsystemd/sd-bus/bus-match.c \
2458 src/libsystemd/sd-bus/bus-match.h \
2459 src/libsystemd/sd-bus/bus-bloom.c \
2460 src/libsystemd/sd-bus/bus-bloom.h \
2461 src/libsystemd/sd-bus/bus-introspect.c \
2462 src/libsystemd/sd-bus/bus-introspect.h \
2463 src/libsystemd/sd-bus/bus-objects.c \
2464 src/libsystemd/sd-bus/bus-objects.h \
2465 src/libsystemd/sd-bus/bus-gvariant.c \
2466 src/libsystemd/sd-bus/bus-gvariant.h \
2467 src/libsystemd/sd-bus/bus-convenience.c \
2468 src/libsystemd/sd-bus/bus-track.c \
2469 src/libsystemd/sd-bus/bus-track.h \
2470 src/libsystemd/sd-bus/bus-util.c \
2471 src/libsystemd/sd-bus/bus-util.h \
2472 src/libsystemd/sd-bus/bus-slot.c \
2473 src/libsystemd/sd-bus/bus-slot.h \
2474 src/libsystemd/sd-bus/bus-protocol.h \
2475 src/libsystemd/sd-bus/kdbus.h \
2476 src/libsystemd/sd-utf8/sd-utf8.c \
2477 src/libsystemd/sd-event/sd-event.c \
2478 src/libsystemd/sd-event/event-util.h \
2479 src/libsystemd/sd-rtnl/sd-rtnl.c \
2480 src/libsystemd/sd-rtnl/rtnl-internal.h \
2481 src/libsystemd/sd-rtnl/rtnl-message.c \
2482 src/libsystemd/sd-rtnl/rtnl-types.h \
2483 src/libsystemd/sd-rtnl/rtnl-types.c \
2484 src/libsystemd/sd-rtnl/rtnl-util.h \
2485 src/libsystemd/sd-rtnl/rtnl-util.c \
2486 src/libsystemd/sd-rtnl/local-addresses.h \
2487 src/libsystemd/sd-rtnl/local-addresses.c \
2488 src/libsystemd/sd-id128/sd-id128.c \
2489 src/libsystemd/sd-daemon/sd-daemon.c \
2490 src/libsystemd/sd-login/sd-login.c \
2491 src/libsystemd/sd-path/sd-path.c \
2492 src/libsystemd/sd-network/sd-network.c \
2493 src/libsystemd/sd-network/network-util.h \
2494 src/libsystemd/sd-network/network-util.c
2495
2496nodist_libsystemd_internal_la_SOURCES = \
2497 src/libsystemd/libsystemd.sym \
2498 src/libsystemd/sd-bus/bus-error-mapping.c
2499
2500libsystemd_internal_la_CFLAGS = \
2501 $(AM_CFLAGS) \
2502 -pthread
2503
2504libsystemd_internal_la_LIBADD = \
2505 $(RT_LIBS)
2506
2507libsystemd_resolve_la_SOURCES = \
2508 src/libsystemd/sd-resolve/sd-resolve.c \
2509 src/libsystemd/sd-resolve/resolve-util.h
2510
2511libsystemd_resolve_la_CFLAGS = \
2512 $(AM_CFLAGS) \
2513 -pthread
2514
2515libsystemd_resolve_la_LIBADD = \
2516 -lresolv
2517
2518noinst_LTLIBRARIES += \
2519 libsystemd-internal.la \
2520 libsystemd-resolve.la
2521
2522libsystemd_dump_la_SOURCES = \
2523 src/libsystemd/sd-bus/bus-dump.c \
2524 src/libsystemd/sd-bus/bus-dump.h
2525
2526libsystemd_dump_la_CFLAGS = \
2527 $(AM_CFLAGS) \
2528 $(CAP_CFLAGS)
2529
2530noinst_LTLIBRARIES += \
2531 libsystemd-dump.la
2532
2533EXTRA_DIST += \
2534 src/libsystemd/libsystemd.sym.m4 \
2535 src/libsystemd/libsystemd.pc.in \
2536 src/libsystemd/sd-bus/bus-error-mapping.gperf \
2537 src/libsystemd/sd-bus/DIFFERENCES \
2538 src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
2539
2540CLEANFILES += \
2541 src/libsystemd/libsystemd.sym \
2542 src/libsystemd/sd-bus/bus-error-mapping.c
2543
2544BUILT_SOURCES += \
2545 src/libsystemd/libsystemd.sym
2546
2547libsystemd_la_SOURCES = \
2548 $(libsystemd_internal_la_SOURCES) \
2549 $(libsystemd_resolve_la_SOURCES) \
2550 $(libsystemd_journal_internal_la_SOURCES)
2551
2552nodist_libsystemd_la_SOURCES = \
2553 $(nodist_libsystemd_internal_la_SOURCES)
2554
2555libsystemd_la_CFLAGS = \
2556 $(libsystemd_internal_la_CFLAGS) \
2557 $(libsystemd_resolve_la_CFLAGS) \
2558 $(libsystemd_journal_internal_la_CFLAGS)
2559
2560libsystemd_la_LDFLAGS = \
2561 $(AM_LDFLAGS) \
2562 -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
2563 -Wl,--version-script=$(top_builddir)/src/libsystemd/libsystemd.sym
2564
2565libsystemd_la_LIBADD = \
2566 libsystemd-shared.la \
2567 $(libsystemd_internal_la_LIBADD) \
2568 $(libsystemd_journal_internal_la_LIBADD) \
2569 $(libsystemd_resolve_la_LIBADD)
2570
2571libsystemd-install-hook:
2572 libname=libsystemd.so && $(move-to-rootlibdir)
2573
2574libsystemd-uninstall-hook:
2575 rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
2576
2577INSTALL_EXEC_HOOKS += libsystemd-install-hook
2578UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
2579
2580pkgconfiglib_DATA += \
2581 src/libsystemd/libsystemd.pc
2582
2583pkginclude_HEADERS += \
2584 src/systemd/sd-login.h \
2585 src/systemd/sd-id128.h \
2586 src/systemd/sd-daemon.h
2587
2588if ENABLE_KDBUS
2589pkginclude_HEADERS += \
2590 src/systemd/sd-bus.h \
2591 src/systemd/sd-bus-protocol.h \
2592 src/systemd/sd-bus-vtable.h \
2593 src/systemd/sd-utf8.h \
2594 src/systemd/sd-event.h \
2595 src/systemd/sd-rtnl.h \
2596 src/systemd/sd-resolve.h \
2597 src/systemd/sd-path.h
2598endif
2599
2600lib_LTLIBRARIES += \
2601 libsystemd.la
2602
2603tests += \
2604 test-bus-marshal \
2605 test-bus-signature \
2606 test-bus-chat \
2607 test-bus-cleanup \
2608 test-bus-server \
2609 test-bus-match \
2610 test-bus-kernel \
2611 test-bus-kernel-bloom \
2612 test-bus-kernel-benchmark \
2613 test-bus-zero-copy \
2614 test-bus-introspect \
2615 test-bus-objects \
2616 test-bus-error \
2617 test-bus-creds \
2618 test-bus-gvariant \
2619 test-event \
2620 test-rtnl \
2621 test-resolve
2622
2623bin_PROGRAMS += \
2624 busctl
2625
2626test_bus_marshal_SOURCES = \
2627 src/libsystemd/sd-bus/test-bus-marshal.c
2628
2629test_bus_marshal_LDADD = \
2630 libsystemd-internal.la \
2631 libsystemd-shared.la \
2632 libsystemd-dump.la \
2633 libsystemd-capability.la \
2634 $(GLIB_LIBS) \
2635 $(DBUS_LIBS) \
2636 $(CAP_LIBS)
2637
2638test_bus_marshal_CFLAGS = \
2639 $(AM_CFLAGS) \
2640 $(GLIB_CFLAGS) \
2641 $(DBUS_CFLAGS) \
2642 $(CAP_CFLAGS)
2643
2644test_bus_signature_SOURCES = \
2645 src/libsystemd/sd-bus/test-bus-signature.c
2646
2647test_bus_signature_LDADD = \
2648 libsystemd-shared.la \
2649 libsystemd-internal.la
2650
2651test_bus_chat_SOURCES = \
2652 src/libsystemd/sd-bus/test-bus-chat.c
2653
2654test_bus_chat_CFLAGS = \
2655 $(AM_CFLAGS) \
2656 -pthread
2657
2658test_bus_chat_LDADD = \
2659 libsystemd-internal.la \
2660 libsystemd-shared.la
2661
2662test_bus_cleanup_SOURCES = \
2663 src/libsystemd/sd-bus/test-bus-cleanup.c
2664
2665test_bus_cleanup_CFLAGS = \
2666 $(AM_CFLAGS) \
2667 $(SECCOMP_CFLAGS)
2668
2669test_bus_cleanup_LDADD = \
2670 libsystemd-internal.la \
2671 libsystemd-shared.la
2672
2673test_bus_server_SOURCES = \
2674 src/libsystemd/sd-bus/test-bus-server.c
2675
2676test_bus_server_CFLAGS = \
2677 $(AM_CFLAGS) \
2678 -pthread
2679
2680test_bus_server_LDADD = \
2681 libsystemd-internal.la \
2682 libsystemd-shared.la
2683
2684test_bus_objects_SOURCES = \
2685 src/libsystemd/sd-bus/test-bus-objects.c
2686
2687test_bus_objects_CFLAGS = \
2688 $(AM_CFLAGS) \
2689 $(CAP_CFLAGS) \
2690 -pthread
2691
2692test_bus_objects_LDADD = \
2693 libsystemd-internal.la \
2694 libsystemd-shared.la \
2695 libsystemd-dump.la \
2696 libsystemd-capability.la \
2697 $(CAP_LIBS)
2698
2699test_bus_error_SOURCES = \
2700 src/libsystemd/sd-bus/test-bus-error.c
2701
2702test_bus_error_LDADD = \
2703 libsystemd-internal.la \
2704 libsystemd-shared.la
2705
2706test_bus_gvariant_SOURCES = \
2707 src/libsystemd/sd-bus/test-bus-gvariant.c
2708
2709test_bus_gvariant_LDADD = \
2710 libsystemd-internal.la \
2711 libsystemd-shared.la \
2712 libsystemd-dump.la \
2713 libsystemd-capability.la \
2714 $(GLIB_LIBS) \
2715 $(CAP_LIBS)
2716
2717test_bus_gvariant_CFLAGS = \
2718 $(AM_CFLAGS) \
2719 $(GLIB_CFLAGS)
2720 $(CAP_CFLAGS)
2721
2722test_bus_creds_SOURCES = \
2723 src/libsystemd/sd-bus/test-bus-creds.c
2724
2725test_bus_creds_LDADD = \
2726 libsystemd-internal.la \
2727 libsystemd-shared.la \
2728 libsystemd-dump.la \
2729 libsystemd-capability.la
2730
2731test_bus_match_SOURCES = \
2732 src/libsystemd/sd-bus/test-bus-match.c
2733
2734test_bus_match_LDADD = \
2735 libsystemd-internal.la \
2736 libsystemd-shared.la
2737
2738test_bus_kernel_SOURCES = \
2739 src/libsystemd/sd-bus/test-bus-kernel.c
2740
2741test_bus_kernel_LDADD = \
2742 libsystemd-internal.la \
2743 libsystemd-shared.la \
2744 libsystemd-dump.la \
2745 libsystemd-capability.la \
2746 $(CAP_LIBS)
2747
2748test_bus_kernel_CFLAGS = \
2749 $(AM_CFLAGS) \
2750 $(CAP_CFLAGS)
2751
2752test_bus_kernel_bloom_SOURCES = \
2753 src/libsystemd/sd-bus/test-bus-kernel-bloom.c
2754
2755test_bus_kernel_bloom_LDADD = \
2756 libsystemd-internal.la \
2757 libsystemd-shared.la
2758
2759test_bus_kernel_benchmark_SOURCES = \
2760 src/libsystemd/sd-bus/test-bus-kernel-benchmark.c
2761
2762test_bus_kernel_benchmark_LDADD = \
2763 libsystemd-internal.la \
2764 libsystemd-shared.la
2765
2766test_bus_zero_copy_SOURCES = \
2767 src/libsystemd/sd-bus/test-bus-zero-copy.c
2768
2769test_bus_zero_copy_LDADD = \
2770 libsystemd-internal.la \
2771 libsystemd-shared.la \
2772 libsystemd-dump.la \
2773 libsystemd-capability.la \
2774 $(CAP_LIBS)
2775
2776test_bus_zero_copy_CFLAGS = \
2777 $(AM_CFLAGS) \
2778 $(CAP_CFLAGS)
2779
2780test_bus_introspect_SOURCES = \
2781 src/libsystemd/sd-bus/test-bus-introspect.c
2782
2783test_bus_introspect_LDADD = \
2784 libsystemd-internal.la \
2785 libsystemd-shared.la
2786
2787test_event_SOURCES = \
2788 src/libsystemd/sd-event/test-event.c
2789
2790test_event_LDADD = \
2791 libsystemd-internal.la \
2792 libsystemd-shared.la
2793
2794test_rtnl_SOURCES = \
2795 src/libsystemd/sd-rtnl/test-rtnl.c
2796
2797test_rtnl_LDADD = \
2798 libsystemd-internal.la \
2799 libsystemd-shared.la
2800
2801test_resolve_SOURCES = \
2802 src/libsystemd/sd-resolve/test-resolve.c
2803
2804test_resolve_LDADD = \
2805 libsystemd-resolve.la \
2806 libsystemd-internal.la \
2807 libsystemd-shared.la
2808
2809test_resolve_CFLAGS = \
2810 $(AM_CFLAGS) \
2811 -pthread
2812
2813busctl_SOURCES = \
2814 src/libsystemd/sd-bus/busctl.c
2815
2816busctl_LDADD = \
2817 libsystemd-internal.la \
2818 libsystemd-shared.la \
2819 libsystemd-dump.la \
2820 libsystemd-capability.la \
2821 $(CAP_LIBS)
2822
2823busctl_CFLAGS = \
2824 $(AM_CFLAGS) \
2825 $(CAP_CFLAGS)
2826
2827# ------------------------------------------------------------------------------
2828noinst_LTLIBRARIES += \
2829 libsystemd-network.la
2830
2831libsystemd_network_la_CFLAGS = \
2832 $(AM_CFLAGS) \
2833 $(KMOD_CFLAGS)
2834
2835libsystemd_network_la_SOURCES = \
2836 src/systemd/sd-dhcp-client.h \
2837 src/systemd/sd-dhcp-server.h \
2838 src/systemd/sd-dhcp-lease.h \
2839 src/systemd/sd-ipv4ll.h \
2840 src/systemd/sd-icmp6-nd.h \
2841 src/systemd/sd-dhcp6-client.h \
2842 src/systemd/sd-dhcp6-lease.h \
2843 src/libsystemd-network/sd-dhcp-client.c \
2844 src/libsystemd-network/sd-dhcp-server.c \
2845 src/libsystemd-network/dhcp-network.c \
2846 src/libsystemd-network/dhcp-option.c \
2847 src/libsystemd-network/dhcp-packet.c \
2848 src/libsystemd-network/dhcp-internal.h \
2849 src/libsystemd-network/dhcp-server-internal.h \
2850 src/libsystemd-network/dhcp-protocol.h \
2851 src/libsystemd-network/dhcp-lease-internal.h \
2852 src/libsystemd-network/sd-dhcp-lease.c \
2853 src/libsystemd-network/sd-ipv4ll.c \
2854 src/libsystemd-network/ipv4ll-network.c \
2855 src/libsystemd-network/ipv4ll-packet.c \
2856 src/libsystemd-network/ipv4ll-internal.h \
2857 src/libsystemd-network/network-internal.c \
2858 src/libsystemd-network/network-internal.h \
2859 src/libsystemd-network/sd-icmp6-nd.c \
2860 src/libsystemd-network/sd-dhcp6-client.c \
2861 src/libsystemd-network/dhcp6-internal.h \
2862 src/libsystemd-network/dhcp6-protocol.h \
2863 src/libsystemd-network/dhcp6-network.c \
2864 src/libsystemd-network/dhcp6-option.c \
2865 src/libsystemd-network/dhcp6-lease-internal.h \
2866 src/libsystemd-network/sd-dhcp6-lease.c
2867
2868libsystemd_network_la_LIBADD = \
2869 libudev-internal.la \
2870 libsystemd-label.la \
2871 libsystemd-internal.la \
2872 libsystemd-shared.la \
2873 $(KMOD_LIBS)
2874
2875test_dhcp_option_SOURCES = \
2876 src/libsystemd-network/dhcp-protocol.h \
2877 src/libsystemd-network/dhcp-internal.h \
2878 src/libsystemd-network/test-dhcp-option.c
2879
2880test_dhcp_option_LDADD = \
2881 libsystemd-network.la \
2882 libsystemd-internal.la \
2883 libsystemd-shared.la
2884
2885test_dhcp_client_SOURCES = \
2886 src/systemd/sd-dhcp-client.h \
2887 src/libsystemd-network/dhcp-protocol.h \
2888 src/libsystemd-network/dhcp-internal.h \
2889 src/libsystemd-network/test-dhcp-client.c
2890
2891test_dhcp_client_LDADD = \
2892 libsystemd-network.la \
2893 libsystemd-label.la \
2894 libsystemd-internal.la \
2895 libsystemd-shared.la
2896
2897test_dhcp_server_SOURCES = \
2898 src/libsystemd-network/test-dhcp-server.c
2899
2900test_dhcp_server_LDADD = \
2901 libsystemd-network.la \
2902 libsystemd-internal.la \
2903 libsystemd-shared.la
2904
2905test_ipv4ll_SOURCES = \
2906 src/systemd/sd-ipv4ll.h \
2907 src/libsystemd-network/ipv4ll-internal.h \
2908 src/libsystemd-network/test-ipv4ll.c
2909
2910test_ipv4ll_LDADD = \
2911 libsystemd-network.la \
2912 libsystemd-label.la \
2913 libsystemd-internal.la \
2914 libsystemd-shared.la
2915
2916test_icmp6_rs_SOURCES = \
2917 src/systemd/sd-dhcp6-client.h \
2918 src/systemd/sd-icmp6-nd.h \
2919 src/libsystemd-network/dhcp6-internal.h \
2920 src/libsystemd-network/test-icmp6-rs.c
2921
2922test_icmp6_rs_LDADD = \
2923 libsystemd-network.la \
2924 libsystemd-internal.la \
2925 libsystemd-shared.la
2926
2927test_dhcp6_client_SOURCES = \
2928 src/systemd/sd-dhcp6-client.h \
2929 src/libsystemd-network/dhcp6-internal.h \
2930 src/libsystemd-network/test-dhcp6-client.c
2931
2932test_dhcp6_client_LDADD = \
2933 libsystemd-network.la \
2934 libsystemd-internal.la \
2935 libsystemd-shared.la
2936
2937tests += \
2938 test-dhcp-option \
2939 test-dhcp-client \
2940 test-dhcp-server \
2941 test-ipv4ll \
2942 test-icmp6-rs \
2943 test-dhcp6-client
2944
2945# ------------------------------------------------------------------------------
2946if ENABLE_TERMINAL
2947noinst_LTLIBRARIES += \
2948 libsystemd-terminal.la
2949
2950noinst_PROGRAMS += \
2951 systemd-subterm
2952
2953unifontdatadir=$(datadir)/unifont
2954
2955dist_unifontdata_DATA = \
2956 src/libsystemd-terminal/unifont-glyph-array.bin
2957
2958tests += \
2959 test-term-page \
2960 test-term-parser \
2961 test-unifont
2962endif
2963
2964libsystemd_terminal_la_CFLAGS = \
2965 $(AM_CFLAGS)
2966
2967libsystemd_terminal_la_SOURCES = \
2968 src/libsystemd-terminal/term-internal.h \
2969 src/libsystemd-terminal/term-charset.c \
2970 src/libsystemd-terminal/term-page.c \
2971 src/libsystemd-terminal/term-parser.c \
2972 src/libsystemd-terminal/term-screen.c \
2973 src/libsystemd-terminal/term-wcwidth.c \
2974 src/libsystemd-terminal/unifont-internal.h \
2975 src/libsystemd-terminal/unifont.c
2976
2977libsystemd_terminal_la_LIBADD = \
2978 libsystemd-internal.la \
2979 libsystemd-shared.la
2980
2981systemd_subterm_SOURCES = \
2982 src/libsystemd-terminal/subterm.c
2983
2984systemd_subterm_LDADD = \
2985 libsystemd-terminal.la \
2986 libsystemd-internal.la \
2987 libsystemd-shared.la
2988
2989test_term_page_SOURCES = \
2990 src/libsystemd-terminal/test-term-page.c
2991
2992test_term_page_LDADD = \
2993 libsystemd-terminal.la \
2994 libsystemd-internal.la \
2995 libsystemd-shared.la
2996
2997test_term_parser_SOURCES = \
2998 src/libsystemd-terminal/test-term-parser.c
2999
3000test_term_parser_LDADD = \
3001 libsystemd-terminal.la \
3002 libsystemd-internal.la \
3003 libsystemd-shared.la
3004
3005test_unifont_SOURCES = \
3006 src/libsystemd-terminal/test-unifont.c
3007
3008test_unifont_LDADD = \
3009 libsystemd-terminal.la \
3010 libsystemd-internal.la \
3011 libsystemd-shared.la
3012
3013.PHONY: update-unifont
3014update-unifont: tools/compile-unifont.py
3015 $(AM_V_GEN)$(PYTHON) $< \
3016 <$(top_srcdir)/src/libsystemd-terminal/unifont.hex \
3017 >$(top_srcdir)/src/libsystemd-terminal/unifont-glyph-array.bin
3018 @echo "unifont-glyph-array.bin has been regenerated"
3019
3020# ------------------------------------------------------------------------------
3021if ENABLE_GTK_DOC
3022SUBDIRS += \
3023 docs/libudev
3024
3025noinst_DATA += \
3026 docs/html/libudev \
3027 docs/html/gudev
3028endif
3029
3030include_HEADERS += \
3031 src/libudev/libudev.h
3032
3033lib_LTLIBRARIES += \
3034 libudev.la
3035
3036libudev_la_SOURCES =\
3037 src/libudev/libudev.sym \
3038 src/libudev/libudev-private.h \
3039 src/libudev/libudev.c \
3040 src/libudev/libudev-list.c \
3041 src/libudev/libudev-util.c \
3042 src/libudev/libudev-device.c \
3043 src/libudev/libudev-enumerate.c \
3044 src/libudev/libudev-monitor.c \
3045 src/libudev/libudev-queue.c \
3046 src/libudev/libudev-hwdb-def.h \
3047 src/libudev/libudev-hwdb.c
3048
3049libudev_la_CFLAGS = \
3050 $(AM_CFLAGS) \
3051 -fvisibility=hidden
3052
3053libudev_la_LDFLAGS = \
3054 $(AM_LDFLAGS) \
3055 -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
3056 -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
3057
3058libudev_la_LIBADD = \
3059 libsystemd-internal.la \
3060 libsystemd-shared.la
3061
3062pkgconfiglib_DATA += \
3063 src/libudev/libudev.pc
3064
3065EXTRA_DIST += \
3066 src/libudev/libudev.pc.in
3067
3068CLEANFILES += \
3069 src/libudev/libudev.pc \
3070 docs/html/libudev \
3071 docs/html/gudev
3072
3073docs/html/libudev:
3074 $(AM_V_at)$(MKDIR_P) $(dir $@)
3075 $(AM_V_LN)$(LN_S) -f ../libudev/html $@
3076
3077docs/html/gudev:
3078 $(AM_V_at)$(MKDIR_P) $(dir $@)
3079 $(AM_V_LN)$(LN_S) -f ../gudev/html $@
3080
3081# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
3082libudev-install-hook:
3083 libname=libudev.so && $(move-to-rootlibdir)
3084
3085libudev-uninstall-hook:
3086 rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
3087
3088INSTALL_EXEC_HOOKS += libudev-install-hook
3089UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
3090
3091# ------------------------------------------------------------------------------
3092noinst_LTLIBRARIES += \
3093 libudev-internal.la
3094
3095libudev_internal_la_SOURCES =\
3096 $(libudev_la_SOURCES) \
3097 src/libudev/libudev-device-private.c
3098
3099libudev_internal_la_CFLAGS = \
3100 $(AM_CFLAGS) \
3101 -fvisibility=default
3102
3103# ------------------------------------------------------------------------------
3104INSTALL_DIRS += \
3105 $(sysconfdir)/udev/rules.d \
3106 $(sysconfdir)/udev/hwdb.d
3107
3108dist_network_DATA = \
3109 network/99-default.link \
3110 network/80-container-host0.network \
3111 network/80-container-ve.network
3112
3113dist_udevrules_DATA += \
3114 rules/42-usb-hid-pm.rules \
3115 rules/50-udev-default.rules \
3116 rules/60-drm.rules \
3117 rules/60-keyboard.rules \
3118 rules/60-persistent-storage-tape.rules \
3119 rules/60-persistent-serial.rules \
3120 rules/60-persistent-input.rules \
3121 rules/60-persistent-alsa.rules \
3122 rules/60-persistent-storage.rules \
3123 rules/64-btrfs.rules \
3124 rules/75-net-description.rules \
3125 rules/75-tty-description.rules \
3126 rules/78-sound-card.rules \
3127 rules/80-net-setup-link.rules \
3128 rules/95-udev-late.rules
3129
3130nodist_udevrules_DATA += \
3131 rules/99-systemd.rules
3132
3133dist_udevhwdb_DATA = \
3134 hwdb/20-pci-vendor-model.hwdb \
3135 hwdb/20-pci-classes.hwdb \
3136 hwdb/20-usb-vendor-model.hwdb \
3137 hwdb/20-usb-classes.hwdb \
3138 hwdb/20-sdio-vendor-model.hwdb \
3139 hwdb/20-sdio-classes.hwdb \
3140 hwdb/20-bluetooth-vendor-product.hwdb \
3141 hwdb/20-acpi-vendor.hwdb \
3142 hwdb/20-OUI.hwdb \
3143 hwdb/20-net-ifname.hwdb \
3144 hwdb/60-keyboard.hwdb
3145
3146udevconfdir = $(sysconfdir)/udev
3147dist_udevconf_DATA = \
3148 src/udev/udev.conf
3149
3150sharepkgconfigdir = $(datadir)/pkgconfig
3151sharepkgconfig_DATA = \
3152 src/udev/udev.pc
3153
3154EXTRA_DIST += \
3155 rules/99-systemd.rules.in \
3156 src/udev/udev.pc.in
3157
3158CLEANFILES += \
3159 rules/99-systemd.rules \
3160 src/udev/udev.pc
3161
3162EXTRA_DIST += \
3163 units/systemd-udevd.service.in \
3164 units/systemd-udev-trigger.service.in \
3165 units/systemd-udev-settle.service.in \
3166 units/systemd-udev-hwdb-update.service.in
3167
3168CLEANFILES += \
3169 units/systemd-udevd.service \
3170 units/systemd-udev-trigger.service \
3171 units/systemd-udev-settle.service \
3172 units/systemd-udev-hwdb-update.service
3173
3174SOCKETS_TARGET_WANTS += \
3175 systemd-udevd-control.socket \
3176 systemd-udevd-kernel.socket
3177
3178SYSINIT_TARGET_WANTS += \
3179 systemd-udevd.service \
3180 systemd-udev-trigger.service \
3181 systemd-udev-hwdb-update.service
3182
3183rootbin_PROGRAMS += \
3184 udevadm
3185
3186rootlibexec_PROGRAMS += \
3187 systemd-udevd
3188
3189noinst_LTLIBRARIES += \
3190 libudev-core.la
3191
3192src/udev/keyboard-keys.txt:
3193 $(AM_V_at)$(MKDIR_P) $(dir $@)
3194 $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
3195
3196src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt
3197 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
3198
3199src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
3200 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
3201
3202src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt
3203 $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
3204
3205libudev_core_la_SOURCES = \
3206 src/udev/udev.h \
3207 src/udev/udev-event.c \
3208 src/udev/udev-watch.c \
3209 src/udev/udev-node.c \
3210 src/udev/udev-rules.c \
3211 src/udev/udev-ctrl.c \
3212 src/udev/udev-builtin.c \
3213 src/udev/udev-builtin-btrfs.c \
3214 src/udev/udev-builtin-hwdb.c \
3215 src/udev/udev-builtin-input_id.c \
3216 src/udev/udev-builtin-keyboard.c \
3217 src/udev/udev-builtin-net_id.c \
3218 src/udev/udev-builtin-net_setup_link.c \
3219 src/udev/udev-builtin-path_id.c \
3220 src/udev/udev-builtin-usb_id.c \
3221 src/udev/net/link-config.h \
3222 src/udev/net/link-config.c \
3223 src/udev/net/ethtool-util.h \
3224 src/udev/net/ethtool-util.c
3225
3226nodist_libudev_core_la_SOURCES = \
3227 src/udev/keyboard-keys-from-name.h \
3228 src/udev/keyboard-keys-to-name.h \
3229 src/udev/net/link-config-gperf.c
3230
3231BUILT_SOURCES += \
3232 $(nodist_libudev_core_la_SOURCES)
3233
3234CLEANFILES += \
3235 src/udev/keyboard-keys-from-name.gperf \
3236 src/udev/keyboard-keys.txt \
3237 src/udev/net/link-config-gperf.c
3238
3239EXTRA_DIST += \
3240 src/udev/net/link-config-gperf.gperf
3241
3242libudev_core_la_CFLAGS = \
3243 $(AM_CFLAGS) \
3244 $(BLKID_CFLAGS) \
3245 $(KMOD_CFLAGS)
3246
3247libudev_core_la_LIBADD = \
3248 libudev-internal.la \
3249 libsystemd-label.la \
3250 libsystemd-internal.la \
3251 libsystemd-network.la \
3252 libsystemd-shared.la \
3253 $(BLKID_LIBS) \
3254 $(KMOD_LIBS)
3255
3256libudev_core_la_CPPFLAGS = \
3257 $(AM_CPPFLAGS) \
3258 -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
3259
3260if ENABLE_FIRMWARE
3261libudev_core_la_SOURCES += \
3262 src/udev/udev-builtin-firmware.c
3263
3264dist_udevrules_DATA += \
3265 rules/50-firmware.rules
3266endif
3267
3268if HAVE_KMOD
3269libudev_core_la_SOURCES += \
3270 src/udev/udev-builtin-kmod.c
3271
3272dist_udevrules_DATA += \
3273 rules/80-drivers.rules
3274endif
3275
3276if HAVE_BLKID
3277libudev_core_la_SOURCES += \
3278 src/udev/udev-builtin-blkid.c
3279endif
3280
3281if HAVE_ACL
3282libudev_core_la_SOURCES += \
3283 src/udev/udev-builtin-uaccess.c \
3284 src/login/logind-acl.c \
3285 src/libsystemd/sd-login/sd-login.c \
3286 src/systemd/sd-login.h
3287
3288libudev_core_la_LIBADD += \
3289 libsystemd-acl.la
3290endif
3291
3292systemd_udevd_SOURCES = \
3293 src/udev/udevd.c
3294
3295systemd_udevd_LDADD = \
3296 libudev-core.la
3297
3298udevadm_SOURCES = \
3299 src/udev/udevadm.c \
3300 src/udev/udevadm-info.c \
3301 src/udev/udevadm-control.c \
3302 src/udev/udevadm-monitor.c \
3303 src/udev/udevadm-hwdb.c \
3304 src/udev/udevadm-settle.c \
3305 src/udev/udevadm-trigger.c \
3306 src/udev/udevadm-test.c \
3307 src/udev/udevadm-test-builtin.c
3308
3309udevadm_LDADD = \
3310 libudev-core.la
3311
3312# Update hwdb on installation. Do not bother if installing
3313# in DESTDIR, since this is likely for packaging purposes.
3314hwdb-update-hook:
3315 -test -n "$(DESTDIR)" || $(rootbindir)/udevadm hwdb --update
3316
3317INSTALL_DATA_HOOKS += \
3318 hwdb-update-hook
3319
3320hwdb-remove-hook:
3321 -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
3322
3323# ------------------------------------------------------------------------------
3324TESTS += \
3325 test/udev-test.pl \
3326 test/rules-test.sh
3327
3328manual_tests += \
3329 test-libudev \
3330 test-udev
3331
3332test_libudev_SOURCES = \
3333 src/test/test-libudev.c
3334
3335test_libudev_LDADD = \
3336 libsystemd-label.la \
3337 libudev-internal.la \
3338 libsystemd-shared.la
3339
3340test_udev_SOURCES = \
3341 src/test/test-udev.c
3342
3343test_udev_LDADD = \
3344 libudev-core.la \
3345 $(BLKID_LIBS) \
3346 $(KMOD_LIBS) \
3347 $(SELINUX_LIBS)
3348
3349if HAVE_ACL
3350test_udev_LDADD += \
3351 libsystemd-acl.la
3352endif
3353
3354check_DATA += \
3355 test/sys
3356
3357# packed sysfs test tree
3358test/sys:
3359 $(AM_V_at)$(MKDIR_P) $(dir $@)
3360 $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
3361
3362test-sys-distclean:
3363 -rm -rf test/sys
3364DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
3365
3366EXTRA_DIST += \
3367 test/sys.tar.xz \
3368 test/udev-test.pl \
3369 test/rules-test.sh \
3370 test/rule-syntax-check.py
3371
3372# ------------------------------------------------------------------------------
3373ata_id_SOURCES = \
3374 src/udev/ata_id/ata_id.c
3375
3376ata_id_LDADD = \
3377 libudev-internal.la \
3378 libsystemd-shared.la
3379
3380udevlibexec_PROGRAMS += \
3381 ata_id
3382
3383# ------------------------------------------------------------------------------
3384cdrom_id_SOURCES = \
3385 src/udev/cdrom_id/cdrom_id.c
3386
3387cdrom_id_LDADD = \
3388 libudev-internal.la \
3389 libsystemd-shared.la
3390
3391udevlibexec_PROGRAMS += \
3392 cdrom_id
3393
3394dist_udevrules_DATA += \
3395 rules/60-cdrom_id.rules
3396
3397# ------------------------------------------------------------------------------
3398collect_SOURCES = \
3399 src/udev/collect/collect.c
3400
3401collect_LDADD = \
3402 libudev-internal.la \
3403 libsystemd-shared.la
3404
3405udevlibexec_PROGRAMS += \
3406 collect
3407
3408# ------------------------------------------------------------------------------
3409scsi_id_SOURCES =\
3410 src/udev/scsi_id/scsi_id.c \
3411 src/udev/scsi_id/scsi_serial.c \
3412 src/udev/scsi_id/scsi.h \
3413 src/udev/scsi_id/scsi_id.h
3414
3415scsi_id_LDADD = \
3416 libudev-internal.la \
3417 libsystemd-shared.la
3418
3419udevlibexec_PROGRAMS += \
3420 scsi_id
3421
3422EXTRA_DIST += \
3423 src/udev/scsi_id/README
3424
3425# ------------------------------------------------------------------------------
3426v4l_id_SOURCES = \
3427 src/udev/v4l_id/v4l_id.c
3428
3429v4l_id_LDADD = \
3430 libudev-internal.la
3431
3432udevlibexec_PROGRAMS += \
3433 v4l_id
3434
3435dist_udevrules_DATA += \
3436 rules/60-persistent-v4l.rules
3437
3438# ------------------------------------------------------------------------------
3439accelerometer_SOURCES = \
3440 src/udev/accelerometer/accelerometer.c
3441
3442accelerometer_LDADD = \
3443 libudev-internal.la -lm \
3444 libsystemd-shared.la
3445
3446udevlibexec_PROGRAMS += \
3447 accelerometer
3448
3449dist_udevrules_DATA += \
3450 rules/61-accelerometer.rules
3451
3452# ------------------------------------------------------------------------------
3453if ENABLE_GUDEV
3454if ENABLE_GTK_DOC
3455SUBDIRS += \
3456 docs/gudev
3457endif
3458
3459libgudev_includedir = \
3460 $(includedir)/gudev-1.0/gudev
3461
3462libgudev_include_HEADERS = \
3463 src/gudev/gudev.h \
3464 src/gudev/gudevenums.h \
3465 src/gudev/gudevenumtypes.h \
3466 src/gudev/gudevtypes.h \
3467 src/gudev/gudevclient.h \
3468 src/gudev/gudevdevice.h \
3469 src/gudev/gudevenumerator.h
3470
3471lib_LTLIBRARIES += libgudev-1.0.la
3472
3473pkgconfiglib_DATA += \
3474 src/gudev/gudev-1.0.pc
3475
3476CLEANFILES += \
3477 src/gudev/gudev-1.0.pc
3478
3479libgudev_1_0_la_SOURCES = \
3480 src/gudev/libgudev-1.0.sym \
3481 src/gudev/gudevenums.h \
3482 src/gudev/gudevenumtypes.h \
3483 src/gudev/gudevenumtypes.h\
3484 src/gudev/gudevtypes.h \
3485 src/gudev/gudevclient.h \
3486 src/gudev/gudevclient.c \
3487 src/gudev/gudevdevice.h \
3488 src/gudev/gudevdevice.c \
3489 src/gudev/gudevenumerator.h \
3490 src/gudev/gudevenumerator.c \
3491 src/gudev/gudevprivate.h
3492
3493nodist_libgudev_1_0_la_SOURCES = \
3494 src/gudev/gudevmarshal.h \
3495 src/gudev/gudevmarshal.c \
3496 src/gudev/gudevenumtypes.h \
3497 src/gudev/gudevenumtypes.c
3498
3499BUILT_SOURCES += \
3500 $(nodist_libgudev_1_0_la_SOURCES)
3501
3502libgudev_1_0_la_CPPFLAGS = \
3503 $(AM_CPPFLAGS) \
3504 -I$(top_builddir)/src\
3505 -I$(top_srcdir)/src\
3506 -I$(top_builddir)/src/gudev \
3507 -I$(top_srcdir)/src/gudev \
3508 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
3509 -D_GUDEV_COMPILATION \
3510 -DG_LOG_DOMAIN=\"GUdev\"
3511
3512libgudev_1_0_la_CFLAGS = \
3513 $(AM_CFLAGS) \
3514 -fvisibility=default \
3515 $(GLIB_CFLAGS)
3516
3517libgudev_1_0_la_LIBADD = \
3518 libudev.la \
3519 $(GLIB_LIBS)
3520
3521libgudev_1_0_la_LDFLAGS = \
3522 $(AM_LDFLAGS) \
3523 -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
3524 -export-dynamic \
3525 -no-undefined \
3526 -Wl,--version-script=$(top_srcdir)/src/gudev/libgudev-1.0.sym
3527
3528src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
3529 $(AM_V_at)$(MKDIR_P) $(dir $@)
3530 $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
3531
3532src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
3533 $(AM_V_at)$(MKDIR_P) $(dir $@)
3534 $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
3535 glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
3536
3537src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
3538 $(AM_V_at)$(MKDIR_P) $(dir $@)
3539 $(AM_V_GEN)glib-mkenums --template $^ > $@
3540
3541if HAVE_INTROSPECTION
3542-include $(INTROSPECTION_MAKEFILE)
3543
3544src/gudev/GUdev-1.0.gir: libgudev-1.0.la
3545
3546src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
3547
3548src_gudev_GUdev_1_0_gir_CFLAGS = \
3549 $(AM_CFLAGS) \
3550 $(INCLUDES) \
3551 -D_GUDEV_COMPILATION \
3552 -D_GUDEV_WORK_AROUND_DEV_T_BUG \
3553 -I$(top_srcdir)/src \
3554 -I$(top_builddir)/src \
3555 -I$(top_srcdir)/src/gudev \
3556 -I$(top_builddir)/src/gudev
3557
3558src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
3559
3560src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
3561 --pkg-export=gudev-1.0 \
3562 --warn-all
3563
3564src_gudev_GUdev_1_0_gir_FILES = \
3565 src/gudev/gudev.h \
3566 src/gudev/gudevtypes.h \
3567 src/gudev/gudevenums.h \
3568 src/gudev/gudevenumtypes.h \
3569 src/gudev/gudevclient.h \
3570 src/gudev/gudevdevice.h \
3571 src/gudev/gudevenumerator.h \
3572 src/gudev/gudevclient.c \
3573 src/gudev/gudevdevice.c \
3574 src/gudev/gudevenumerator.c
3575
3576INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
3577INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
3578
3579girdir = $(datadir)/gir-1.0
3580gir_DATA = \
3581 src/gudev/GUdev-1.0.gir
3582
3583typelibsdir = $(libdir)/girepository-1.0
3584typelibs_DATA = \
3585 src/gudev/GUdev-1.0.typelib
3586
3587CLEANFILES += $(gir_DATA) $(typelibs_DATA)
3588endif # HAVE_INTROSPECTION
3589endif
3590
3591EXTRA_DIST += \
3592 src/gudev/gudev-1.0.pc.in \
3593 src/gudev/gudevmarshal.list \
3594 src/gudev/gudevenumtypes.h.template \
3595 src/gudev/gudevenumtypes.c.template \
3596 src/gudev/gjs-example.js \
3597 src/gudev/seed-example-enum.js \
3598 src/gudev/seed-example.js
3599
3600# ------------------------------------------------------------------------------
3601mtd_probe_SOURCES = \
3602 src/udev/mtd_probe/mtd_probe.c \
3603 src/udev/mtd_probe/mtd_probe.h \
3604 src/udev/mtd_probe/probe_smartmedia.c
3605
3606dist_udevrules_DATA += \
3607 rules/75-probe_mtd.rules
3608
3609udevlibexec_PROGRAMS += \
3610 mtd_probe
3611
3612# ------------------------------------------------------------------------------
3613test_id128_SOURCES = \
3614 src/test/test-id128.c
3615
3616test_id128_LDADD = \
3617 libsystemd-internal.la \
3618 libsystemd-shared.la
3619
3620tests += \
3621 test-id128
3622
3623# ------------------------------------------------------------------------------
3624
3625rootlibexec_PROGRAMS += \
3626 systemd-activate
3627
3628systemd_activate_SOURCES = \
3629 src/activate/activate.c
3630
3631systemd_activate_LDADD = \
3632 libsystemd-label.la \
3633 libsystemd-internal.la \
3634 libsystemd-shared.la
3635
3636# ------------------------------------------------------------------------------
3637systemd_journald_SOURCES = \
3638 src/journal/journald.c \
3639 src/journal/journald-server.h
3640
3641systemd_journald_LDADD = \
3642 libsystemd-journal-core.la \
3643 libsystemd-internal.la \
3644 libsystemd-shared.la
3645
3646systemd_cat_SOURCES = \
3647 src/journal/cat.c
3648
3649systemd_cat_LDADD = \
3650 libsystemd-journal-core.la
3651
3652if HAVE_MICROHTTPD
3653rootlibexec_PROGRAMS += \
3654 systemd-journal-remote
3655
3656systemd_journal_remote_SOURCES = \
3657 src/journal-remote/journal-remote-parse.h \
3658 src/journal-remote/journal-remote-parse.c \
3659 src/journal-remote/journal-remote-write.h \
3660 src/journal-remote/journal-remote-write.c \
3661 src/journal-remote/journal-remote.h \
3662 src/journal-remote/journal-remote.c
3663
3664systemd_journal_remote_LDADD = \
3665 libsystemd-internal.la \
3666 libsystemd-journal-core.la
3667
3668systemd_journal_remote_SOURCES += \
3669 src/journal-remote/microhttpd-util.h \
3670 src/journal-remote/microhttpd-util.c
3671
3672systemd_journal_remote_CFLAGS = \
3673 $(AM_CFLAGS) \
3674 $(MICROHTTPD_CFLAGS)
3675
3676systemd_journal_remote_LDADD += \
3677 $(MICROHTTPD_LIBS)
3678
3679if HAVE_GNUTLS
3680systemd_journal_remote_LDADD += \
3681 $(GNUTLS_LIBS)
3682
3683# systemd-journal-remote make sense mostly with full crypto stack
3684dist_systemunit_DATA += \
3685 units/systemd-journal-remote.socket
3686
3687nodist_systemunit_DATA += \
3688 units/systemd-journal-remote.service
3689
3690EXTRA_DIST += \
3691 units/systemd-journal-remote.service.in
3692
3693journal-remote-install-hook: journal-install-hook
3694 -$(MKDIR_P) $(DESTDIR)/var/log/journal/remote
3695 -chown 0:0 $(DESTDIR)/var/log/journal/remote
3696 -chmod 755 $(DESTDIR)/var/log/journal/remote
3697
3698INSTALL_EXEC_HOOKS += journal-remote-install-hook
3699
3700endif
3701
3702nodist_pkgsysconf_DATA += \
3703 src/journal-remote/journal-remote.conf
3704
3705EXTRA_DIST += \
3706 src/journal-remote/journal-remote.conf.in
3707
3708CLEANFILES += \
3709 src/journal-remote/journal-remote.conf
3710endif
3711
3712if HAVE_LIBCURL
3713rootlibexec_PROGRAMS += \
3714 systemd-journal-upload
3715
3716systemd_journal_upload_SOURCES = \
3717 src/journal-remote/journal-upload.h \
3718 src/journal-remote/journal-upload.c \
3719 src/journal-remote/journal-upload-journal.c
3720
3721systemd_journal_upload_CFLAGS = \
3722 $(AM_CFLAGS) \
3723 $(LIBCURL_CFLAGS)
3724
3725systemd_journal_upload_LDADD = \
3726 libsystemd-core.la \
3727 libsystemd-internal.la \
3728 libsystemd-journal-internal.la \
3729 libsystemd-shared.la \
3730 $(LIBCURL_LIBS)
3731
3732nodist_systemunit_DATA += \
3733 units/systemd-journal-upload.service
3734
3735EXTRA_DIST += \
3736 units/systemd-journal-upload.service.in
3737
3738nodist_pkgsysconf_DATA += \
3739 src/journal-remote/journal-upload.conf
3740
3741EXTRA_DIST += \
3742 src/journal-remote/journal-upload.conf.in
3743
3744CLEANFILES += \
3745 src/journal-remote/journal-upload.conf
3746endif
3747
3748# using _CFLAGS = in the conditional below would suppress AM_CFLAGS
3749journalctl_CFLAGS = \
3750 $(AM_CFLAGS)
3751
3752journalctl_SOURCES = \
3753 src/journal/journalctl.c
3754
3755journalctl_LDADD = \
3756 libsystemd-journal-internal.la \
3757 libsystemd-internal.la \
3758 libsystemd-logs.la \
3759 libsystemd-shared.la
3760
3761if HAVE_ACL
3762journalctl_LDADD += \
3763 libsystemd-acl.la
3764endif
3765
3766if HAVE_QRENCODE
3767journalctl_SOURCES += \
3768 src/journal/journal-qrcode.c \
3769 src/journal/journal-qrcode.h
3770
3771journalctl_CFLAGS += \
3772 $(QRENCODE_CFLAGS)
3773
3774journalctl_LDADD += \
3775 $(QRENCODE_LIBS)
3776endif
3777
3778test_journal_SOURCES = \
3779 src/journal/test-journal.c
3780
3781test_journal_LDADD = \
3782 libsystemd-journal-core.la
3783
3784test_journal_send_SOURCES = \
3785 src/journal/test-journal-send.c
3786
3787test_journal_send_LDADD = \
3788 libsystemd-journal-core.la
3789
3790test_journal_syslog_SOURCES = \
3791 src/journal/test-journal-syslog.c
3792
3793test_journal_syslog_LDADD = \
3794 libsystemd-journal-core.la
3795
3796test_journal_match_SOURCES = \
3797 src/journal/test-journal-match.c
3798
3799test_journal_match_LDADD = \
3800 libsystemd-journal-core.la
3801
3802test_journal_enum_SOURCES = \
3803 src/journal/test-journal-enum.c
3804
3805test_journal_enum_LDADD = \
3806 libsystemd-journal-core.la
3807
3808test_journal_stream_SOURCES = \
3809 src/journal/test-journal-stream.c
3810
3811test_journal_stream_LDADD = \
3812 libsystemd-journal-core.la
3813
3814test_journal_flush_SOURCES = \
3815 src/journal/test-journal-flush.c
3816
3817test_journal_flush_LDADD = \
3818 libsystemd-journal-core.la
3819
3820test_journal_init_SOURCES = \
3821 src/journal/test-journal-init.c
3822
3823test_journal_init_LDADD = \
3824 libsystemd-journal-core.la
3825
3826test_journal_verify_SOURCES = \
3827 src/journal/test-journal-verify.c
3828
3829test_journal_verify_LDADD = \
3830 libsystemd-journal-core.la
3831
3832test_journal_interleaving_SOURCES = \
3833 src/journal/test-journal-interleaving.c
3834
3835test_journal_interleaving_LDADD = \
3836 libsystemd-journal-core.la
3837
3838test_mmap_cache_SOURCES = \
3839 src/journal/test-mmap-cache.c
3840
3841test_mmap_cache_LDADD = \
3842 libsystemd-journal-core.la
3843
3844test_catalog_SOURCES = \
3845 src/journal/test-catalog.c
3846
3847test_catalog_CPPFLAGS = \
3848 $(AM_CPPFLAGS) \
3849 -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
3850
3851test_catalog_LDADD = \
3852 libsystemd-journal-core.la
3853
3854test_compress_SOURCES = \
3855 src/journal/test-compress.c
3856
3857test_compress_LDADD = \
3858 libsystemd-journal-internal.la \
3859 libsystemd-shared.la
3860
3861test_compress_benchmark_SOURCES = \
3862 src/journal/test-compress-benchmark.c
3863
3864test_compress_benchmark_LDADD = \
3865 libsystemd-journal-internal.la \
3866 libsystemd-shared.la
3867
3868libsystemd_journal_core_la_SOURCES = \
3869 src/journal/journald-kmsg.c \
3870 src/journal/journald-kmsg.h \
3871 src/journal/journald-syslog.c \
3872 src/journal/journald-syslog.h \
3873 src/journal/journald-stream.c \
3874 src/journal/journald-stream.h \
3875 src/journal/journald-server.c \
3876 src/journal/journald-server.h \
3877 src/journal/journald-console.c \
3878 src/journal/journald-console.h \
3879 src/journal/journald-wall.c \
3880 src/journal/journald-wall.h \
3881 src/journal/journald-native.c \
3882 src/journal/journald-native.h \
3883 src/journal/journald-rate-limit.c \
3884 src/journal/journald-rate-limit.h \
3885 src/journal/journal-internal.h
3886
3887nodist_libsystemd_journal_core_la_SOURCES = \
3888 src/journal/journald-gperf.c
3889
3890libsystemd_journal_core_la_LIBADD = \
3891 libsystemd-journal-internal.la \
3892 libudev-internal.la \
3893 libsystemd-capability.la \
3894 libsystemd-label.la \
3895 libsystemd-internal.la \
3896 libsystemd-shared.la
3897
3898if HAVE_ACL
3899libsystemd_journal_core_la_LIBADD += \
3900 libsystemd-acl.la
3901endif
3902
3903noinst_LTLIBRARIES += \
3904 libsystemd-journal-core.la
3905
3906journal-install-hook:
3907 -$(MKDIR_P) $(DESTDIR)/var/log/journal
3908 -chown 0:0 $(DESTDIR)/var/log/journal
3909 -chmod 755 $(DESTDIR)/var/log/journal
3910 -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
3911 -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
3912
3913journal-uninstall-hook:
3914 -rmdir $(DESTDIR)/var/log/journal/remote
3915 -rmdir $(DESTDIR)/var/log/journal/
3916
3917INSTALL_EXEC_HOOKS += journal-install-hook
3918UNINSTALL_EXEC_HOOKS += journal-uninstall-hook
3919
3920# ------------------------------------------------------------------------------
3921# Update catalog on installation. Do not bother if installing
3922# in DESTDIR, since this is likely for packaging purposes.
3923catalog-update-hook:
3924 -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
3925
3926INSTALL_DATA_HOOKS += \
3927 catalog-update-hook
3928
3929catalog-remove-hook:
3930 -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
3931
3932UNINSTALL_DATA_HOOKS += \
3933 catalog-remove-hook
3934
3935manual_tests += \
3936 test-journal-enum
3937
3938tests += \
3939 test-journal \
3940 test-journal-send \
3941 test-journal-syslog \
3942 test-journal-match \
3943 test-journal-stream \
3944 test-journal-init \
3945 test-journal-verify \
3946 test-journal-interleaving \
3947 test-journal-flush \
3948 test-mmap-cache \
3949 test-catalog
3950
3951if HAVE_COMPRESSION
3952tests += \
3953 test-compress \
3954 test-compress-benchmark
3955endif
3956
3957pkginclude_HEADERS += \
3958 src/systemd/sd-journal.h \
3959 src/systemd/sd-messages.h \
3960 src/systemd/_sd-common.h
3961
3962libsystemd_journal_internal_la_SOURCES = \
3963 src/journal/sd-journal.c \
3964 src/systemd/sd-journal.h \
3965 src/systemd/_sd-common.h \
3966 src/journal/journal-file.c \
3967 src/journal/journal-file.h \
3968 src/journal/journal-vacuum.c \
3969 src/journal/journal-vacuum.h \
3970 src/journal/journal-verify.c \
3971 src/journal/journal-verify.h \
3972 src/journal/lookup3.c \
3973 src/journal/lookup3.h \
3974 src/journal/journal-send.c \
3975 src/journal/journal-def.h \
3976 src/journal/compress.h \
3977 src/journal/catalog.c \
3978 src/journal/catalog.h \
3979 src/journal/mmap-cache.c \
3980 src/journal/mmap-cache.h
3981
3982# using _CFLAGS = in the conditional below would suppress AM_CFLAGS
3983libsystemd_journal_internal_la_CFLAGS = \
3984 $(AM_CFLAGS)
3985
3986libsystemd_journal_internal_la_LIBADD =
3987
3988libsystemd_journal_internal_la_SOURCES += \
3989 src/journal/compress.c
3990
3991if HAVE_XZ
3992libsystemd_journal_internal_la_CFLAGS += \
3993 $(XZ_CFLAGS)
3994
3995libsystemd_journal_internal_la_LIBADD += \
3996 $(XZ_LIBS)
3997endif
3998
3999if HAVE_LZ4
4000libsystemd_journal_internal_la_LIBADD += \
4001 -llz4
4002endif
4003
4004if HAVE_GCRYPT
4005libsystemd_journal_internal_la_SOURCES += \
4006 src/journal/journal-authenticate.c \
4007 src/journal/journal-authenticate.h \
4008 src/journal/fsprg.c \
4009 src/journal/fsprg.h
4010
4011libsystemd_journal_internal_la_LIBADD += \
4012 $(GCRYPT_LIBS)
4013
4014# fsprg.c is a drop-in file using void pointer arithmetic
4015libsystemd_journal_internal_la_CFLAGS += \
4016 $(GCRYPT_CFLAGS) \
4017 -Wno-pointer-arith
4018endif
4019
4020noinst_LTLIBRARIES += \
4021 libsystemd-journal-internal.la
4022
4023rootlibexec_PROGRAMS += \
4024 systemd-journald
4025
4026rootbin_PROGRAMS += \
4027 journalctl
4028
4029bin_PROGRAMS += \
4030 systemd-cat
4031
4032dist_systemunit_DATA += \
4033 units/systemd-journald.socket \
4034 units/systemd-journald-dev-log.socket
4035
4036nodist_systemunit_DATA += \
4037 units/systemd-journald.service \
4038 units/systemd-journal-flush.service \
4039 units/systemd-journal-catalog-update.service
4040
4041dist_pkgsysconf_DATA += \
4042 src/journal/journald.conf
4043
4044dist_catalog_DATA = \
4045 catalog/systemd.fr.catalog \
4046 catalog/systemd.ru.catalog \
4047 catalog/systemd.it.catalog \
4048 catalog/systemd.catalog
4049
4050SOCKETS_TARGET_WANTS += \
4051 systemd-journald.socket \
4052 systemd-journald-dev-log.socket
4053
4054SYSINIT_TARGET_WANTS += \
4055 systemd-journald.service \
4056 systemd-journal-flush.service \
4057 systemd-journal-catalog-update.service
4058
4059EXTRA_DIST += \
4060 units/systemd-journald.service.in \
4061 units/systemd-journal-flush.service.in \
4062 units/systemd-journal-catalog-update.service.in \
4063 src/journal/journald-gperf.gperf
4064
4065CLEANFILES += \
4066 src/journal/journald-gperf.c
4067
4068# ------------------------------------------------------------------------------
4069if HAVE_MICROHTTPD
4070gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
4071
4072rootlibexec_PROGRAMS += \
4073 systemd-journal-gatewayd
4074
4075systemd_journal_gatewayd_SOURCES = \
4076 src/journal-remote/journal-gatewayd.c \
4077 src/journal-remote/microhttpd-util.h \
4078 src/journal-remote/microhttpd-util.c
4079
4080systemd_journal_gatewayd_LDADD = \
4081 libsystemd-logs.la \
4082 libsystemd-journal-internal.la \
4083 libsystemd-internal.la \
4084 libsystemd-shared.la \
4085 $(MICROHTTPD_LIBS)
4086
4087if HAVE_GNUTLS
4088systemd_journal_gatewayd_LDADD += \
4089 $(GNUTLS_LIBS)
4090endif
4091
4092systemd_journal_gatewayd_CFLAGS = \
4093 $(AM_CFLAGS) \
4094 $(MICROHTTPD_CFLAGS)
4095
4096systemd_journal_gatewayd_CPPFLAGS = \
4097 $(AM_CPPFLAGS) \
4098 -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
4099
4100dist_systemunit_DATA += \
4101 units/systemd-journal-gatewayd.socket
4102
4103nodist_systemunit_DATA += \
4104 units/systemd-journal-gatewayd.service
4105
4106dist_gatewayddocumentroot_DATA = \
4107 src/journal-remote/browse.html
4108
4109endif
4110
4111EXTRA_DIST += \
4112 units/systemd-journal-gatewayd.service.in
4113
4114# ------------------------------------------------------------------------------
4115
4116systemd_socket_proxyd_SOURCES = \
4117 src/socket-proxy/socket-proxyd.c
4118
4119systemd_socket_proxyd_LDADD = \
4120 libsystemd-logs.la \
4121 libsystemd-internal.la \
4122 libsystemd-journal-internal.la \
4123 libsystemd-shared.la \
4124 libsystemd-resolve.la
4125
4126# ------------------------------------------------------------------------------
4127if ENABLE_COREDUMP
4128systemd_coredump_SOURCES = \
4129 src/journal/coredump.c \
4130 src/journal/coredump-vacuum.c \
4131 src/journal/coredump-vacuum.h
4132
4133systemd_coredump_LDADD = \
4134 libsystemd-journal-internal.la \
4135 libsystemd-label.la \
4136 libsystemd-internal.la \
4137 libsystemd-shared.la
4138
4139if HAVE_ELFUTILS
4140systemd_coredump_SOURCES += \
4141 src/journal/stacktrace.c \
4142 src/journal/stacktrace.h
4143
4144systemd_coredump_LDADD += \
4145 $(ELFUTILS_LIBS)
4146endif
4147
4148rootlibexec_PROGRAMS += \
4149 systemd-coredump
4150
4151dist_pkgsysconf_DATA += \
4152 src/journal/coredump.conf
4153
4154if HAVE_ACL
4155systemd_coredump_LDADD += \
4156 libsystemd-acl.la
4157endif
4158
4159coredumpctl_SOURCES = \
4160 src/journal/coredumpctl.c
4161
4162coredumpctl_LDADD = \
4163 libsystemd-journal-internal.la \
4164 libsystemd-internal.la \
4165 libsystemd-shared.la
4166
4167bin_PROGRAMS += \
4168 coredumpctl
4169
4170manual_tests += \
4171 test-coredump-vacuum
4172
4173test_coredump_vacuum_SOURCES = \
4174 src/journal/test-coredump-vacuum.c \
4175 src/journal/coredump-vacuum.c \
4176 src/journal/coredump-vacuum.h
4177
4178test_coredump_vacuum_LDADD = \
4179 libsystemd-internal.la \
4180 libsystemd-shared.la
4181
4182dist_bashcompletion_DATA += \
4183 shell-completion/bash/coredumpctl
4184
4185dist_zshcompletion_DATA += \
4186 shell-completion/zsh/_coredumpctl
4187
4188sysctl_DATA = \
4189 sysctl.d/50-coredump.conf
4190
4191CLEANFILES += \
4192 sysctl.d/50-coredump.conf
4193endif
4194
4195EXTRA_DIST += \
4196 sysctl.d/50-coredump.conf.in
4197
4198# ------------------------------------------------------------------------------
4199if ENABLE_BINFMT
4200systemd_binfmt_SOURCES = \
4201 src/binfmt/binfmt.c
4202
4203systemd_binfmt_LDADD = \
4204 libsystemd-shared.la
4205
4206rootlibexec_PROGRAMS += \
4207 systemd-binfmt
4208
4209dist_systemunit_DATA += \
4210 units/proc-sys-fs-binfmt_misc.automount \
4211 units/proc-sys-fs-binfmt_misc.mount
4212
4213nodist_systemunit_DATA += \
4214 units/systemd-binfmt.service
4215
4216INSTALL_DIRS += \
4217 $(prefix)/lib/binfmt.d \
4218 $(sysconfdir)/binfmt.d
4219
4220SYSINIT_TARGET_WANTS += \
4221 systemd-binfmt.service \
4222 proc-sys-fs-binfmt_misc.automount
4223
4224endif
4225
4226EXTRA_DIST += \
4227 units/systemd-binfmt.service.in
4228
4229# ------------------------------------------------------------------------------
4230if ENABLE_VCONSOLE
4231systemd_vconsole_setup_SOURCES = \
4232 src/vconsole/vconsole-setup.c
4233
4234systemd_vconsole_setup_LDADD = \
4235 libsystemd-shared.la
4236
4237rootlibexec_PROGRAMS += \
4238 systemd-vconsole-setup
4239
4240nodist_systemunit_DATA += \
4241 units/systemd-vconsole-setup.service
4242
4243SYSINIT_TARGET_WANTS += \
4244 systemd-vconsole-setup.service
4245endif
4246
4247EXTRA_DIST += \
4248 units/systemd-vconsole-setup.service.in
4249
4250# ------------------------------------------------------------------------------
4251if ENABLE_READAHEAD
4252systemd_readahead_SOURCES = \
4253 src/readahead/readahead.c \
4254 src/readahead/readahead-collect.c \
4255 src/readahead/readahead-replay.c \
4256 src/readahead/readahead-analyze.c \
4257 src/readahead/readahead-common.c \
4258 src/readahead/readahead-common.h
4259
4260systemd_readahead_LDADD = \
4261 libsystemd-internal.la \
4262 libudev-internal.la \
4263 libsystemd-shared.la
4264
4265dist_doc_DATA += \
4266 src/readahead/sd-readahead.c \
4267 src/systemd/sd-readahead.h
4268
4269rootlibexec_PROGRAMS += \
4270 systemd-readahead
4271
4272dist_systemunit_DATA += \
4273 units/systemd-readahead-drop.service \
4274 units/systemd-readahead-done.timer
4275
4276nodist_systemunit_DATA += \
4277 units/systemd-readahead-collect.service \
4278 units/systemd-readahead-replay.service \
4279 units/systemd-readahead-done.service
4280
4281manual_tests += \
4282 test-ssd
4283
4284test_ssd_SOURCES = \
4285 src/readahead/test-ssd.c \
4286 src/readahead/readahead-common.c \
4287 src/readahead/readahead-common.h
4288
4289test_ssd_LDADD = \
4290 libsystemd-internal.la \
4291 libudev-internal.la \
4292 libsystemd-shared.la
4293
4294endif
4295
4296EXTRA_DIST += \
4297 units/systemd-readahead-collect.service.in \
4298 units/systemd-readahead-replay.service.in \
4299 units/systemd-readahead-done.service.in
4300
4301# ------------------------------------------------------------------------------
4302if ENABLE_BOOTCHART
4303systemd_bootchart_SOURCES = \
4304 src/bootchart/bootchart.c \
4305 src/bootchart/bootchart.h \
4306 src/bootchart/store.c \
4307 src/bootchart/store.h \
4308 src/bootchart/svg.c \
4309 src/bootchart/svg.h
4310
4311systemd_bootchart_LDADD = \
4312 libsystemd-journal-internal.la \
4313 libsystemd-shared.la
4314
4315rootlibexec_PROGRAMS += \
4316 systemd-bootchart
4317
4318dist_pkgsysconf_DATA += \
4319 src/bootchart/bootchart.conf
4320endif
4321
4322# ------------------------------------------------------------------------------
4323if ENABLE_QUOTACHECK
4324rootlibexec_PROGRAMS += \
4325 systemd-quotacheck
4326
4327nodist_systemunit_DATA += \
4328 units/systemd-quotacheck.service
4329
4330systemd_quotacheck_SOURCES = \
4331 src/quotacheck/quotacheck.c
4332
4333systemd_quotacheck_LDADD = \
4334 libsystemd-shared.la
4335endif
4336
4337EXTRA_DIST += \
4338 units/systemd-quotacheck.service.in
4339
4340nodist_systemunit_DATA += \
4341 units/quotaon.service
4342
4343# ------------------------------------------------------------------------------
4344if ENABLE_RANDOMSEED
4345rootlibexec_PROGRAMS += \
4346 systemd-random-seed
4347
4348nodist_systemunit_DATA += \
4349 units/systemd-random-seed.service
4350
4351systemd_random_seed_SOURCES = \
4352 src/random-seed/random-seed.c
4353
4354systemd_random_seed_LDADD = \
4355 libsystemd-label.la \
4356 libsystemd-shared.la
4357
4358SYSINIT_TARGET_WANTS += \
4359 systemd-random-seed.service
4360
4361endif
4362
4363EXTRA_DIST += \
4364 units/systemd-random-seed.service.in
4365
4366# ------------------------------------------------------------------------------
4367if ENABLE_BACKLIGHT
4368rootlibexec_PROGRAMS += \
4369 systemd-backlight
4370
4371nodist_systemunit_DATA += \
4372 units/systemd-backlight@.service
4373
4374systemd_backlight_SOURCES = \
4375 src/backlight/backlight.c
4376
4377systemd_backlight_LDADD = \
4378 libsystemd-label.la \
4379 libudev-internal.la \
4380 libsystemd-shared.la
4381endif
4382
4383EXTRA_DIST += \
4384 units/systemd-backlight@.service.in
4385
4386# ------------------------------------------------------------------------------
4387if ENABLE_RFKILL
4388rootlibexec_PROGRAMS += \
4389 systemd-rfkill
4390
4391nodist_systemunit_DATA += \
4392 units/systemd-rfkill@.service
4393
4394systemd_rfkill_SOURCES = \
4395 src/rfkill/rfkill.c
4396
4397systemd_rfkill_LDADD = \
4398 libsystemd-label.la \
4399 libudev-internal.la \
4400 libsystemd-shared.la
4401endif
4402
4403EXTRA_DIST += \
4404 units/systemd-rfkill@.service.in
4405
4406# ------------------------------------------------------------------------------
4407if HAVE_LIBCRYPTSETUP
4408rootlibexec_PROGRAMS += \
4409 systemd-cryptsetup
4410
4411systemgenerator_PROGRAMS += \
4412 systemd-cryptsetup-generator
4413
4414dist_systemunit_DATA += \
4415 units/cryptsetup.target \
4416 units/cryptsetup-pre.target
4417
4418systemd_cryptsetup_SOURCES = \
4419 src/cryptsetup/cryptsetup.c
4420
4421systemd_cryptsetup_CFLAGS = \
4422 $(AM_CFLAGS) \
4423 $(LIBCRYPTSETUP_CFLAGS)
4424
4425systemd_cryptsetup_LDADD = \
4426 libsystemd-label.la \
4427 libudev-internal.la \
4428 libsystemd-shared.la \
4429 $(LIBCRYPTSETUP_LIBS)
4430
4431systemd_cryptsetup_generator_SOURCES = \
4432 src/cryptsetup/cryptsetup-generator.c
4433
4434systemd_cryptsetup_generator_LDADD = \
4435 libsystemd-label.la \
4436 libsystemd-shared.la
4437
4438SYSINIT_TARGET_WANTS += \
4439 cryptsetup.target
4440
4441endif
4442
4443# ------------------------------------------------------------------------------
4444if ENABLE_HOSTNAMED
4445systemd_hostnamed_SOURCES = \
4446 src/hostname/hostnamed.c
4447
4448systemd_hostnamed_LDADD = \
4449 libsystemd-label.la \
4450 libsystemd-internal.la \
4451 libsystemd-shared.la
4452
4453rootlibexec_PROGRAMS += \
4454 systemd-hostnamed
4455
4456nodist_systemunit_DATA += \
4457 units/systemd-hostnamed.service
4458
4459dist_systemunit_DATA += \
4460 units/org.freedesktop.hostname1.busname
4461
4462dist_dbuspolicy_DATA += \
4463 src/hostname/org.freedesktop.hostname1.conf
4464
4465dist_dbussystemservice_DATA += \
4466 src/hostname/org.freedesktop.hostname1.service
4467
4468polkitpolicy_files += \
4469 src/hostname/org.freedesktop.hostname1.policy
4470
4471SYSTEM_UNIT_ALIASES += \
4472 systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
4473
4474BUSNAMES_TARGET_WANTS += \
4475 org.freedesktop.hostname1.busname
4476
4477hostnamectl_SOURCES = \
4478 src/hostname/hostnamectl.c
4479
4480hostnamectl_LDADD = \
4481 libsystemd-internal.la \
4482 libsystemd-shared.la
4483
4484bin_PROGRAMS += \
4485 hostnamectl
4486
4487dist_bashcompletion_DATA += \
4488 shell-completion/bash/hostnamectl
4489
4490dist_zshcompletion_DATA += \
4491 shell-completion/zsh/_hostnamectl
4492
4493endif
4494
4495polkitpolicy_in_files += \
4496 src/hostname/org.freedesktop.hostname1.policy.in
4497
4498EXTRA_DIST += \
4499 units/systemd-hostnamed.service.in
4500
4501# ------------------------------------------------------------------------------
4502if ENABLE_KDBUS
4503dist_systemunit_DATA += \
4504 units/org.freedesktop.systemd1.busname
4505
4506BUSNAMES_TARGET_WANTS += \
4507 org.freedesktop.systemd1.busname
4508endif
4509
4510# ------------------------------------------------------------------------------
4511if ENABLE_LOCALED
4512systemd_localed_SOURCES = \
4513 src/locale/localed.c
4514
4515systemd_localed_LDADD = \
4516 libsystemd-label.la \
4517 libsystemd-internal.la \
4518 libsystemd-shared.la
4519
4520nodist_systemunit_DATA += \
4521 units/systemd-localed.service
4522
4523dist_systemunit_DATA += \
4524 units/org.freedesktop.locale1.busname
4525
4526rootlibexec_PROGRAMS += \
4527 systemd-localed
4528
4529dist_dbuspolicy_DATA += \
4530 src/locale/org.freedesktop.locale1.conf
4531
4532dist_dbussystemservice_DATA += \
4533 src/locale/org.freedesktop.locale1.service
4534
4535polkitpolicy_files += \
4536 src/locale/org.freedesktop.locale1.policy
4537
4538SYSTEM_UNIT_ALIASES += \
4539 systemd-localed.service dbus-org.freedesktop.locale1.service
4540
4541BUSNAMES_TARGET_WANTS += \
4542 org.freedesktop.locale1.busname
4543
4544dist_pkgdata_DATA += \
4545 src/locale/kbd-model-map
4546
4547dist_noinst_SCRIPT = \
4548 src/locale/generate-kbd-model-map
4549
4550localectl_SOURCES = \
4551 src/locale/localectl.c
4552
4553localectl_LDADD = \
4554 libsystemd-internal.la \
4555 libsystemd-shared.la
4556
4557bin_PROGRAMS += \
4558 localectl
4559
4560dist_bashcompletion_DATA += \
4561 shell-completion/bash/localectl
4562
4563dist_zshcompletion_DATA += \
4564 shell-completion/zsh/_localectl
4565
4566endif
4567
4568.PHONY: update-kbd-model-map
4569
4570polkitpolicy_in_files += \
4571 src/locale/org.freedesktop.locale1.policy.in
4572
4573EXTRA_DIST += \
4574 units/systemd-localed.service.in
4575
4576# ------------------------------------------------------------------------------
4577if ENABLE_TIMEDATED
4578systemd_timedated_SOURCES = \
4579 src/timedate/timedated.c
4580
4581systemd_timedated_LDADD = \
4582 libsystemd-label.la \
4583 libsystemd-internal.la \
4584 libsystemd-shared.la
4585
4586rootlibexec_PROGRAMS += \
4587 systemd-timedated
4588
4589dist_dbussystemservice_DATA += \
4590 src/timedate/org.freedesktop.timedate1.service
4591
4592dist_dbuspolicy_DATA += \
4593 src/timedate/org.freedesktop.timedate1.conf
4594
4595nodist_systemunit_DATA += \
4596 units/systemd-timedated.service
4597
4598dist_systemunit_DATA += \
4599 units/org.freedesktop.timedate1.busname
4600
4601polkitpolicy_files += \
4602 src/timedate/org.freedesktop.timedate1.policy
4603
4604SYSTEM_UNIT_ALIASES += \
4605 systemd-timedated.service dbus-org.freedesktop.timedate1.service
4606
4607BUSNAMES_TARGET_WANTS += \
4608 org.freedesktop.timedate1.busname
4609
4610timedatectl_SOURCES = \
4611 src/timedate/timedatectl.c
4612
4613timedatectl_LDADD = \
4614 libsystemd-internal.la \
4615 libsystemd-shared.la
4616
4617bin_PROGRAMS += \
4618 timedatectl
4619
4620dist_bashcompletion_DATA += \
4621 shell-completion/bash/timedatectl
4622
4623dist_zshcompletion_DATA += \
4624 shell-completion/zsh/_timedatectl
4625endif
4626
4627polkitpolicy_in_files += \
4628 src/timedate/org.freedesktop.timedate1.policy.in
4629
4630EXTRA_DIST += \
4631 units/systemd-timedated.service.in
4632
4633# ------------------------------------------------------------------------------
4634if ENABLE_TIMESYNCD
4635systemd_timesyncd_SOURCES = \
4636 src/timesync/timesyncd.c \
4637 src/timesync/timesyncd-manager.c \
4638 src/timesync/timesyncd-manager.h \
4639 src/timesync/timesyncd-conf.c \
4640 src/timesync/timesyncd-conf.h \
4641 src/timesync/timesyncd-server.c \
4642 src/timesync/timesyncd-server.h
4643
4644nodist_systemd_timesyncd_SOURCES = \
4645 src/timesync/timesyncd-gperf.c
4646
4647EXTRA_DIST += \
4648 src/timesync/timesyncd-gperf.gperf
4649
4650CLEANFILES += \
4651 src/timesync/timesyncd-gperf.c
4652
4653systemd_timesyncd_LDADD = \
4654 libsystemd-resolve.la \
4655 libsystemd-network.la \
4656 libsystemd-label.la \
4657 libsystemd-capability.la \
4658 libsystemd-internal.la \
4659 libsystemd-shared.la \
4660 -lm
4661
4662rootlibexec_PROGRAMS += \
4663 systemd-timesyncd
4664
4665nodist_systemunit_DATA += \
4666 units/systemd-timesyncd.service
4667
4668GENERAL_ALIASES += \
4669 $(systemunitdir)/systemd-timesyncd.service $(pkgsysconfdir)/system/sysinit.target.wants/systemd-timesyncd.service
4670
4671EXTRA_DIST += \
4672 units/systemd-timesyncd.service.in
4673
4674nodist_pkgsysconf_DATA += \
4675 src/timesync/timesyncd.conf
4676
4677EXTRA_DIST += \
4678 src/timesync/timesyncd.conf.in
4679
4680CLEANFILES += \
4681 src/timesync/timesyncd.conf
4682endif
4683
4684# ------------------------------------------------------------------------------
4685if HAVE_MYHOSTNAME
4686libnss_myhostname_la_SOURCES = \
4687 src/nss-myhostname/nss-myhostname.sym \
4688 src/nss-myhostname/nss-myhostname.c
4689
4690libnss_myhostname_la_LDFLAGS = \
4691 $(AM_LDFLAGS) \
4692 -module \
4693 -export-dynamic \
4694 -avoid-version \
4695 -shared \
4696 -shrext .so.2 \
4697 -Wl,--version-script=$(top_srcdir)/src/nss-myhostname/nss-myhostname.sym
4698
4699libnss_myhostname_la_LIBADD = \
4700 libsystemd-shared.la \
4701 libsystemd-internal.la
4702
4703lib_LTLIBRARIES += \
4704 libnss_myhostname.la
4705endif
4706
4707# ------------------------------------------------------------------------------
4708if ENABLE_MACHINED
4709systemd_machined_SOURCES = \
4710 src/machine/machined.c \
4711 src/machine/machined.h
4712
4713systemd_machined_LDADD = \
4714 libsystemd-machine-core.la
4715
4716rootlibexec_PROGRAMS += \
4717 systemd-machined
4718
4719libsystemd_machine_core_la_SOURCES = \
4720 src/machine/machined-dbus.c \
4721 src/machine/machine.c \
4722 src/machine/machine.h \
4723 src/machine/machine-dbus.c
4724
4725libsystemd_machine_core_la_LIBADD = \
4726 libsystemd-label.la \
4727 libsystemd-internal.la \
4728 libudev-internal.la \
4729 libsystemd-shared.la
4730
4731noinst_LTLIBRARIES += \
4732 libsystemd-machine-core.la
4733
4734machinectl_SOURCES = \
4735 src/machine/machinectl.c
4736
4737machinectl_LDADD = \
4738 libsystemd-internal.la \
4739 libsystemd-shared.la
4740
4741rootbin_PROGRAMS += \
4742 machinectl
4743
4744dist_bashcompletion_DATA += \
4745 shell-completion/bash/machinectl
4746
4747test_machine_tables_SOURCES = \
4748 src/machine/test-machine-tables.c
4749
4750test_machine_tables_LDADD = \
4751 libsystemd-machine-core.la
4752
4753tests += \
4754 test-machine-tables
4755
4756nodist_systemunit_DATA += \
4757 units/systemd-machined.service
4758
4759dist_systemunit_DATA += \
4760 units/machine.slice \
4761 units/org.freedesktop.machine1.busname
4762
4763dist_dbussystemservice_DATA += \
4764 src/machine/org.freedesktop.machine1.service
4765
4766dist_dbuspolicy_DATA += \
4767 src/machine/org.freedesktop.machine1.conf
4768
4769dist_zshcompletion_DATA += \
4770 shell-completion/zsh/_machinectl \
4771 shell-completion/zsh/_sd_machines
4772
4773SYSTEM_UNIT_ALIASES += \
4774 systemd-machined.service dbus-org.freedesktop.machine1.service
4775
4776BUSNAMES_TARGET_WANTS += \
4777 org.freedesktop.machine1.busname
4778
4779EXTRA_DIST += \
4780 units/systemd-machined.service.in
4781
4782libnss_mymachines_la_SOURCES = \
4783 src/nss-mymachines/nss-mymachines.sym \
4784 src/nss-mymachines/nss-mymachines.c
4785
4786libnss_mymachines_la_LDFLAGS = \
4787 $(AM_LDFLAGS) \
4788 -module \
4789 -export-dynamic \
4790 -avoid-version \
4791 -shared \
4792 -shrext .so.2 \
4793 -Wl,--version-script=$(top_srcdir)/src/nss-mymachines/nss-mymachines.sym
4794
4795libnss_mymachines_la_LIBADD = \
4796 libsystemd-shared.la \
4797 libsystemd-internal.la
4798
4799lib_LTLIBRARIES += \
4800 libnss_mymachines.la
4801endif
4802
4803# ------------------------------------------------------------------------------
4804if ENABLE_RESOLVED
4805systemd_resolved_SOURCES = \
4806 src/resolve/resolved.c \
4807 src/resolve/resolved-manager.c \
4808 src/resolve/resolved-manager.h \
4809 src/resolve/resolved-conf.c \
4810 src/resolve/resolved-conf.h \
4811 src/resolve/resolved-bus.c \
4812 src/resolve/resolved-bus.h \
4813 src/resolve/resolved-link.h \
4814 src/resolve/resolved-link.c \
4815 src/resolve/resolved-def.h \
4816 src/resolve/resolved-dns-domain.h \
4817 src/resolve/resolved-dns-domain.c \
4818 src/resolve/resolved-dns-rr.h \
4819 src/resolve/resolved-dns-rr.c \
4820 src/resolve/resolved-dns-question.h \
4821 src/resolve/resolved-dns-question.c \
4822 src/resolve/resolved-dns-answer.h \
4823 src/resolve/resolved-dns-answer.c \
4824 src/resolve/resolved-dns-packet.h \
4825 src/resolve/resolved-dns-packet.c \
4826 src/resolve/resolved-dns-query.h \
4827 src/resolve/resolved-dns-query.c \
4828 src/resolve/resolved-dns-transaction.h \
4829 src/resolve/resolved-dns-transaction.c \
4830 src/resolve/resolved-dns-scope.h \
4831 src/resolve/resolved-dns-scope.c \
4832 src/resolve/resolved-dns-server.h \
4833 src/resolve/resolved-dns-server.c \
4834 src/resolve/resolved-dns-cache.h \
4835 src/resolve/resolved-dns-cache.c \
4836 src/resolve/resolved-dns-zone.h \
4837 src/resolve/resolved-dns-zone.c \
4838 src/resolve/resolved-dns-stream.h \
4839 src/resolve/resolved-dns-stream.c \
4840 src/resolve/dns-type.c \
4841 src/resolve/dns-type.h \
4842 src/resolve/dns_type-from-name.h \
4843 src/resolve/dns_type-to-name.h
4844
4845nodist_systemd_resolved_SOURCES = \
4846 src/resolve/resolved-gperf.c
4847
4848EXTRA_DIST += \
4849 src/resolve/resolved-gperf.gperf \
4850 src/resolve/dns_type-from-name.gperf
4851
4852CLEANFILES += \
4853 src/resolve/resolved-gperf.c
4854
4855systemd_resolved_LDADD = \
4856 libsystemd-capability.la \
4857 libsystemd-network.la \
4858 libsystemd-label.la \
4859 libsystemd-internal.la \
4860 libsystemd-shared.la \
4861 -lm \
4862 $(LIBIDN_LIBS)
4863
4864rootlibexec_PROGRAMS += \
4865 systemd-resolved
4866
4867nodist_systemunit_DATA += \
4868 units/systemd-resolved.service
4869
4870dist_systemunit_DATA += \
4871 units/org.freedesktop.resolve1.busname
4872
4873dist_dbuspolicy_DATA += \
4874 src/resolve/org.freedesktop.resolve1.conf
4875
4876dist_dbussystemservice_DATA += \
4877 src/resolve/org.freedesktop.resolve1.service
4878
4879EXTRA_DIST += \
4880 units/systemd-resolved.service.in
4881
4882SYSTEM_UNIT_ALIASES += \
4883 systemd-resolved.service dbus-org.freedesktop.resolve1.service
4884
4885BUSNAMES_TARGET_WANTS += \
4886 org.freedesktop.resolve1.busname
4887
4888GENERAL_ALIASES += \
4889 $(systemunitdir)/systemd-resolved.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-resolved.service
4890
4891nodist_pkgsysconf_DATA += \
4892 src/resolve/resolved.conf
4893
4894EXTRA_DIST += \
4895 src/resolve/resolved.conf.in
4896
4897CLEANFILES += \
4898 src/resolve/resolved.conf
4899
4900tests += \
4901 test-dns-domain
4902
4903test_dns_domain_SOURCES = \
4904 src/resolve/resolved-dns-domain.h \
4905 src/resolve/resolved-dns-domain.c \
4906 src/resolve/test-dns-domain.c
4907
4908test_dns_domain_LDADD = \
4909 libsystemd-capability.la \
4910 libsystemd-network.la \
4911 libsystemd-label.la \
4912 libsystemd-internal.la \
4913 libsystemd-shared.la \
4914 $(LIBIDN_LIBS)
4915
4916libnss_resolve_la_SOURCES = \
4917 src/nss-resolve/nss-resolve.sym \
4918 src/nss-resolve/nss-resolve.c
4919
4920libnss_resolve_la_LDFLAGS = \
4921 $(AM_LDFLAGS) \
4922 -module \
4923 -export-dynamic \
4924 -avoid-version \
4925 -shared \
4926 -shrext .so.2 \
4927 -Wl,--version-script=$(top_srcdir)/src/nss-resolve/nss-resolve.sym
4928
4929libnss_resolve_la_LIBADD = \
4930 libsystemd-shared.la \
4931 libsystemd-internal.la
4932
4933lib_LTLIBRARIES += \
4934 libnss_resolve.la
4935
4936systemd_resolve_host_SOURCES = \
4937 src/resolve-host/resolve-host.c \
4938 src/resolve/resolved-dns-packet.c \
4939 src/resolve/resolved-dns-packet.h \
4940 src/resolve/resolved-dns-rr.c \
4941 src/resolve/resolved-dns-rr.h \
4942 src/resolve/resolved-dns-answer.c \
4943 src/resolve/resolved-dns-answer.h \
4944 src/resolve/resolved-dns-question.c \
4945 src/resolve/resolved-dns-question.h \
4946 src/resolve/resolved-dns-domain.c \
4947 src/resolve/resolved-dns-domain.h \
4948 src/resolve/dns-type.c \
4949 src/resolve/dns-type.h \
4950 src/resolve/dns_type-from-name.h \
4951 src/resolve/dns_type-to-name.h
4952
4953systemd_resolve_host_LDADD = \
4954 libsystemd-internal.la \
4955 libsystemd-shared.la \
4956 -lm \
4957 $(LIBIDN_LIBS)
4958
4959rootlibexec_PROGRAMS += \
4960 systemd-resolve-host
4961
4962endif
4963
4964# ------------------------------------------------------------------------------
4965if ENABLE_NETWORKD
4966rootlibexec_PROGRAMS += \
4967 systemd-networkd
4968
4969systemd_networkd_SOURCES = \
4970 src/network/networkd.c
4971
4972systemd_networkd_LDADD = \
4973 libsystemd-networkd-core.la \
4974 libsystemd-capability.la
4975
4976noinst_LTLIBRARIES += \
4977 libsystemd-networkd-core.la
4978
4979libsystemd_networkd_core_la_CFLAGS = \
4980 $(AM_CFLAGS)
4981
4982libsystemd_networkd_core_la_SOURCES = \
4983 src/libsystemd-network/network-internal.h \
4984 src/network/networkd.h \
4985 src/network/networkd-link.h \
4986 src/network/networkd-netdev.h \
4987 src/network/networkd-netdev-tunnel.h \
4988 src/network/networkd-netdev-veth.h \
4989 src/network/networkd-netdev-vxlan.h \
4990 src/network/networkd-netdev-vlan.h \
4991 src/network/networkd-netdev-macvlan.h \
4992 src/network/networkd-netdev-dummy.h \
4993 src/network/networkd-netdev-tuntap.h \
4994 src/network/networkd-netdev-bond.h \
4995 src/network/networkd-netdev-bridge.h \
4996 src/network/networkd-netdev.c \
4997 src/network/networkd-netdev-tunnel.c \
4998 src/network/networkd-netdev-veth.c \
4999 src/network/networkd-netdev-vxlan.c \
5000 src/network/networkd-netdev-vlan.c \
5001 src/network/networkd-netdev-macvlan.c \
5002 src/network/networkd-netdev-dummy.c \
5003 src/network/networkd-netdev-tuntap.c \
5004 src/network/networkd-netdev-bond.c \
5005 src/network/networkd-netdev-bridge.c \
5006 src/network/networkd-link.c \
5007 src/network/networkd-ipv4ll.c \
5008 src/network/networkd-dhcp4.c \
5009 src/network/networkd-network.c \
5010 src/network/networkd-address.c \
5011 src/network/networkd-route.c \
5012 src/network/networkd-manager.c \
5013 src/network/networkd-address-pool.c
5014
5015nodist_libsystemd_networkd_core_la_SOURCES = \
5016 src/network/networkd-network-gperf.c \
5017 src/network/networkd-netdev-gperf.c
5018
5019libsystemd_networkd_core_la_LIBADD = \
5020 libudev-internal.la \
5021 libsystemd-internal.la \
5022 libsystemd-network.la \
5023 libsystemd-label.la \
5024 libsystemd-shared.la
5025
5026rootlibexec_PROGRAMS += \
5027 systemd-networkd-wait-online
5028
5029systemd_networkd_wait_online_CFLAGS = \
5030 $(AM_CFLAGS)
5031
5032systemd_networkd_wait_online_SOURCES = \
5033 src/libsystemd-network/network-internal.h \
5034 src/network/networkd-wait-online.h \
5035 src/network/networkd-wait-online-link.h \
5036 src/network/networkd-wait-online.c \
5037 src/network/networkd-wait-online-manager.c \
5038 src/network/networkd-wait-online-link.c
5039
5040systemd_networkd_wait_online_LDADD = \
5041 libsystemd-network.la \
5042 libudev-internal.la \
5043 libsystemd-internal.la \
5044 libsystemd-shared.la
5045
5046rootbin_PROGRAMS += \
5047 networkctl
5048
5049networkctl_SOURCES = \
5050 src/network/networkctl.c
5051
5052networkctl_LDADD = \
5053 libsystemd-internal.la \
5054 libudev-internal.la \
5055 libsystemd-shared.la \
5056 libsystemd-network.la
5057
5058test_network_SOURCES = \
5059 src/network/test-network.c
5060
5061test_network_CFLAGS = \
5062 $(AM_CFLAGS)
5063
5064test_network_LDADD = \
5065 libsystemd-networkd-core.la
5066
5067test_network_tables_SOURCES = \
5068 src/network/test-network-tables.c \
5069 src/shared/test-tables.h
5070
5071test_network_tables_LDADD = \
5072 libsystemd-networkd-core.la \
5073 libudev-core.la
5074
5075tests += \
5076 test-network \
5077 test-network-tables
5078
5079nodist_systemunit_DATA += \
5080 units/systemd-networkd.service \
5081 units/systemd-networkd-wait-online.service
5082
5083GENERAL_ALIASES += \
5084 $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \
5085 $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service
5086
5087EXTRA_DIST += \
5088 src/network/networkd-network-gperf.gperf \
5089 src/network/networkd-netdev-gperf.gperf \
5090 units/systemd-networkd.service.in \
5091 units/systemd-networkd-wait-online.service.in
5092
5093CLEANFILES += \
5094 src/network/networkd-network-gperf.c \
5095 src/network/networkd-netdev-gperf.c
5096endif
5097
5098# ------------------------------------------------------------------------------
5099if ENABLE_LOGIND
5100systemd_logind_SOURCES = \
5101 src/login/logind.c \
5102 src/login/logind.h
5103
5104nodist_systemd_logind_SOURCES = \
5105 src/login/logind-gperf.c
5106
5107systemd_logind_LDADD = \
5108 libsystemd-logind-core.la
5109
5110libsystemd_logind_core_la_SOURCES = \
5111 src/login/logind-core.c \
5112 src/login/logind-device.c \
5113 src/login/logind-device.h \
5114 src/login/logind-button.c \
5115 src/login/logind-button.h \
5116 src/login/logind-action.c \
5117 src/login/logind-action.h \
5118 src/login/logind-seat.c \
5119 src/login/logind-seat.h \
5120 src/login/logind-session.c \
5121 src/login/logind-session.h \
5122 src/login/logind-session-device.c \
5123 src/login/logind-session-device.h \
5124 src/login/logind-user.c \
5125 src/login/logind-user.h \
5126 src/login/logind-inhibit.c \
5127 src/login/logind-inhibit.h \
5128 src/login/logind-dbus.c \
5129 src/login/logind-session-dbus.c \
5130 src/login/logind-seat-dbus.c \
5131 src/login/logind-user-dbus.c \
5132 src/login/logind-acl.h
5133
5134libsystemd_logind_core_la_LIBADD = \
5135 libsystemd-label.la \
5136 libsystemd-capability.la \
5137 libsystemd-internal.la \
5138 libudev-internal.la \
5139 libsystemd-shared.la
5140
5141if HAVE_ACL
5142libsystemd_logind_core_la_SOURCES += \
5143 src/login/logind-acl.c
5144
5145libsystemd_logind_core_la_LIBADD += \
5146 libsystemd-acl.la
5147endif
5148
5149noinst_LTLIBRARIES += \
5150 libsystemd-logind-core.la
5151
5152systemd_user_sessions_SOURCES = \
5153 src/login/user-sessions.c
5154
5155systemd_user_sessions_LDADD = \
5156 libsystemd-shared.la
5157
5158rootlibexec_PROGRAMS += \
5159 systemd-logind \
5160 systemd-user-sessions
5161
5162loginctl_SOURCES = \
5163 src/login/loginctl.c \
5164 src/login/sysfs-show.c
5165
5166loginctl_LDADD = \
5167 libsystemd-internal.la \
5168 libudev-internal.la \
5169 libsystemd-shared.la
5170
5171rootbin_PROGRAMS += \
5172 loginctl
5173
5174dist_bashcompletion_DATA += \
5175 shell-completion/bash/loginctl
5176
5177dist_zshcompletion_DATA += \
5178 shell-completion/zsh/_loginctl \
5179 shell-completion/zsh/_systemd-inhibit
5180
5181systemd_inhibit_SOURCES = \
5182 src/login/inhibit.c
5183
5184systemd_inhibit_LDADD = \
5185 libsystemd-internal.la \
5186 libsystemd-shared.la
5187
5188rootbin_PROGRAMS += \
5189 systemd-inhibit
5190
5191test_login_SOURCES = \
5192 src/libsystemd/sd-login/test-login.c
5193
5194test_login_LDADD = \
5195 libsystemd-internal.la \
5196 libsystemd-shared.la
5197
5198test_login_shared_SOURCES = \
5199 src/login/test-login-shared.c
5200
5201test_login_shared_LDADD = \
5202 libsystemd-internal.la \
5203 libsystemd-shared.la
5204
5205test_inhibit_SOURCES = \
5206 src/login/test-inhibit.c
5207
5208test_inhibit_LDADD = \
5209 libsystemd-internal.la \
5210 libsystemd-shared.la
5211
5212test_login_tables_SOURCES = \
5213 src/login/test-login-tables.c
5214
5215test_login_tables_LDADD = \
5216 libsystemd-logind-core.la
5217
5218manual_tests += \
5219 test-login \
5220 test-inhibit
5221
5222tests += \
5223 test-login-tables \
5224 test-login-shared
5225
5226if HAVE_PAM
5227pam_systemd_la_SOURCES = \
5228 src/login/pam_systemd.sym \
5229 src/login/pam_systemd.c
5230
5231pam_systemd_la_CFLAGS = \
5232 $(AM_CFLAGS) \
5233 $(PAM_CFLAGS) \
5234 -fvisibility=hidden
5235
5236pam_systemd_la_LDFLAGS = \
5237 $(AM_LDFLAGS) \
5238 -module \
5239 -export-dynamic \
5240 -avoid-version \
5241 -shared \
5242 -Wl,--version-script=$(top_srcdir)/src/login/pam_systemd.sym
5243
5244pam_systemd_la_LIBADD = \
5245 libsystemd-capability.la \
5246 libsystemd-internal.la \
5247 libsystemd-shared.la \
5248 $(PAM_LIBS)
5249
5250pamlib_LTLIBRARIES = \
5251 pam_systemd.la
5252
5253dist_pamconf_DATA = \
5254 src/login/systemd-user
5255endif
5256
5257nodist_systemunit_DATA += \
5258 units/systemd-logind.service \
5259 units/systemd-user-sessions.service
5260
5261dist_systemunit_DATA += \
5262 units/user.slice \
5263 units/org.freedesktop.login1.busname
5264
5265dist_dbussystemservice_DATA += \
5266 src/login/org.freedesktop.login1.service
5267
5268dist_dbuspolicy_DATA += \
5269 src/login/org.freedesktop.login1.conf
5270
5271dist_pkgsysconf_DATA += \
5272 src/login/logind.conf
5273
5274polkitpolicy_files += \
5275 src/login/org.freedesktop.login1.policy
5276
5277INSTALL_DIRS += \
5278 $(systemdstatedir)
5279
5280MULTI_USER_TARGET_WANTS += \
5281 systemd-logind.service \
5282 systemd-user-sessions.service
5283
5284SYSTEM_UNIT_ALIASES += \
5285 systemd-logind.service dbus-org.freedesktop.login1.service
5286
5287BUSNAMES_TARGET_WANTS += \
5288 org.freedesktop.login1.busname
5289
5290if ENABLE_MULTI_SEAT_X
5291
5292systemd_multi_seat_x_SOURCES = \
5293 src/login/multi-seat-x.c
5294
5295systemd_multi_seat_x_LDADD = \
5296 libsystemd-label.la \
5297 libsystemd-shared.la
5298
5299rootlibexec_PROGRAMS += \
5300 systemd-multi-seat-x
5301
5302endif
5303
5304dist_udevrules_DATA += \
5305 src/login/70-uaccess.rules \
5306 src/login/70-power-switch.rules
5307
5308nodist_udevrules_DATA += \
5309 src/login/71-seat.rules \
5310 src/login/73-seat-late.rules
5311
5312CLEANFILES += \
5313 src/login/logind-gperf.c \
5314 src/login/71-seat.rules \
5315 src/login/73-seat-late.rules
5316endif
5317
5318polkitpolicy_in_files += \
5319 src/login/org.freedesktop.login1.policy.in
5320
5321EXTRA_DIST += \
5322 src/login/logind-gperf.gperf \
5323 src/login/71-seat.rules.in \
5324 src/login/73-seat-late.rules.in \
5325 units/systemd-logind.service.in \
5326 units/systemd-user-sessions.service.in
5327
5328# ------------------------------------------------------------------------------
5329if HAVE_PYTHON_DEVEL
5330pkgpyexec_LTLIBRARIES = \
5331 _journal.la \
5332 id128.la \
5333 _daemon.la \
5334 _reader.la \
5335 login.la
5336
5337_journal_la_SOURCES = \
5338 src/python-systemd/_journal.c
5339
5340_journal_la_CFLAGS = \
5341 $(AM_CFLAGS) \
5342 -fvisibility=default \
5343 $(PYTHON_DEVEL_CFLAGS)
5344
5345_journal_la_LDFLAGS = \
5346 $(AM_LDFLAGS) \
5347 -shared \
5348 -module \
5349 -avoid-version
5350
5351_journal_la_LIBADD = \
5352 $(PYTHON_DEVEL_LIBS) \
5353 libsystemd.la
5354
5355id128_la_SOURCES = \
5356 src/python-systemd/id128.c \
5357 src/python-systemd/pyutil.c \
5358 src/python-systemd/pyutil.h
5359
5360nodist_id128_la_SOURCES = \
5361 src/python-systemd/id128-constants.h
5362
5363id128_la_CFLAGS = \
5364 $(AM_CFLAGS) \
5365 -fvisibility=default \
5366 $(PYTHON_DEVEL_CFLAGS) \
5367 -I$(top_builddir)/src/python-systemd
5368
5369id128_la_LDFLAGS = \
5370 $(AM_LDFLAGS) \
5371 -shared \
5372 -module \
5373 -avoid-version
5374
5375id128_la_LIBADD = \
5376 $(PYTHON_DEVEL_LIBS) \
5377 libsystemd-shared.la \
5378 libsystemd.la
5379
5380_daemon_la_SOURCES = \
5381 src/python-systemd/_daemon.c \
5382 src/python-systemd/pyutil.c \
5383 src/python-systemd/pyutil.h
5384
5385_daemon_la_CFLAGS = \
5386 $(AM_CFLAGS) \
5387 -fvisibility=default \
5388 $(PYTHON_DEVEL_CFLAGS) \
5389 -I$(top_builddir)/src/python-systemd
5390
5391_daemon_la_LDFLAGS = \
5392 $(AM_LDFLAGS) \
5393 -shared \
5394 -module \
5395 -avoid-version
5396
5397_daemon_la_LIBADD = \
5398 $(PYTHON_DEVEL_LIBS) \
5399 libsystemd-shared.la \
5400 libsystemd.la
5401
5402_reader_la_SOURCES = \
5403 src/python-systemd/_reader.c \
5404 src/python-systemd/pyutil.c \
5405 src/python-systemd/pyutil.h
5406
5407_reader_la_CFLAGS = \
5408 $(AM_CFLAGS) \
5409 -fvisibility=default \
5410 $(PYTHON_DEVEL_CFLAGS)
5411
5412_reader_la_LDFLAGS = \
5413 $(AM_LDFLAGS) \
5414 -shared \
5415 -module \
5416 -avoid-version
5417
5418_reader_la_LIBADD = \
5419 $(PYTHON_DEVEL_LIBS) \
5420 libsystemd-shared.la \
5421 libsystemd.la
5422
5423login_la_SOURCES = \
5424 src/python-systemd/login.c \
5425 src/python-systemd/pyutil.c \
5426 src/python-systemd/pyutil.h
5427
5428login_la_CFLAGS = \
5429 $(AM_CFLAGS) \
5430 -fvisibility=default \
5431 $(PYTHON_DEVEL_CFLAGS)
5432
5433login_la_LDFLAGS = \
5434 $(AM_LDFLAGS) \
5435 -shared \
5436 -module \
5437 -avoid-version
5438
5439login_la_LIBADD = \
5440 $(PYTHON_DEVEL_LIBS) \
5441 libsystemd-shared.la \
5442 libsystemd.la
5443
5444dist_pkgpyexec_PYTHON = \
5445 src/python-systemd/journal.py \
5446 src/python-systemd/daemon.py \
5447 src/python-systemd/__init__.py
5448
5449src/python-systemd/id128-constants.h: src/systemd/sd-messages.h
5450 $(AM_V_at)$(MKDIR_P) $(dir $@)
5451 $(AM_V_GEN)$(SED) -n -r 's/,//g; s/#define (SD_MESSAGE_[A-Z0-9_]+)\s.*/add_id(m, "\1", \1) JOINER/p' <$< >$@
5452
5453BUILT_SOURCES += \
5454 src/python-systemd/id128-constants.h
5455
5456SPHINXOPTS = -D version=$(VERSION) -D release=$(VERSION)
5457sphinx-%:
5458 $(AM_V_at)test -n "$(SPHINX_BUILD)" || { echo " *** sphinx-build is not available"; exit 1; }
5459 $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/docs/html/python-systemd/
5460 $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/docs/html/python-systemd/
5461
5462python-shell:
5463 $(AM_V_at)echo "Starting python with $(DESTDIR)$(pyexecdir)"
5464 $(AM_V_at)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(PYTHON)
5465
5466destdir-sphinx: all
5467 dir="$$(mktemp -d /tmp/systemd-install.XXXXXX)" && \
5468 $(MAKE) DESTDIR="$$dir" install && \
5469 $(MAKE) DESTDIR="$$dir" sphinx-html && \
5470 rm -rf "$$dir"
5471
5472endif
5473
5474CLEAN_LOCAL_HOOKS += clean-sphinx
5475
5476.PHONY: python-shell destdir-sphinx clean-sphinx clean-python
5477
5478clean-sphinx:
5479 -rm -rf docs/html/python-systemd/
5480
5481# Remove Python stuff, e.g. to force rebuilding for a different Python version.
5482clean-python:
5483 -rm -rf src/python-systemd/.libs src/python-systemd/*.l[ao]
5484 -rm -f _daemon.la id128.la _journal.la login.la _reader.la
5485
5486# ------------------------------------------------------------------------------
5487if ENABLE_COMPAT_LIBS
5488EXTRA_DIST += \
5489 src/compat-libs/linkwarning.h
5490
5491libsystemd-%.c: src/compat-libs/libsystemd-%.sym
5492 $(AM_V_at)$(MKDIR_P) $(dir $@)
5493 $(AM_V_GEN)sed -r -n 's/^ +(sd_.*);/obsolete_lib(\1,$(notdir $(basename $<)));/p' <$< >$@
5494
5495BUILT_SOURCES += \
5496 libsystemd-journal.c \
5497 libsystemd-login.c \
5498 libsystemd-id128.c \
5499 libsystemd-daemon.c
5500
5501libsystemd_journal_la_SOURCES = \
5502 libsystemd-journal.c \
5503 src/compat-libs/libsystemd-journal.sym
5504
5505libsystemd_journal_la_CPPFLAGS = \
5506 $(AM_CFLAGS) \
5507 -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
5508
5509libsystemd_journal_la_LDFLAGS = \
5510 $(AM_LDFLAGS) \
5511 -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
5512 -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-journal.sym
5513
5514libsystemd_journal_la_LIBADD = \
5515 libsystemd-journal-internal.la \
5516 libsystemd-internal.la \
5517 libsystemd-shared.la
5518
5519libsystemd_login_la_SOURCES = \
5520 libsystemd-login.c \
5521 src/compat-libs/libsystemd-login.sym
5522
5523libsystemd_login_la_CPPFLAGS = \
5524 $(AM_CFLAGS) \
5525 -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
5526
5527libsystemd_login_la_LDFLAGS = \
5528 $(AM_LDFLAGS) \
5529 -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
5530 -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-login.sym
5531
5532libsystemd_login_la_LIBADD = \
5533 libsystemd-internal.la \
5534 libsystemd-shared.la
5535
5536libsystemd_id128_la_SOURCES = \
5537 libsystemd-id128.c \
5538 src/compat-libs/libsystemd-id128.sym
5539
5540libsystemd_id128_la_CPPFLAGS = \
5541 $(AM_CFLAGS) \
5542 -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
5543
5544libsystemd_id128_la_LDFLAGS = \
5545 $(AM_LDFLAGS) \
5546 -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
5547 -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-id128.sym
5548
5549libsystemd_id128_la_LIBADD = \
5550 libsystemd-internal.la \
5551 libsystemd-shared.la
5552
5553libsystemd_daemon_la_SOURCES = \
5554 libsystemd-daemon.c \
5555 src/compat-libs/libsystemd-daemon.sym
5556
5557libsystemd_daemon_la_CPPFLAGS = \
5558 $(AM_CFLAGS) \
5559 -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
5560
5561libsystemd_daemon_la_LDFLAGS = \
5562 $(AM_LDFLAGS) \
5563 -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
5564 -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-daemon.sym
5565
5566libsystemd_daemon_la_LIBADD = \
5567 libsystemd-internal.la \
5568 libsystemd-shared.la
5569
5570lib_LTLIBRARIES += \
5571 libsystemd-journal.la \
5572 libsystemd-login.la \
5573 libsystemd-id128.la \
5574 libsystemd-daemon.la
5575
5576pkgconfiglib_DATA += \
5577 src/compat-libs/libsystemd-journal.pc \
5578 src/compat-libs/libsystemd-login.pc \
5579 src/compat-libs/libsystemd-id128.pc \
5580 src/compat-libs/libsystemd-daemon.pc
5581
5582# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
5583compat-lib-install-hook:
5584 libname=libsystemd-login.so && $(move-to-rootlibdir)
5585 libname=libsystemd-journal.so && $(move-to-rootlibdir)
5586 libname=libsystemd-id128.so && $(move-to-rootlibdir)
5587 libname=libsystemd-daemon.so && $(move-to-rootlibdir)
5588
5589compat-lib-uninstall-hook:
5590 rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
5591 rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
5592 rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
5593 rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
5594
5595INSTALL_EXEC_HOOKS += compat-lib-install-hook
5596UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook
5597endif
5598
5599EXTRA_DIST += \
5600 src/compat-libs/libsystemd-journal.pc.in \
5601 src/compat-libs/libsystemd-login.pc.in \
5602 src/compat-libs/libsystemd-id128.pc.in \
5603 src/compat-libs/libsystemd-daemon.pc.in
5604
5605# ------------------------------------------------------------------------------
5606substitutions = \
5607 '|rootlibexecdir=$(rootlibexecdir)|' \
5608 '|rootbindir=$(rootbindir)|' \
5609 '|bindir=$(bindir)|' \
5610 '|SYSTEMCTL=$(rootbindir)/systemctl|' \
5611 '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
5612 '|pkgsysconfdir=$(pkgsysconfdir)|' \
5613 '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
5614 '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
5615 '|pkgdatadir=$(pkgdatadir)|' \
5616 '|systemunitdir=$(systemunitdir)|' \
5617 '|userunitdir=$(userunitdir)|' \
5618 '|systempresetdir=$(systempresetdir)|' \
5619 '|userpresetdir=$(userpresetdir)|' \
5620 '|udevhwdbdir=$(udevhwdbdir)|' \
5621 '|udevrulesdir=$(udevrulesdir)|' \
5622 '|catalogdir=$(catalogdir)|' \
5623 '|tmpfilesdir=$(tmpfilesdir)|' \
5624 '|sysusersdir=$(sysusersdir)|' \
5625 '|sysctldir=$(sysctldir)|' \
5626 '|systemgeneratordir=$(systemgeneratordir)|' \
5627 '|usergeneratordir=$(usergeneratordir)|' \
5628 '|CERTIFICATEROOT=$(CERTIFICATEROOT)|' \
5629 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
5630 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
5631 '|PACKAGE_URL=$(PACKAGE_URL)|' \
5632 '|RANDOM_SEED_DIR=$(localstatedir)/lib/systemd/|' \
5633 '|RANDOM_SEED=$(localstatedir)/lib/systemd/random-seed|' \
5634 '|prefix=$(prefix)|' \
5635 '|exec_prefix=$(exec_prefix)|' \
5636 '|libdir=$(libdir)|' \
5637 '|includedir=$(includedir)|' \
5638 '|VERSION=$(VERSION)|' \
5639 '|rootprefix=$(rootprefix)|' \
5640 '|udevlibexecdir=$(udevlibexecdir)|' \
5641 '|SUSHELL=$(SUSHELL)|' \
5642 '|DEBUGTTY=$(DEBUGTTY)|' \
5643 '|KILL=$(KILL)|' \
5644 '|KMOD=$(KMOD)|' \
5645 '|MKDIR_P=$(MKDIR_P)|' \
5646 '|QUOTAON=$(QUOTAON)|' \
5647 '|QUOTACHECK=$(QUOTACHECK)|' \
5648 '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
5649 '|VARLOGDIR=$(varlogdir)|' \
5650 '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
5651 '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
5652 '|PYTHON=$(PYTHON)|' \
5653 '|PYTHON_BINARY=$(PYTHON_BINARY)|' \
5654 '|NTP_SERVERS=$(NTP_SERVERS)|' \
5655 '|DNS_SERVERS=$(DNS_SERVERS)|' \
5656 '|systemuidmax=$(SYSTEM_UID_MAX)|' \
5657 '|systemgidmax=$(SYSTEM_GID_MAX)|' \
5658 '|TTY_GID=$(TTY_GID)|' \
5659 '|systemsleepdir=$(systemsleepdir)|' \
5660 '|systemshutdowndir=$(systemshutdowndir)|' \
5661 '|binfmtdir=$(binfmtdir)|' \
5662 '|modulesloaddir=$(modulesloaddir)|'
5663
5664SED_PROCESS = \
5665 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
5666 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
5667 < $< > $@
5668
5669units/%: units/%.in
5670 $(SED_PROCESS)
5671
5672man/%: man/%.in
5673 $(SED_PROCESS)
5674
5675sysctl.d/%: sysctl.d/%.in
5676 $(SED_PROCESS)
5677
5678%.pc: %.pc.in
5679 $(SED_PROCESS)
5680
5681%.conf: %.conf.in
5682 $(SED_PROCESS)
5683
5684src/core/macros.%: src/core/macros.%.in
5685 $(SED_PROCESS)
5686
5687src/%.policy.in: src/%.policy.in.in
5688 $(SED_PROCESS)
5689
5690shell-completion/%: shell-completion/%.in
5691 $(SED_PROCESS)
5692
5693%.rules: %.rules.in
5694 $(SED_PROCESS)
5695
5696%.conf: %.conf.in
5697 $(SED_PROCESS)
5698
5699%.sh: %.sh.in
5700 $(SED_PROCESS)
5701 $(AM_V_GEN)chmod +x $@
5702
5703src/%.c: src/%.gperf
5704 $(AM_V_at)$(MKDIR_P) $(dir $@)
5705 $(AM_V_GPERF)$(GPERF) < $< > $@
5706
5707src/%: src/%.m4
5708 $(AM_V_at)$(MKDIR_P) $(dir $@)
5709 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
5710
5711units/%: units/%.m4
5712 $(AM_V_at)$(MKDIR_P) $(dir $@)
5713 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
5714
5715units/user/%: units/%.m4
5716 $(AM_V_at)$(MKDIR_P) $(dir $@)
5717 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
5718
5719if ENABLE_POLKIT
5720nodist_polkitpolicy_DATA = \
5721 $(polkitpolicy_files) \
5722 $(polkitpolicy_in_in_files:.policy.in.in=.policy)
5723endif
5724
5725EXTRA_DIST += \
5726 $(polkitpolicy_in_files) \
5727 $(polkitpolicy_in_in_files)
5728
5729CLEANFILES += \
5730 $(nodist_systemunit_DATA) \
5731 $(nodist_userunit_DATA) \
5732 $(pkgconfigdata_DATA) \
5733 $(pkgconfiglib_DATA) \
5734 $(nodist_polkitpolicy_DATA)
5735
5736# ------------------------------------------------------------------------------
5737if ENABLE_MANPAGES
5738man/custom-entities.ent: configure.ac
5739 $(AM_V_GEN)$(MKDIR_P) $(dir $@)
5740 $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
5741 printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
5742 > $@ # '
5743
5744DISTCLEANFILES += \
5745 man/custom-entities.ent
5746
5747XSLTPROC_FLAGS = \
5748 --nonet \
5749 --xinclude \
5750 --stringparam man.output.quietly 1 \
5751 --stringparam funcsynopsis.style ansi \
5752 --stringparam man.authors.section.enabled 0 \
5753 --stringparam man.copyright.section.enabled 0 \
5754 --stringparam systemd.version $(VERSION) \
5755 --path '$(builddir)/man:$(srcdir)/man'
5756
5757XSLTPROC_PROCESS_MAN = \
5758 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
5759
5760XSLTPROC_PROCESS_HTML = \
5761 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
5762
5763man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
5764 $(XSLTPROC_PROCESS_MAN)
5765
5766man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
5767 $(XSLTPROC_PROCESS_MAN)
5768
5769man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
5770 $(XSLTPROC_PROCESS_MAN)
5771
5772man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
5773 $(XSLTPROC_PROCESS_MAN)
5774
5775man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
5776 $(XSLTPROC_PROCESS_MAN)
5777
5778man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
5779 $(XSLTPROC_PROCESS_HTML)
5780
5781define html-alias
5782 $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
5783endef
5784
5785endif
5786
5787EXTRA_DIST += \
5788 man/custom-html.xsl \
5789 man/custom-man.xsl
5790
5791# ------------------------------------------------------------------------------
5792if HAVE_SYSV_COMPAT
5793sysvinit_DATA = \
5794 docs/sysvinit/README
5795
5796varlog_DATA = \
5797 docs/var-log/README
5798
5799docs/sysvinit/README: docs/sysvinit/README.in
5800 $(SED_PROCESS)
5801
5802docs/var-log/README: docs/var-log/README.in
5803 $(SED_PROCESS)
5804
5805CLEANFILES += \
5806 docs/sysvinit/README \
5807 docs/var-log/README
5808endif
5809
5810EXTRA_DIST += \
5811 docs/sysvinit/README.in \
5812 docs/var-log/README.in
5813
5814SOCKETS_TARGET_WANTS += \
5815 systemd-initctl.socket \
5816 systemd-shutdownd.socket
5817
5818if HAVE_SYSV_COMPAT
5819RUNLEVEL1_TARGET_WANTS += \
5820 systemd-update-utmp-runlevel.service
5821RUNLEVEL2_TARGET_WANTS += \
5822 systemd-update-utmp-runlevel.service
5823RUNLEVEL3_TARGET_WANTS += \
5824 systemd-update-utmp-runlevel.service
5825RUNLEVEL4_TARGET_WANTS += \
5826 systemd-update-utmp-runlevel.service
5827RUNLEVEL5_TARGET_WANTS += \
5828 systemd-update-utmp-runlevel.service
5829endif
5830
5831SYSINIT_TARGET_WANTS += \
5832 systemd-update-utmp.service \
5833 systemd-update-done.service
5834
5835LOCAL_FS_TARGET_WANTS += \
5836 systemd-remount-fs.service \
5837 tmp.mount
5838
5839MULTI_USER_TARGET_WANTS += \
5840 getty.target \
5841 systemd-ask-password-wall.path
5842
5843SYSINIT_TARGET_WANTS += \
5844 dev-hugepages.mount \
5845 dev-mqueue.mount \
5846 sys-kernel-config.mount \
5847 sys-kernel-debug.mount \
5848 sys-fs-fuse-connections.mount \
5849 systemd-sysctl.service \
5850 systemd-ask-password-console.path
5851
5852if HAVE_SYSV_COMPAT
5853SYSTEM_UNIT_ALIASES += \
5854 poweroff.target runlevel0.target \
5855 rescue.target runlevel1.target \
5856 multi-user.target runlevel2.target \
5857 multi-user.target runlevel3.target \
5858 multi-user.target runlevel4.target \
5859 graphical.target runlevel5.target \
5860 reboot.target runlevel6.target
5861endif
5862
5863SYSTEM_UNIT_ALIASES += \
5864 graphical.target default.target \
5865 reboot.target ctrl-alt-del.target \
5866 getty@.service autovt@.service
5867
5868USER_UNIT_ALIASES += \
5869 $(systemunitdir)/shutdown.target shutdown.target \
5870 $(systemunitdir)/sockets.target sockets.target \
5871 $(systemunitdir)/busnames.target busnames.target \
5872 $(systemunitdir)/timers.target timers.target \
5873 $(systemunitdir)/paths.target paths.target \
5874 $(systemunitdir)/bluetooth.target bluetooth.target \
5875 $(systemunitdir)/printer.target printer.target \
5876 $(systemunitdir)/sound.target sound.target \
5877 $(systemunitdir)/smartcard.target smartcard.target
5878
5879GENERAL_ALIASES += \
5880 $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
5881 $(systemunitdir)/getty@.service $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \
5882 $(pkgsysconfdir)/user $(sysconfdir)/xdg/systemd/user \
5883 $(dbussystemservicedir)/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service
5884
5885if HAVE_SYSV_COMPAT
5886INSTALL_DIRS += \
5887 $(systemunitdir)/runlevel1.target.wants \
5888 $(systemunitdir)/runlevel2.target.wants \
5889 $(systemunitdir)/runlevel3.target.wants \
5890 $(systemunitdir)/runlevel4.target.wants \
5891 $(systemunitdir)/runlevel5.target.wants
5892endif
5893
5894INSTALL_DIRS += \
5895 $(prefix)/lib/modules-load.d \
5896 $(sysconfdir)/modules-load.d \
5897 $(prefix)/lib/systemd/network \
5898 $(sysconfdir)/systemd/network \
5899 $(prefix)/lib/sysctl.d \
5900 $(sysconfdir)/sysctl.d \
5901 $(prefix)/lib/kernel/install.d \
5902 $(sysconfdir)/kernel/install.d \
5903 $(systemshutdowndir) \
5904 $(systemsleepdir) \
5905 $(systemgeneratordir) \
5906 $(usergeneratordir) \
5907 \
5908 $(userunitdir) \
5909 $(pkgsysconfdir)/system \
5910 $(pkgsysconfdir)/system/multi-user.target.wants \
5911 $(pkgsysconfdir)/system/getty.target.wants \
5912 $(pkgsysconfdir)/user \
5913 $(dbussessionservicedir) \
5914 $(sysconfdir)/xdg/systemd
5915
5916install-exec-hook: $(INSTALL_EXEC_HOOKS)
5917
5918uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
5919
5920install-data-hook: $(INSTALL_DATA_HOOKS)
5921
5922distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
5923
5924clean-local: $(CLEAN_LOCAL_HOOKS)
5925 rm -rf $(abs_srcdir)/install-tree
5926 rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
5927 $(abs_srcdir)/hwdb/iab.txt
5928
5929DISTCHECK_CONFIGURE_FLAGS = \
5930 --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
5931 --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
5932 --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
5933 --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
5934 --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
5935 --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
5936 --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
5937 --with-rootprefix=$$dc_install_base \
5938 --disable-split-usr \
5939 --enable-kdbus \
5940 --enable-compat-libs
5941
5942if HAVE_SYSV_COMPAT
5943DISTCHECK_CONFIGURE_FLAGS += \
5944 --with-sysvinit-path=$$dc_install_base/$(sysvinitdir) \
5945 --with-sysvrcnd-path=$$dc_install_base/$(sysvrcnddir)
5946else
5947DISTCHECK_CONFIGURE_FLAGS += \
5948 --with-sysvinit-path= \
5949 --with-sysvrcnd-path=
5950endif
5951
5952if HAVE_PYTHON
5953DISTCHECK_CONFIGURE_FLAGS += \
5954 --with-python
5955endif
5956
5957if ENABLE_GTK_DOC
5958DISTCHECK_CONFIGURE_FLAGS += \
5959 --enable-gtk-doc
5960endif
5961
5962#
5963# Require python when making dist
5964#
5965.PHONY: dist-check-python
5966dist-check-python:
5967if !HAVE_PYTHON
5968 @echo "*** python and python-lxml module must be installed and enabled in order to make dist"
5969 @false
5970endif
5971
5972dist-check-compat-libs:
5973if !ENABLE_COMPAT_LIBS
5974 @echo "*** compat-libs must be enabled in order to make dist"
5975 @false
5976endif
5977
5978dist: dist-check-python dist-check-compat-libs
5979
5980# check "broken" platforms limited toolchains for link breakage before we release
5981.PHONY: linkcheck
5982linkcheck:
5983 $(MAKE) CFLAGS='-fno-lto' LDFLAGS='-Wl,-fuse-ld=gold -Wl,--as-needed -Wl,--no-gc-sections' distcheck
5984
5985.PHONY: hwdb-update
5986hwdb-update:
5987 ( cd $(top_srcdir)/hwdb && \
5988 wget -N http://www.linux-usb.org/usb.ids \
5989 http://pci-ids.ucw.cz/v2.2/pci.ids \
5990 http://standards.ieee.org/develop/regauth/oui/oui.txt \
5991 http://standards.ieee.org/develop/regauth/iab/iab.txt && \
5992 ./ids-update.pl )
5993
5994.PHONY: kdbus-update
5995kdbus-update:
5996 ( cd $(top_srcdir)/src/libsystemd/sd-bus/ && \
5997 wget -N https://d-bus.googlecode.com/git/kdbus.h )
5998
5999.PHONY: git-tag
6000git-tag:
6001 git tag -s "v$(VERSION)" -m "systemd $(VERSION)"
6002
6003www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
6004.PHONY: upload
6005upload: all check dist
6006 scp systemd-$(VERSION).tar.xz $(www_target)
6007
6008.PHONY: doc-sync
6009doc-sync: all destdir-sphinx
6010 gtkdoc-rebase --html-dir=docs/libudev/html --online
6011 rsync -rlv --delete docs/libudev/html/ --omit-dir-times $(www_target)/libudev/
6012 gtkdoc-rebase --html-dir=docs/gudev/html --online
6013 rsync -rlv --delete docs/gudev/html/ --omit-dir-times $(www_target)/gudev/
6014 rsync -rlv --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
6015 rsync -rlv --delete --omit-dir-times docs/html/python-systemd/ $(www_target)/python-systemd/
6016
6017.PHONY: tango
6018tango: upload
6019 cp -v systemd-$(VERSION).tar.xz /home/lennart/git.fedora/systemd/
6020 scp man/*.html tango:public/systemd-man/
6021
6022.PHONY: install-tree
6023install-tree: all
6024 rm -rf $(abs_srcdir)/install-tree
6025 $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
6026 tree $(abs_srcdir)/install-tree
6027
6028# Let's run all tests of the test suite, but under valgrind. Let's
6029# exclude the one perl script we have in there
6030.PHONY: valgrind-tests
6031valgrind-tests: $(TESTS)
6032 $(AM_V_GEN)for f in $(filter-out %.pl, $^); do \
6033 if file $$f | grep -q shell; then \
6034 echo -e "$${x}Skipping non-binary $$f"; else \
6035 echo -e "$${x}Running $$f"; \
6036 libtool --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
6037 x="\n\n"; \
6038 done
6039
6040exported-%: %
6041 $(AM_V_GEN)$(NM) -g --defined-only $(builddir)/.libs/$(<:.la=.so) 2>&1 /dev/null | grep " T " | cut -d" " -f3 > $@
6042
6043exported: $(addprefix exported-, $(lib_LTLIBRARIES))
6044 $(AM_V_GEN)cat $^ > $@
6045
6046.PHONY: check-api-docs
6047check-api-docs: exported man
6048 $(AM_V_GEN)for symbol in `cat exported` ; do \
6049 if test -f $(builddir)/man/$$symbol.html ; then \
6050 echo " Symbol $$symbol() is documented." ; \
6051 else \
6052 echo "‣ Symbol $$symbol() lacks documentation." ; \
6053 fi ; \
6054 done
6055
6056OBJECT_VARIABLES:=$(filter %_OBJECTS,$(.VARIABLES))
6057ALL_OBJECTS:=$(foreach v,$(OBJECT_VARIABLES),$($(v)))
6058
6059undefined defined: $(ALL_OBJECTS)
6060 $(AM_V_GEN)for f in $(ALL_OBJECTS) ; do \
6061 $(NM) -g --$@-only `echo $(builddir)/"$$f" | sed -e 's,\([^/]*\).lo$$,.libs/\1.o,'` ; \
6062 done | cut -c 20- | cut -d @ -f 1 | sort -u > $@
6063
6064CLEANFILES += \
6065 defined \
6066 undefined
6067
6068.PHONY: check-api-unused
6069check-api-unused: defined undefined exported
6070 ( cat exported undefined ) | sort -u | diff -u - defined | grep ^+ | grep -v ^+++ | cut -c2-
6071
6072.PHONY: check-includes
6073check-includes: $(top_srcdir)/tools/check-includes.pl
6074 $(AM_V_GEN) find * -name '*.[hcS]' -type f -print | sort -u \
6075 | xargs $(top_srcdir)/tools/check-includes.pl
6076
6077EXTRA_DIST += \
6078 $(top_srcdir)/tools/check-includes.pl
6079
6080# Stupid test that everything purported to be exported really is
6081define generate-sym-test
6082 $(AM_V_at)$(MKDIR_P) $(dir $@)
6083 $(AM_V_at)printf '#include <stdio.h>\n' > $@
6084 $(AM_V_at)printf '#include "%s"\n' $(notdir $(filter %.h, $^)) >> $@
6085 $(AM_V_at)printf 'void* functions[] = {\n' >> $@
6086 $(AM_V_GEN)sed -r -n 's/^ +([a-zA-Z0-9_]+);/\1,/p' $< >> $@
6087 $(AM_V_at)printf '};\nint main(void) {\n' >> $@
6088 $(AM_V_at)printf 'unsigned i; for (i=0;i<sizeof(functions)/sizeof(void*);i++) printf("%%p\\n", functions[i]);\n' >> $@
6089 $(AM_V_at)printf 'return 0; }\n' >> $@
6090endef
6091
6092test-libsystemd-sym.c: \
6093 $(top_builddir)/src/libsystemd/libsystemd.sym \
6094 src/systemd/sd-journal.h \
6095 src/systemd/sd-daemon.h \
6096 src/systemd/sd-login.h \
6097 src/systemd/sd-bus.h \
6098 src/systemd/sd-utf8.h \
6099 src/systemd/sd-resolve.h \
6100 src/systemd/sd-path.h
6101 $(generate-sym-test)
6102
6103test-libudev-sym.c: \
6104 src/libudev/libudev.sym \
6105 src/udev/udev.h
6106 $(generate-sym-test)
6107
6108test_libsystemd_sym_SOURCES = \
6109 test-libsystemd-sym.c
6110test_libsystemd_sym_LDADD = \
6111 libsystemd.la
6112
6113test_libudev_sym_SOURCES = \
6114 test-libudev-sym.c
6115test_libudev_sym_CFLAGS = \
6116 $(AM_CFLAGS) \
6117 -Wno-deprecated-declarations
6118test_libudev_sym_LDADD = \
6119 libudev.la
6120
6121BUILT_SOURCES += \
6122 $(test_libsystemd_sym_SOURCES) \
6123 $(test_libudev_sym_SOURCES)
6124
6125tests += \
6126 test-libsystemd-sym \
6127 test-libudev-sym
6128
6129.PHONY: cppcheck
6130cppcheck:
6131 cppcheck --enable=all -q $(top_srcdir)
6132
6133# Used to extract compile flags for YCM.
6134print-%:
6135 @echo $($*)
6136
6137git-contrib:
6138 @git shortlog -s `git describe --abbrev=0`.. | cut -c8- | awk '{ print $$0 "," }' | sort -u