chiark / gitweb /
15e4484dd14b4e9ede536f4573f3760b25cc0536
[elogind.git] / Makefile.am
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
23 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
24 AM_MAKEFLAGS = --no-print-directory
25 AUTOMAKE_OPTIONS = color-tests parallel-tests
26
27 GCC_COLORS ?= 'ooh, shiny!'
28 export GCC_COLORS
29
30 SUBDIRS = . po
31
32 # remove targets if the command fails
33 .DELETE_ON_ERROR:
34
35 # keep intermediate files
36 .SECONDARY:
37
38 # Keep the test-suite.log
39 .PRECIOUS: $(TEST_SUITE_LOG) Makefile
40
41 LIBUDEV_CURRENT=7
42 LIBUDEV_REVISION=2
43 LIBUDEV_AGE=6
44
45 LIBGUDEV_CURRENT=2
46 LIBGUDEV_REVISION=0
47 LIBGUDEV_AGE=2
48
49 LIBSYSTEMD_CURRENT=5
50 LIBSYSTEMD_REVISION=1
51 LIBSYSTEMD_AGE=5
52
53 # The following four libraries only exist for compatibility reasons,
54 # their version info should not be bumped anymore
55 LIBSYSTEMD_LOGIN_CURRENT=9
56 LIBSYSTEMD_LOGIN_REVISION=3
57 LIBSYSTEMD_LOGIN_AGE=9
58
59 LIBSYSTEMD_DAEMON_CURRENT=0
60 LIBSYSTEMD_DAEMON_REVISION=12
61 LIBSYSTEMD_DAEMON_AGE=0
62
63 LIBSYSTEMD_ID128_CURRENT=0
64 LIBSYSTEMD_ID128_REVISION=28
65 LIBSYSTEMD_ID128_AGE=0
66
67 LIBSYSTEMD_JOURNAL_CURRENT=11
68 LIBSYSTEMD_JOURNAL_REVISION=5
69 LIBSYSTEMD_JOURNAL_AGE=11
70
71 # Dirs of external packages
72 dbuspolicydir=@dbuspolicydir@
73 dbussessionservicedir=@dbussessionservicedir@
74 dbussystemservicedir=@dbussystemservicedir@
75 pamlibdir=@pamlibdir@
76 pamconfdir=@pamconfdir@
77 pkgconfigdatadir=$(datadir)/pkgconfig
78 pkgconfiglibdir=$(libdir)/pkgconfig
79 polkitpolicydir=$(datadir)/polkit-1/actions
80 bashcompletiondir=@bashcompletiondir@
81 zshcompletiondir=@zshcompletiondir@
82 rpmmacrosdir=$(prefix)/lib/rpm/macros.d
83 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
84 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
85 varlogdir=$(localstatedir)/log
86 systemdstatedir=$(localstatedir)/lib/systemd
87 catalogstatedir=$(systemdstatedir)/catalog
88
89 # Our own, non-special dirs
90 pkgsysconfdir=$(sysconfdir)/systemd
91 userunitdir=$(prefix)/lib/systemd/user
92 userpresetdir=$(prefix)/lib/systemd/user-preset
93 tmpfilesdir=$(prefix)/lib/tmpfiles.d
94 sysusersdir=$(prefix)/lib/sysusers.d
95 sysctldir=$(prefix)/lib/sysctl.d
96 binfmtdir=$(prefix)/lib/binfmt.d
97 modulesloaddir=$(prefix)/lib/modules-load.d
98 networkdir=$(rootprefix)/lib/systemd/network
99 pkgincludedir=$(includedir)/systemd
100 systemgeneratordir=$(rootlibexecdir)/system-generators
101 usergeneratordir=$(prefix)/lib/systemd/user-generators
102 systemshutdowndir=$(rootlibexecdir)/system-shutdown
103 systemsleepdir=$(rootlibexecdir)/system-sleep
104 systemunitdir=$(rootprefix)/lib/systemd/system
105 systempresetdir=$(rootprefix)/lib/systemd/system-preset
106 udevlibexecdir=$(rootprefix)/lib/udev
107 udevhomedir=$(udevlibexecdir)
108 udevrulesdir=$(udevlibexecdir)/rules.d
109 udevhwdbdir=$(udevlibexecdir)/hwdb.d
110 catalogdir=$(prefix)/lib/systemd/catalog
111 kernelinstalldir = $(prefix)/lib/kernel/install.d
112 factory_etcdir = $(prefix)/share/factory/etc
113 factory_pamdir = $(prefix)/share/factory/etc/pam.d
114
115 # And these are the special ones for /
116 rootprefix=@rootprefix@
117 rootbindir=$(rootprefix)/bin
118 rootlibexecdir=$(rootprefix)/lib/systemd
119
120 CLEANFILES = $(BUILT_SOURCES)
121 DISTCLEANFILES =
122 EXTRA_DIST =
123 BUILT_SOURCES =
124 INSTALL_EXEC_HOOKS =
125 UNINSTALL_EXEC_HOOKS =
126 INSTALL_DATA_HOOKS =
127 UNINSTALL_DATA_HOOKS =
128 DISTCLEAN_LOCAL_HOOKS =
129 CLEAN_LOCAL_HOOKS =
130 pkginclude_HEADERS =
131 noinst_LTLIBRARIES =
132 lib_LTLIBRARIES =
133 include_HEADERS =
134 noinst_DATA =
135 pkgconfiglib_DATA =
136 polkitpolicy_in_in_files =
137 polkitpolicy_in_files =
138 polkitpolicy_files =
139 dist_udevrules_DATA =
140 nodist_udevrules_DATA =
141 dist_pkgsysconf_DATA =
142 nodist_pkgsysconf_DATA =
143 dist_pkgdata_DATA =
144 dist_dbuspolicy_DATA =
145 dist_dbussystemservice_DATA =
146 dist_systemunit_DATA_busnames =
147 check_PROGRAMS =
148 check_DATA =
149 tests=
150 manual_tests =
151 if ENABLE_TESTS
152 noinst_PROGRAMS = $(manual_tests) $(tests)
153 TESTS = $(tests)
154 else
155 noinst_PROGRAMS =
156 TESTS =
157 endif
158 udevlibexec_PROGRAMS =
159
160 .PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
161         $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
162         $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
163
164 AM_CPPFLAGS = \
165         -include $(top_builddir)/config.h \
166         -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
167         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
168         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
169         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
170         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
171         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
172         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
173         -DCERTIFICATE_ROOT=\"$(CERTIFICATEROOT)\" \
174         -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
175         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
176         -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
177         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
178         -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
179         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
180         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
181         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
182         -DROOTPREFIX=\"$(rootprefix)\" \
183         -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" \
184         -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \
185         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
186         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
187         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
188         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
189         -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
190         -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
191         -DX_SERVER=\"$(bindir)/X\" \
192         -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
193         -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
194         -DQUOTACHECK=\"$(QUOTACHECK)\" \
195         -DKEXEC=\"$(KEXEC)\" \
196         -DLIBDIR=\"$(libdir)\" \
197         -DROOTLIBDIR=\"$(rootlibdir)\" \
198         -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
199         -I $(top_srcdir)/src \
200         -I $(top_builddir)/src/shared \
201         -I $(top_srcdir)/src/shared \
202         -I $(top_srcdir)/src/network \
203         -I $(top_srcdir)/src/login \
204         -I $(top_srcdir)/src/journal \
205         -I $(top_srcdir)/src/timedate \
206         -I $(top_srcdir)/src/timesync \
207         -I $(top_srcdir)/src/resolve \
208         -I $(top_builddir)/src/resolve \
209         -I $(top_srcdir)/src/systemd \
210         -I $(top_builddir)/src/core \
211         -I $(top_srcdir)/src/core \
212         -I $(top_srcdir)/src/libudev \
213         -I $(top_srcdir)/src/udev \
214         -I $(top_srcdir)/src/udev/net \
215         -I $(top_builddir)/src/udev \
216         -I $(top_srcdir)/src/libsystemd/sd-bus \
217         -I $(top_srcdir)/src/libsystemd/sd-event \
218         -I $(top_srcdir)/src/libsystemd/sd-rtnl \
219         -I $(top_srcdir)/src/libsystemd/sd-network \
220         -I $(top_srcdir)/src/libsystemd/sd-hwdb \
221         -I $(top_srcdir)/src/libsystemd-network \
222         -I $(top_srcdir)/src/libsystemd-terminal \
223         $(OUR_CPPFLAGS)
224
225 AM_CFLAGS = $(OUR_CFLAGS)
226 AM_LDFLAGS = $(OUR_LDFLAGS)
227
228 # ------------------------------------------------------------------------------
229 define move-to-rootlibdir
230         if test "$(libdir)" != "$(rootlibdir)"; then \
231                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
232                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
233                 rm -f $(DESTDIR)$(libdir)/$$libname && \
234                 $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
235                 mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
236         fi
237 endef
238
239 INSTALL_DIRS =
240
241 RUNLEVEL1_TARGET_WANTS =
242 RUNLEVEL2_TARGET_WANTS =
243 RUNLEVEL3_TARGET_WANTS =
244 RUNLEVEL4_TARGET_WANTS =
245 RUNLEVEL5_TARGET_WANTS =
246 SHUTDOWN_TARGET_WANTS =
247 LOCAL_FS_TARGET_WANTS =
248 MULTI_USER_TARGET_WANTS =
249 SYSINIT_TARGET_WANTS =
250 SOCKETS_TARGET_WANTS =
251 BUSNAMES_TARGET_WANTS =
252 TIMERS_TARGET_WANTS =
253 USER_SOCKETS_TARGET_WANTS =
254 USER_DEFAULT_TARGET_WANTS =
255 USER_BUSNAMES_TARGET_WANTS =
256
257 SYSTEM_UNIT_ALIASES =
258 USER_UNIT_ALIASES =
259 GENERAL_ALIASES =
260
261 install-target-wants-hook:
262         what="$(RUNLEVEL1_TARGET_WANTS)" && wants=runlevel1.target && dir=$(systemunitdir) && $(add-wants)
263         what="$(RUNLEVEL2_TARGET_WANTS)" && wants=runlevel2.target && dir=$(systemunitdir) && $(add-wants)
264         what="$(RUNLEVEL3_TARGET_WANTS)" && wants=runlevel3.target && dir=$(systemunitdir) && $(add-wants)
265         what="$(RUNLEVEL4_TARGET_WANTS)" && wants=runlevel4.target && dir=$(systemunitdir) && $(add-wants)
266         what="$(RUNLEVEL5_TARGET_WANTS)" && wants=runlevel5.target && dir=$(systemunitdir) && $(add-wants)
267         what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && dir=$(systemunitdir) && $(add-wants)
268         what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && dir=$(systemunitdir) && $(add-wants)
269         what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
270         what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
271         what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
272         what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
273         what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
274         what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
275         what="$(USER_DEFAULT_TARGET_WANTS)" && wants=default.target && dir=$(userunitdir) && $(add-wants)
276
277 install-busnames-target-wants-hook:
278         what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
279         what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
280
281 define add-wants
282         [ -z "$$what" ] || ( \
283           dir=$(DESTDIR)$$dir/$$wants.wants && \
284           $(MKDIR_P) -m 0755 $$dir && \
285           cd $$dir && \
286           rm -f $$what && \
287           for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
288 endef
289
290 install-directories-hook:
291         $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
292
293 install-aliases-hook:
294         set -- $(SYSTEM_UNIT_ALIASES) && \
295                 dir=$(systemunitdir) && $(install-aliases)
296         set -- $(USER_UNIT_ALIASES) && \
297                 dir=$(userunitdir) && $(install-relative-aliases)
298         set -- $(GENERAL_ALIASES) && \
299                 dir= && $(install-relative-aliases)
300
301 define install-aliases
302         while [ -n "$$1" ]; do \
303                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
304                 rm -f $(DESTDIR)$$dir/$$2 && \
305                 $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
306                 shift 2 || exit $$?; \
307         done
308 endef
309
310 define install-relative-aliases
311         while [ -n "$$1" ]; do \
312                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
313                 rm -f $(DESTDIR)$$dir/$$2 && \
314                 $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
315                 shift 2 || exit $$?; \
316         done
317 endef
318
319 install-touch-usr-hook:
320         touch -c $(DESTDIR)/$(prefix)
321
322 INSTALL_EXEC_HOOKS += \
323         install-target-wants-hook \
324         install-directories-hook \
325         install-aliases-hook \
326         install-touch-usr-hook
327
328 if ENABLE_KDBUS
329 INSTALL_EXEC_HOOKS += \
330         install-busnames-target-wants-hook
331 endif
332
333 # ------------------------------------------------------------------------------
334 AM_V_M4 = $(AM_V_M4_$(V))
335 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
336 AM_V_M4_0 = @echo "  M4      " $@;
337
338 AM_V_XSLT = $(AM_V_XSLT_$(V))
339 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
340 AM_V_XSLT_0 = @echo "  XSLT    " $@;
341
342 AM_V_GPERF = $(AM_V_GPERF_$(V))
343 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
344 AM_V_GPERF_0 = @echo "  GPERF   " $@;
345
346 AM_V_LN = $(AM_V_LN_$(V))
347 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
348 AM_V_LN_0 = @echo "  LN      " $@;
349
350 AM_V_RM = $(AM_V_RM_$(V))
351 AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY))
352 AM_V_RM_0 = @echo "  RM      " $@;
353
354 # ------------------------------------------------------------------------------
355 rootbin_PROGRAMS = \
356         systemctl \
357         systemd-notify \
358         systemd-ask-password \
359         systemd-tty-ask-password-agent \
360         systemd-machine-id-setup \
361         systemd-escape
362
363 bin_PROGRAMS = \
364         systemd-cgls \
365         systemd-cgtop \
366         systemd-nspawn \
367         systemd-detect-virt \
368         systemd-delta \
369         systemd-analyze \
370         systemd-run \
371         systemd-path
372
373 dist_bin_SCRIPTS = \
374         src/kernel-install/kernel-install
375
376 dist_kernelinstall_SCRIPTS = \
377         src/kernel-install/50-depmod.install \
378         src/kernel-install/90-loaderentry.install
379
380 rootlibexec_PROGRAMS = \
381         systemd \
382         systemd-cgroups-agent \
383         systemd-initctl \
384         systemd-shutdownd \
385         systemd-shutdown \
386         systemd-remount-fs \
387         systemd-reply-password \
388         systemd-fsck \
389         systemd-machine-id-commit \
390         systemd-ac-power \
391         systemd-sysctl \
392         systemd-sleep \
393         systemd-bus-proxyd \
394         systemd-socket-proxyd \
395         systemd-update-done
396
397 if HAVE_UTMP
398 rootlibexec_PROGRAMS += \
399         systemd-update-utmp
400 endif
401
402 systemgenerator_PROGRAMS = \
403         systemd-getty-generator \
404         systemd-fstab-generator \
405         systemd-system-update-generator \
406         systemd-debug-generator
407
408 dist_bashcompletion_DATA = \
409         shell-completion/bash/busctl \
410         shell-completion/bash/journalctl \
411         shell-completion/bash/systemd-analyze \
412         shell-completion/bash/systemd-cat \
413         shell-completion/bash/systemd-cgls \
414         shell-completion/bash/systemd-cgtop \
415         shell-completion/bash/systemd-delta \
416         shell-completion/bash/systemd-detect-virt \
417         shell-completion/bash/systemd-nspawn \
418         shell-completion/bash/systemd-run \
419         shell-completion/bash/udevadm \
420         shell-completion/bash/kernel-install
421
422 nodist_bashcompletion_DATA = \
423         shell-completion/bash/systemctl
424
425 dist_zshcompletion_DATA = \
426         shell-completion/zsh/_journalctl \
427         shell-completion/zsh/_udevadm \
428         shell-completion/zsh/_kernel-install \
429         shell-completion/zsh/_systemd-nspawn \
430         shell-completion/zsh/_systemd-analyze \
431         shell-completion/zsh/_systemd-run \
432         shell-completion/zsh/_sd_hosts_or_user_at_host \
433         shell-completion/zsh/_sd_outputmodes \
434         shell-completion/zsh/_sd_unit_files \
435         shell-completion/zsh/_systemd-delta \
436         shell-completion/zsh/_systemd
437
438 nodist_zshcompletion_DATA = \
439         shell-completion/zsh/_systemctl
440
441 EXTRA_DIST += \
442         shell-completion/bash/systemctl.in \
443         shell-completion/zsh/_systemctl.in
444
445 CLEANFILES += \
446         $(nodist_bashcompletion_DATA) \
447         $(nodist_zshcompletion_DATA)
448
449 dist_sysctl_DATA = \
450         sysctl.d/50-default.conf
451
452 dist_systemunit_DATA = \
453         units/graphical.target \
454         units/multi-user.target \
455         units/emergency.target \
456         units/sysinit.target \
457         units/basic.target \
458         units/getty.target \
459         units/halt.target \
460         units/kexec.target \
461         units/local-fs.target \
462         units/local-fs-pre.target \
463         units/initrd.target \
464         units/initrd-fs.target \
465         units/initrd-root-fs.target \
466         units/remote-fs.target \
467         units/remote-fs-pre.target \
468         units/network.target \
469         units/network-pre.target \
470         units/network-online.target \
471         units/nss-lookup.target \
472         units/nss-user-lookup.target \
473         units/poweroff.target \
474         units/reboot.target \
475         units/rescue.target \
476         units/rpcbind.target \
477         units/time-sync.target \
478         units/shutdown.target \
479         units/final.target \
480         units/umount.target \
481         units/sigpwr.target \
482         units/sleep.target \
483         units/sockets.target \
484         units/timers.target \
485         units/paths.target \
486         units/suspend.target \
487         units/swap.target \
488         units/slices.target \
489         units/system.slice \
490         units/x-.slice \
491         units/systemd-initctl.socket \
492         units/systemd-shutdownd.socket \
493         units/syslog.socket \
494         units/dev-hugepages.mount \
495         units/dev-mqueue.mount \
496         units/sys-kernel-config.mount \
497         units/sys-kernel-debug.mount \
498         units/sys-fs-fuse-connections.mount \
499         units/tmp.mount \
500         units/printer.target \
501         units/sound.target \
502         units/bluetooth.target \
503         units/smartcard.target \
504         units/systemd-ask-password-wall.path \
505         units/systemd-ask-password-console.path \
506         units/systemd-udevd-control.socket \
507         units/systemd-udevd-kernel.socket \
508         units/system-update.target \
509         units/initrd-switch-root.target
510
511 if ENABLE_KDBUS
512 dist_systemunit_DATA += \
513         $(dist_systemunit_DATA_busnames)
514 endif
515
516 dist_systemunit_DATA_busnames += \
517         units/busnames.target
518
519 nodist_systemunit_DATA = \
520         units/getty@.service \
521         units/serial-getty@.service \
522         units/console-shell.service \
523         units/console-getty.service \
524         units/container-getty@.service \
525         units/systemd-initctl.service \
526         units/systemd-shutdownd.service \
527         units/systemd-remount-fs.service \
528         units/systemd-ask-password-wall.service \
529         units/systemd-ask-password-console.service \
530         units/systemd-sysctl.service \
531         units/emergency.service \
532         units/rescue.service \
533         units/user@.service \
534         units/systemd-suspend.service \
535         units/systemd-halt.service \
536         units/systemd-poweroff.service \
537         units/systemd-reboot.service \
538         units/systemd-kexec.service \
539         units/systemd-fsck@.service \
540         units/systemd-fsck-root.service \
541         units/systemd-machine-id-commit.service \
542         units/systemd-udevd.service \
543         units/systemd-udev-trigger.service \
544         units/systemd-udev-settle.service \
545         units/systemd-udev-hwdb-update.service \
546         units/debug-shell.service \
547         units/initrd-parse-etc.service \
548         units/initrd-cleanup.service \
549         units/initrd-udevadm-cleanup-db.service \
550         units/initrd-switch-root.service \
551         units/systemd-nspawn@.service \
552         units/systemd-update-done.service
553
554 if HAVE_UTMP
555 nodist_systemunit_DATA += \
556         units/systemd-update-utmp.service \
557         units/systemd-update-utmp-runlevel.service
558 endif
559
560 dist_userunit_DATA = \
561         units/user/basic.target \
562         units/user/default.target \
563         units/user/exit.target
564
565 nodist_userunit_DATA = \
566         units/user/systemd-exit.service
567
568 dist_systempreset_DATA = \
569         system-preset/90-systemd.preset
570
571 EXTRA_DIST += \
572         units/getty@.service.m4 \
573         units/serial-getty@.service.m4 \
574         units/console-shell.service.m4.in \
575         units/console-getty.service.m4.in \
576         units/container-getty@.service.m4.in \
577         units/rescue.service.in \
578         units/systemd-initctl.service.in \
579         units/systemd-shutdownd.service.in \
580         units/systemd-remount-fs.service.in \
581         units/systemd-update-utmp.service.in \
582         units/systemd-update-utmp-runlevel.service.in \
583         units/systemd-ask-password-wall.service.in \
584         units/systemd-ask-password-console.service.in \
585         units/systemd-sysctl.service.in \
586         units/emergency.service.in \
587         units/systemd-halt.service.in \
588         units/systemd-poweroff.service.in \
589         units/systemd-reboot.service.in \
590         units/systemd-kexec.service.in \
591         units/user/systemd-exit.service.in \
592         units/systemd-fsck@.service.in \
593         units/systemd-fsck-root.service.in \
594         units/systemd-machine-id-commit.service.in \
595         units/user@.service.m4.in \
596         units/debug-shell.service.in \
597         units/systemd-suspend.service.in \
598         units/quotaon.service.in \
599         units/initrd-parse-etc.service.in \
600         units/initrd-cleanup.service.in \
601         units/initrd-udevadm-cleanup-db.service.in \
602         units/initrd-switch-root.service.in \
603         units/systemd-nspawn@.service.in \
604         units/systemd-update-done.service.in
605
606 CLEANFILES += \
607         units/console-shell.service.m4 \
608         units/console-getty.service.m4 \
609         units/container-getty@.service.m4 \
610         units/user@.service.m4
611
612 if HAVE_SYSV_COMPAT
613 nodist_systemunit_DATA += \
614         units/rc-local.service \
615         units/halt-local.service
616
617 systemgenerator_PROGRAMS += \
618         systemd-sysv-generator \
619         systemd-rc-local-generator
620 endif
621
622 EXTRA_DIST += \
623         units/rc-local.service.in \
624         units/halt-local.service.in
625
626 # automake is broken and can't handle files with a dash in front
627 # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14728#8
628 units-install-hook:
629         mv $(DESTDIR)$(systemunitdir)/x-.slice $(DESTDIR)/$(systemunitdir)/-.slice
630
631 units-uninstall-hook:
632         rm -f $(DESTDIR)/$(systemunitdir)/-.slice
633
634 INSTALL_DATA_HOOKS += units-install-hook
635 UNINSTALL_DATA_HOOKS += units-uninstall-hook
636
637 dist_doc_DATA = \
638         README \
639         NEWS \
640         LICENSE.LGPL2.1 \
641         LICENSE.GPL2 \
642         LICENSE.MIT \
643         DISTRO_PORTING \
644         src/libsystemd/sd-bus/PORTING-DBUS1 \
645         src/libsystemd/sd-bus/DIFFERENCES \
646         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
647
648 @INTLTOOL_POLICY_RULE@
649
650 # ------------------------------------------------------------------------------
651
652 MANPAGES =
653 MANPAGES_ALIAS =
654
655 include Makefile-man.am
656
657 .PHONY: man update-man-list
658 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
659
660 XML_FILES = \
661         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
662 HTML_FILES = \
663         ${XML_FILES:.xml=.html}
664 HTML_ALIAS = \
665         ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
666
667 if ENABLE_MANPAGES
668 man_MANS = \
669         $(MANPAGES) \
670         $(MANPAGES_ALIAS)
671
672 noinst_DATA += \
673         $(HTML_FILES) \
674         $(HTML_ALIAS)
675
676 CLEANFILES += \
677         $(man_MANS) \
678         $(HTML_FILES) \
679         $(HTML_ALIAS)
680
681 docs/html/man:
682         $(AM_V_at)$(MKDIR_P) $(dir $@)
683         $(AM_V_LN)$(LN_S) -f ../../man $@
684
685 noinst_DATA += \
686         docs/html/man
687
688 CLEANFILES += \
689         docs/html/man
690
691 if HAVE_PYTHON
692 man/index.html: man/systemd.index.html
693         $(AM_V_LN)$(LN_S) -f systemd.index.html $@
694
695 noinst_DATA += \
696         man/index.html
697
698 CLEANFILES += \
699         man/index.html
700
701 XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_builddir)/man/*.xml)
702 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
703 SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
704
705 update-man-list: $(top_srcdir)/tools/make-man-rules.py $(XML_GLOB)
706         $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
707         $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
708         @echo "Makefile-man.am has been regenerated"
709
710 man/systemd.index.xml: $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES)
711         $(AM_V_at)$(MKDIR_P) $(dir $@)
712         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
713
714 man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py $(SOURCE_XML_FILES)
715         $(AM_V_at)$(MKDIR_P) $(dir $@)
716         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
717
718 EXTRA_DIST += \
719         man/systemd.index.xml \
720         man/index.html \
721         man/systemd.directives.xml \
722         man/glib-event-glue.c
723
724 CLEANFILES += \
725         man/systemd.index.xml \
726         man/systemd.directives.xml
727
728 endif
729
730 endif
731
732 EXTRA_DIST += \
733         $(XML_FILES) \
734         $(HTML_FILES) \
735         $(HTML_ALIAS) \
736         $(man_MANS) \
737         tools/make-man-index.py \
738         tools/make-directive-index.py \
739         tools/xml_helper.py
740
741 # ------------------------------------------------------------------------------
742 noinst_LTLIBRARIES += \
743         libsystemd-shared.la
744
745 libsystemd_shared_la_SOURCES = \
746         src/shared/capability.c \
747         src/shared/capability.h \
748         src/shared/linux/auto_dev-ioctl.h \
749         src/shared/ioprio.h \
750         src/shared/missing.h \
751         src/shared/initreq.h \
752         src/shared/securebits.h \
753         src/shared/special.h \
754         src/shared/list.h \
755         src/shared/unaligned.h \
756         src/shared/macro.h \
757         src/shared/def.h \
758         src/shared/sparse-endian.h \
759         src/shared/refcnt.h \
760         src/shared/udev-util.h \
761         src/shared/device-nodes.c \
762         src/shared/device-nodes.h \
763         src/shared/util.c \
764         src/shared/util.h \
765         src/shared/virt.c \
766         src/shared/virt.h \
767         src/shared/architecture.c \
768         src/shared/architecture.h \
769         src/shared/efivars.c \
770         src/shared/efivars.h \
771         src/shared/path-util.c \
772         src/shared/path-util.h \
773         src/shared/time-util.c \
774         src/shared/time-util.h \
775         src/shared/locale-util.c \
776         src/shared/locale-util.h \
777         src/shared/mempool.c \
778         src/shared/mempool.h \
779         src/shared/hashmap.c \
780         src/shared/hashmap.h \
781         src/shared/siphash24.c \
782         src/shared/siphash24.h \
783         src/shared/set.h \
784         src/shared/fdset.c \
785         src/shared/fdset.h \
786         src/shared/prioq.c \
787         src/shared/prioq.h \
788         src/shared/sleep-config.c \
789         src/shared/sleep-config.h \
790         src/shared/strv.c \
791         src/shared/strv.h \
792         src/shared/env-util.c \
793         src/shared/env-util.h \
794         src/shared/strbuf.c \
795         src/shared/strbuf.h \
796         src/shared/strxcpyx.c \
797         src/shared/strxcpyx.h \
798         src/shared/conf-parser.c \
799         src/shared/conf-parser.h \
800         src/shared/log.c \
801         src/shared/log.h \
802         src/shared/ratelimit.h \
803         src/shared/ratelimit.c \
804         src/shared/exit-status.c \
805         src/shared/exit-status.h \
806         src/shared/utf8.c \
807         src/shared/utf8.h \
808         src/shared/gunicode.c \
809         src/shared/gunicode.h \
810         src/shared/pager.c \
811         src/shared/pager.h \
812         src/shared/socket-util.c \
813         src/shared/socket-util.h \
814         src/shared/in-addr-util.c \
815         src/shared/in-addr-util.h \
816         src/shared/ether-addr-util.h \
817         src/shared/conf-files.c \
818         src/shared/conf-files.h \
819         src/shared/cgroup-util.c \
820         src/shared/cgroup-util.h \
821         src/shared/cgroup-show.c \
822         src/shared/cgroup-show.h \
823         src/shared/unit-name.c \
824         src/shared/unit-name.h \
825         src/shared/utmp-wtmp.h \
826         src/shared/watchdog.c \
827         src/shared/watchdog.h \
828         src/shared/spawn-ask-password-agent.c \
829         src/shared/spawn-ask-password-agent.h \
830         src/shared/replace-var.c \
831         src/shared/replace-var.h \
832         src/shared/spawn-polkit-agent.c \
833         src/shared/spawn-polkit-agent.h \
834         src/shared/clock-util.c \
835         src/shared/clock-util.h \
836         src/shared/time-dst.c \
837         src/shared/time-dst.h \
838         src/shared/calendarspec.c \
839         src/shared/calendarspec.h \
840         src/shared/fileio.c \
841         src/shared/fileio.h \
842         src/shared/output-mode.h \
843         src/shared/MurmurHash2.c \
844         src/shared/MurmurHash2.h \
845         src/shared/acpi-fpdt.h \
846         src/shared/acpi-fpdt.c \
847         src/shared/boot-timestamps.h \
848         src/shared/boot-timestamps.c \
849         src/shared/mkdir.c \
850         src/shared/mkdir.h \
851         src/shared/smack-util.c \
852         src/shared/smack-util.h \
853         src/shared/apparmor-util.c \
854         src/shared/apparmor-util.h \
855         src/shared/ima-util.c \
856         src/shared/ima-util.h \
857         src/shared/ptyfwd.c \
858         src/shared/ptyfwd.h \
859         src/shared/errno-list.c \
860         src/shared/errno-list.h \
861         src/shared/af-list.c \
862         src/shared/af-list.h \
863         src/shared/arphrd-list.c \
864         src/shared/arphrd-list.h \
865         src/shared/cap-list.c \
866         src/shared/cap-list.h \
867         src/shared/audit.c \
868         src/shared/audit.h \
869         src/shared/xml.c \
870         src/shared/xml.h \
871         src/shared/bus-label.c \
872         src/shared/bus-label.h \
873         src/shared/gpt.h \
874         src/shared/clean-ipc.h \
875         src/shared/clean-ipc.c \
876         src/shared/login-shared.c \
877         src/shared/login-shared.h \
878         src/shared/ring.c \
879         src/shared/ring.h \
880         src/shared/barrier.c \
881         src/shared/barrier.h \
882         src/shared/pty.c \
883         src/shared/pty.h \
884         src/shared/async.c \
885         src/shared/async.h \
886         src/shared/copy.c \
887         src/shared/copy.h \
888         src/shared/base-filesystem.c \
889         src/shared/base-filesystem.h \
890         src/shared/memfd-util.c \
891         src/shared/memfd-util.h \
892         src/shared/uid-range.c \
893         src/shared/uid-range.h \
894         src/shared/nss-util.h
895
896 if HAVE_UTMP
897 libsystemd_shared_la_SOURCES += \
898         src/shared/utmp-wtmp.c
899 endif
900
901 nodist_libsystemd_shared_la_SOURCES = \
902         src/shared/errno-from-name.h \
903         src/shared/errno-to-name.h \
904         src/shared/af-from-name.h \
905         src/shared/af-to-name.h \
906         src/shared/arphrd-from-name.h \
907         src/shared/arphrd-to-name.h \
908         src/shared/cap-from-name.h \
909         src/shared/cap-to-name.h
910
911 libsystemd_shared_la_CFLAGS = \
912         $(AM_CFLAGS) \
913         $(CAP_CFLAGS) \
914         $(SECCOMP_CFLAGS) \
915         -pthread
916
917 libsystemd_shared_la_LIBADD = \
918         $(CAP_LIBS)
919
920 # ------------------------------------------------------------------------------
921 noinst_LTLIBRARIES += \
922         libsystemd-units.la
923
924 libsystemd_units_la_SOURCES = \
925         src/shared/install.c \
926         src/shared/install.h \
927         src/shared/install-printf.c \
928         src/shared/install-printf.h \
929         src/shared/path-lookup.c \
930         src/shared/path-lookup.h \
931         src/shared/specifier.c \
932         src/shared/specifier.h
933
934 # ------------------------------------------------------------------------------
935 noinst_LTLIBRARIES += \
936         libsystemd-label.la
937
938 libsystemd_label_la_SOURCES = \
939         src/shared/socket-label.c \
940         src/shared/label.c \
941         src/shared/label.h \
942         src/shared/selinux-util.c \
943         src/shared/selinux-util.h \
944         src/shared/mkdir-label.c \
945         src/shared/ask-password-api.c \
946         src/shared/ask-password-api.h \
947         src/shared/switch-root.h \
948         src/shared/switch-root.c \
949         src/shared/fileio-label.c \
950         src/shared/fileio-label.h \
951         src/shared/dev-setup.c \
952         src/shared/dev-setup.h \
953         src/shared/dropin.c \
954         src/shared/dropin.h \
955         src/shared/condition.c \
956         src/shared/condition.h \
957         src/shared/generator.h \
958         src/shared/generator.c
959
960 libsystemd_label_la_CFLAGS = \
961         $(AM_CFLAGS) \
962         $(SELINUX_CFLAGS)
963
964 libsystemd_label_la_LIBADD = \
965         $(SELINUX_LIBS)
966
967 # -----------------------------------------------------------------------------
968
969 if ENABLE_LDCONFIG
970 dist_systemunit_DATA += \
971         units/ldconfig.service
972
973 SYSINIT_TARGET_WANTS += \
974         ldconfig.service
975 endif
976
977 # ------------------------------------------------------------------------------
978
979 if HAVE_SECCOMP
980 noinst_LTLIBRARIES += \
981         libsystemd-seccomp.la
982
983 libsystemd_seccomp_la_SOURCES = \
984         src/shared/seccomp-util.h \
985         src/shared/seccomp-util.c
986
987 libsystemd_seccomp_la_CFLAGS = \
988         $(AM_CFLAGS) \
989         $(SECCOMP_CFLAGS)
990
991 libsystemd_seccomp_la_LIBADD = \
992         $(SECCOMP_LIBS)
993 endif
994
995 # ------------------------------------------------------------------------------
996 noinst_LTLIBRARIES += \
997         libsystemd-logs.la
998
999 libsystemd_logs_la_SOURCES = \
1000         src/shared/logs-show.c \
1001         src/shared/logs-show.h
1002
1003 # ------------------------------------------------------------------------------
1004 if HAVE_ACL
1005 noinst_LTLIBRARIES += \
1006         libsystemd-acl.la
1007
1008 libsystemd_acl_la_SOURCES = \
1009         src/shared/acl-util.c \
1010         src/shared/acl-util.h
1011
1012 libsystemd_acl_la_CFLAGS = \
1013         $(AM_CFLAGS) \
1014         $(ACL_CFLAGS)
1015
1016 libsystemd_acl_la_LIBADD = \
1017         $(ACL_LIBS)
1018 endif
1019
1020 # ------------------------------------------------------------------------------
1021 noinst_LTLIBRARIES += \
1022         libsystemd-core.la
1023
1024 libsystemd_core_la_SOURCES = \
1025         src/core/unit.c \
1026         src/core/unit.h \
1027         src/core/unit-printf.c \
1028         src/core/unit-printf.h \
1029         src/core/job.c \
1030         src/core/job.h \
1031         src/core/manager.c \
1032         src/core/manager.h \
1033         src/core/transaction.c \
1034         src/core/transaction.h \
1035         src/core/load-fragment.c \
1036         src/core/load-fragment.h \
1037         src/core/service.c \
1038         src/core/service.h \
1039         src/core/socket.c \
1040         src/core/socket.h \
1041         src/core/busname.c \
1042         src/core/busname.h \
1043         src/core/bus-common.c \
1044         src/core/bus-common.h \
1045         src/core/bus-endpoint.c \
1046         src/core/bus-endpoint.h \
1047         src/core/target.c \
1048         src/core/target.h \
1049         src/core/snapshot.c \
1050         src/core/snapshot.h \
1051         src/core/device.c \
1052         src/core/device.h \
1053         src/core/mount.c \
1054         src/core/mount.h \
1055         src/core/automount.c \
1056         src/core/automount.h \
1057         src/core/swap.c \
1058         src/core/swap.h \
1059         src/core/timer.c \
1060         src/core/timer.h \
1061         src/core/path.c \
1062         src/core/path.h \
1063         src/core/slice.c \
1064         src/core/slice.h \
1065         src/core/scope.c \
1066         src/core/scope.h \
1067         src/core/load-dropin.c \
1068         src/core/load-dropin.h \
1069         src/core/execute.c \
1070         src/core/execute.h \
1071         src/core/kill.c \
1072         src/core/kill.h \
1073         src/core/dbus.c \
1074         src/core/dbus.h \
1075         src/core/dbus-manager.c \
1076         src/core/dbus-manager.h \
1077         src/core/dbus-unit.c \
1078         src/core/dbus-unit.h \
1079         src/core/dbus-job.c \
1080         src/core/dbus-job.h \
1081         src/core/dbus-service.c \
1082         src/core/dbus-service.h \
1083         src/core/dbus-socket.c \
1084         src/core/dbus-socket.h \
1085         src/core/dbus-busname.c \
1086         src/core/dbus-busname.h \
1087         src/core/dbus-target.c \
1088         src/core/dbus-target.h \
1089         src/core/dbus-snapshot.c \
1090         src/core/dbus-snapshot.h \
1091         src/core/dbus-device.c \
1092         src/core/dbus-device.h \
1093         src/core/dbus-mount.c \
1094         src/core/dbus-mount.h \
1095         src/core/dbus-automount.c \
1096         src/core/dbus-automount.h \
1097         src/core/dbus-swap.c \
1098         src/core/dbus-swap.h \
1099         src/core/dbus-timer.c \
1100         src/core/dbus-timer.h \
1101         src/core/dbus-path.c \
1102         src/core/dbus-path.h \
1103         src/core/dbus-slice.c \
1104         src/core/dbus-slice.h \
1105         src/core/dbus-scope.c \
1106         src/core/dbus-scope.h \
1107         src/core/dbus-execute.c \
1108         src/core/dbus-execute.h \
1109         src/core/dbus-kill.c \
1110         src/core/dbus-kill.h \
1111         src/core/dbus-cgroup.c \
1112         src/core/dbus-cgroup.h \
1113         src/core/cgroup.c \
1114         src/core/cgroup.h \
1115         src/core/selinux-access.c \
1116         src/core/selinux-access.h \
1117         src/core/selinux-setup.c \
1118         src/core/selinux-setup.h \
1119         src/core/smack-setup.c \
1120         src/core/smack-setup.h \
1121         src/core/ima-setup.c \
1122         src/core/ima-setup.h \
1123         src/core/locale-setup.h \
1124         src/core/locale-setup.c \
1125         src/core/hostname-setup.c \
1126         src/core/hostname-setup.h \
1127         src/core/machine-id-setup.c \
1128         src/core/machine-id-setup.h \
1129         src/core/mount-setup.c \
1130         src/core/mount-setup.h \
1131         src/core/kmod-setup.c \
1132         src/core/kmod-setup.h \
1133         src/core/loopback-setup.h \
1134         src/core/loopback-setup.c \
1135         src/core/namespace.c \
1136         src/core/namespace.h \
1137         src/core/build.h \
1138         src/core/sysfs-show.h \
1139         src/core/killall.h \
1140         src/core/killall.c \
1141         src/core/audit-fd.c \
1142         src/core/audit-fd.h \
1143         src/core/show-status.c \
1144         src/core/show-status.h \
1145         src/core/failure-action.c \
1146         src/core/failure-action.h
1147
1148 nodist_libsystemd_core_la_SOURCES = \
1149         src/core/load-fragment-gperf.c \
1150         src/core/load-fragment-gperf-nulstr.c
1151
1152 libsystemd_core_la_CFLAGS = \
1153         $(AM_CFLAGS) \
1154         $(PAM_CFLAGS) \
1155         $(AUDIT_CFLAGS) \
1156         $(KMOD_CFLAGS) \
1157         $(APPARMOR_CFLAGS) \
1158         $(SECCOMP_CFLAGS) \
1159         $(MOUNT_CFLAGS) \
1160         -pthread
1161
1162 libsystemd_core_la_LIBADD = \
1163         libsystemd-units.la \
1164         libsystemd-label.la \
1165         libudev-internal.la \
1166         libsystemd-shared.la \
1167         libsystemd-internal.la \
1168         $(PAM_LIBS) \
1169         $(AUDIT_LIBS) \
1170         $(KMOD_LIBS) \
1171         $(APPARMOR_LIBS) \
1172         $(SECCOMP_LIBS) \
1173         $(MOUNT_LIBS)
1174
1175 if HAVE_SECCOMP
1176 libsystemd_core_la_LIBADD += \
1177         libsystemd-seccomp.la
1178 endif
1179
1180 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1181         $(AM_V_at)$(MKDIR_P) $(dir $@)
1182         $(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 ";" }' < $< > $@
1183
1184 EXTRA_DIST += \
1185         src/core/load-fragment-gperf.gperf.m4
1186
1187 CLEANFILES += \
1188         src/core/load-fragment-gperf.gperf \
1189         src/core/load-fragment-gperf.c \
1190         src/core/load-fragment-gperf-nulstr.c \
1191         src/shared/errno-list.txt \
1192         src/shared/errno-from-name.gperf \
1193         src/shared/af-list.txt \
1194         src/shared/af-from-name.gperf \
1195         src/shared/arphrd-list.txt \
1196         src/shared/arphrd-from-name.gperf \
1197         src/shared/cap-list.txt \
1198         src/shared/cap-from-name.gperf \
1199         src/resolve/dns_type-list.txt \
1200         src/resolve/dns_type-from-name.gperf
1201
1202 BUILT_SOURCES += \
1203         src/shared/errno-from-name.h \
1204         src/shared/errno-to-name.h \
1205         src/shared/af-from-name.h \
1206         src/shared/af-to-name.h \
1207         src/shared/arphrd-from-name.h \
1208         src/shared/arphrd-to-name.h \
1209         src/shared/cap-from-name.h \
1210         src/shared/cap-to-name.h \
1211         src/resolve/dns_type-from-name.h \
1212         src/resolve/dns_type-to-name.h
1213
1214 %-from-name.gperf: %-list.txt
1215         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
1216
1217 %-from-name.h: %-from-name.gperf
1218         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
1219
1220
1221 src/shared/errno-list.txt:
1222         $(AM_V_at)$(MKDIR_P) $(dir $@)
1223         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
1224
1225 src/shared/errno-to-name.h: src/shared/errno-list.txt
1226         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1227
1228
1229 src/shared/af-list.txt:
1230         $(AM_V_at)$(MKDIR_P) $(dir $@)
1231         $(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; }' >$@
1232
1233 src/shared/af-to-name.h: src/shared/af-list.txt
1234         $(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 "};"}' <$< >$@
1235
1236
1237 src/shared/arphrd-list.txt:
1238         $(AM_V_at)$(MKDIR_P) $(dir $@)
1239         $(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_//' >$@
1240
1241 src/shared/arphrd-to-name.h: src/shared/arphrd-list.txt
1242         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1243
1244 src/shared/arphrd-from-name.gperf: src/shared/arphrd-list.txt
1245         $(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 }' <$< >$@
1246
1247
1248 src/shared/cap-list.txt:
1249         $(AM_V_at)$(MKDIR_P) $(dir $@)
1250         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/capability.h -include missing.h - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@
1251
1252 src/shared/cap-to-name.h: src/shared/cap-list.txt
1253         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1254
1255 src/shared/cap-from-name.gperf: src/shared/cap-list.txt
1256         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct capability_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
1257
1258 src/shared/cap-from-name.h: src/shared/cap-from-name.gperf
1259         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@
1260
1261
1262 src/resolve/dns_type-list.txt: src/resolve/dns-type.h
1263         $(AM_V_at)$(MKDIR_P) $(dir $@)
1264         $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@
1265
1266 src/resolve/dns_type-to-name.h: src/resolve/dns_type-list.txt
1267         $(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" }' <$< >$@
1268
1269 src/resolve/dns_type-from-name.gperf: src/resolve/dns_type-list.txt
1270         $(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 }' <$< >$@
1271
1272 # ------------------------------------------------------------------------------
1273 systemd_SOURCES = \
1274         src/core/main.c
1275
1276 systemd_CFLAGS = \
1277         $(AM_CFLAGS) \
1278         $(SECCOMP_CFLAGS)
1279
1280 systemd_LDADD = \
1281         libsystemd-core.la \
1282         $(RT_LIBS)
1283
1284 dist_pkgsysconf_DATA += \
1285         src/core/system.conf \
1286         src/core/user.conf
1287
1288 dist_dbuspolicy_DATA += \
1289         src/core/org.freedesktop.systemd1.conf
1290
1291 dist_dbussystemservice_DATA += \
1292         src/core/org.freedesktop.systemd1.service
1293
1294 polkitpolicy_in_in_files += \
1295         src/core/org.freedesktop.systemd1.policy.in.in
1296
1297 pkgconfigdata_DATA = \
1298         src/core/systemd.pc
1299
1300 nodist_rpmmacros_DATA = \
1301         src/core/macros.systemd
1302
1303 EXTRA_DIST += \
1304         src/core/systemd.pc.in \
1305         src/core/macros.systemd.in
1306
1307 CLEANFILES += \
1308         src/core/macros.systemd \
1309         src/core/org.freedesktop.systemd1.policy.in
1310
1311 # ------------------------------------------------------------------------------
1312
1313 manual_tests += \
1314         test-ns \
1315         test-loopback \
1316         test-hostname \
1317         test-daemon \
1318         test-cgroup \
1319         test-install \
1320         test-watchdog \
1321         test-log \
1322         test-ipcrm
1323
1324 if HAVE_KMOD
1325 manual_tests += \
1326         test-rtnl-manual
1327 endif
1328
1329 tests += \
1330         test-engine \
1331         test-cgroup-mask \
1332         test-job-type \
1333         test-env-replace \
1334         test-strbuf \
1335         test-strv \
1336         test-path \
1337         test-path-util \
1338         test-strxcpyx \
1339         test-unit-name \
1340         test-unit-file \
1341         test-utf8 \
1342         test-ellipsize \
1343         test-util \
1344         test-ring \
1345         test-barrier \
1346         test-pty \
1347         test-tmpfiles \
1348         test-namespace \
1349         test-date \
1350         test-sleep \
1351         test-replace-var \
1352         test-sched-prio \
1353         test-calendarspec \
1354         test-strip-tab-ansi \
1355         test-cgroup-util \
1356         test-prioq \
1357         test-fileio \
1358         test-time \
1359         test-hashmap \
1360         test-set \
1361         test-list \
1362         test-unaligned \
1363         test-tables \
1364         test-device-nodes \
1365         test-xml \
1366         test-architecture \
1367         test-socket-util \
1368         test-fdset \
1369         test-conf-files \
1370         test-capability \
1371         test-async \
1372         test-ratelimit \
1373         test-condition \
1374         test-uid-range \
1375         test-bus-policy \
1376         test-locale-util \
1377         test-execute \
1378         test-copy \
1379         test-cap-list
1380
1381 EXTRA_DIST += \
1382         test/a.service \
1383         test/basic.target \
1384         test/b.service \
1385         test/c.service \
1386         test/daughter.service \
1387         test/d.service \
1388         test/end.service \
1389         test/e.service \
1390         test/f.service \
1391         test/grandchild.service \
1392         test/g.service \
1393         test/hello-after-sleep.target \
1394         test/hello.service \
1395         test/h.service \
1396         test/parent-deep.slice \
1397         test/parent.slice \
1398         test/paths.target \
1399         test/sched_idle_bad.service \
1400         test/sched_idle_ok.service \
1401         test/sched_rr_bad.service \
1402         test/sched_rr_change.service \
1403         test/sched_rr_ok.service \
1404         test/shutdown.target \
1405         test/sleep.service \
1406         test/sockets.target \
1407         test/son.service \
1408         test/sysinit.target \
1409         test/testsuite.target \
1410         test/timers.target \
1411         test/unstoppable.service \
1412         test/path-changed.service \
1413         test/path-directorynotempty.service \
1414         test/path-existsglob.service \
1415         test/path-exists.service \
1416         test/path-makedirectory.service \
1417         test/path-modified.service \
1418         test/path-mycustomunit.service \
1419         test/path-service.service \
1420         test/path-changed.path \
1421         test/path-directorynotempty.path \
1422         test/path-existsglob.path \
1423         test/path-exists.path \
1424         test/path-makedirectory.path \
1425         test/path-modified.path \
1426         test/path-unit.path \
1427         test/exec-environment-empty.service \
1428         test/exec-environment-multiple.service \
1429         test/exec-environment.service \
1430         test/exec-group.service \
1431         test/exec-ignoresigpipe-no.service \
1432         test/exec-ignoresigpipe-yes.service \
1433         test/exec-personality-x86-64.service \
1434         test/exec-personality-x86.service \
1435         test/exec-privatedevices-no.service \
1436         test/exec-privatedevices-yes.service \
1437         test/exec-privatetmp-no.service \
1438         test/exec-privatetmp-yes.service \
1439         test/exec-systemcallerrornumber.service \
1440         test/exec-systemcallfilter-failing2.service \
1441         test/exec-systemcallfilter-failing.service \
1442         test/exec-systemcallfilter-not-failing2.service \
1443         test/exec-systemcallfilter-not-failing.service \
1444         test/exec-user.service \
1445         test/exec-workingdirectory.service \
1446         test/exec-umask-0177.service \
1447         test/exec-umask-default.service \
1448         test/bus-policy/hello.conf \
1449         test/bus-policy/methods.conf \
1450         test/bus-policy/ownerships.conf \
1451         test/bus-policy/signals.conf \
1452         test/bus-policy/check-own-rules.conf \
1453         test/bus-policy/many-rules.conf \
1454         test/bus-policy/test.conf
1455
1456
1457 EXTRA_DIST += \
1458         src/test/test-helper.h
1459
1460 test_device_nodes_SOURCES = \
1461         src/test/test-device-nodes.c
1462
1463 test_device_nodes_LDADD = \
1464         libsystemd-shared.la
1465
1466 test_engine_SOURCES = \
1467         src/test/test-engine.c
1468
1469 test_engine_CFLAGS = \
1470         $(AM_CFLAGS) \
1471         $(SECCOMP_CFLAGS)
1472
1473 test_engine_LDADD = \
1474         libsystemd-core.la \
1475         $(RT_LIBS)
1476
1477 test_job_type_SOURCES = \
1478         src/test/test-job-type.c
1479
1480 test_job_type_CFLAGS = \
1481         $(AM_CFLAGS) \
1482         $(SECCOMP_CFLAGS)
1483
1484 test_job_type_LDADD = \
1485         libsystemd-core.la \
1486         $(RT_LIBS)
1487
1488 test_ns_SOURCES = \
1489         src/test/test-ns.c
1490
1491 test_ns_CFLAGS = \
1492         $(AM_CFLAGS) \
1493         $(SECCOMP_CFLAGS)
1494
1495 test_ns_LDADD = \
1496         libsystemd-core.la
1497
1498 test_loopback_SOURCES = \
1499         src/test/test-loopback.c
1500
1501 test_loopback_LDADD = \
1502         libsystemd-core.la
1503
1504 test_hostname_SOURCES = \
1505         src/test/test-hostname.c
1506
1507 test_hostname_LDADD = \
1508         libsystemd-core.la
1509
1510 if ENABLE_EFI
1511 manual_tests += \
1512         test-boot-timestamp
1513
1514 test_boot_timestamp_SOURCES = \
1515         src/test/test-boot-timestamps.c
1516
1517 test_boot_timestamp_LDADD = \
1518         libsystemd-shared.la
1519 endif
1520
1521 test_unit_name_SOURCES = \
1522         src/test/test-unit-name.c
1523
1524 test_unit_name_CFLAGS = \
1525         $(AM_CFLAGS) \
1526         $(SECCOMP_CFLAGS)
1527
1528 test_unit_name_LDADD = \
1529         libsystemd-core.la \
1530         $(RT_LIBS)
1531
1532 test_unit_file_SOURCES = \
1533         src/test/test-unit-file.c
1534
1535 test_unit_file_CFLAGS = \
1536         $(AM_CFLAGS) \
1537         $(SECCOMP_CFLAGS)
1538
1539 test_unit_file_LDADD = \
1540         libsystemd-core.la \
1541         $(RT_LIBS)
1542
1543 test_utf8_SOURCES = \
1544         src/test/test-utf8.c
1545
1546 test_utf8_LDADD = \
1547         libsystemd-shared.la
1548
1549 test_capability_SOURCES = \
1550         src/test/test-capability.c
1551
1552 test_capability_LDADD = \
1553         libsystemd-shared.la
1554
1555 test_async_SOURCES = \
1556         src/test/test-async.c
1557
1558 test_async_LDADD = \
1559         libsystemd-shared.la
1560
1561 test_locale_util_SOURCES = \
1562         src/test/test-locale-util.c
1563
1564 test_locale_util_LDADD = \
1565         libsystemd-shared.la
1566
1567 test_copy_SOURCES = \
1568         src/test/test-copy.c
1569
1570 test_copy_LDADD = \
1571         libsystemd-shared.la
1572
1573 test_condition_SOURCES = \
1574         src/test/test-condition.c
1575
1576 test_condition_LDADD = \
1577         libsystemd-label.la \
1578         libsystemd-internal.la \
1579         libsystemd-shared.la
1580
1581 test_fdset_SOURCES = \
1582         src/test/test-fdset.c
1583
1584 test_fdset_LDADD = \
1585         libsystemd-shared.la \
1586         libsystemd-internal.la
1587
1588 test_ratelimit_SOURCES = \
1589         src/test/test-ratelimit.c
1590
1591 test_ratelimit_LDADD = \
1592         libsystemd-shared.la
1593
1594 test_util_SOURCES = \
1595         src/test/test-util.c
1596
1597 test_util_LDADD = \
1598         -lm \
1599         libsystemd-shared.la
1600
1601 test_uid_range_SOURCES = \
1602         src/test/test-uid-range.c
1603
1604 test_uid_range_LDADD = \
1605         libsystemd-shared.la
1606
1607 test_cap_list_SOURCES = \
1608         src/test/test-cap-list.c
1609
1610 test_cap_list_LDADD = \
1611         libsystemd-shared.la
1612
1613 test_socket_util_SOURCES = \
1614         src/test/test-socket-util.c
1615
1616 test_socket_util_LDADD = \
1617         libsystemd-shared.la
1618
1619 test_ring_SOURCES = \
1620         src/test/test-ring.c
1621
1622 test_ring_LDADD = \
1623         libsystemd-shared.la
1624
1625 test_barrier_SOURCES = \
1626         src/test/test-barrier.c
1627
1628 test_barrier_LDADD = \
1629         libsystemd-shared.la
1630
1631 test_pty_SOURCES = \
1632         src/test/test-pty.c
1633
1634 test_pty_LDADD = \
1635         libsystemd-core.la
1636
1637 test_tmpfiles_SOURCES = \
1638         src/test/test-tmpfiles.c
1639
1640 test_tmpfiles_LDADD = \
1641         libsystemd-shared.la
1642
1643 test_namespace_SOURCES = \
1644         src/test/test-namespace.c
1645
1646 test_namespace_LDADD = \
1647         libsystemd-core.la
1648
1649 CLEANFILES += \
1650         src/test/test-hashmap-ordered.c
1651
1652 BUILT_SOURCES += \
1653         src/test/test-hashmap-ordered.c
1654
1655 src/test/test-hashmap-ordered.c: src/test/test-hashmap-plain.c
1656         $(AM_V_at)$(MKDIR_P) $(dir $@)
1657         $(AM_V_GEN)$(AWK) 'BEGIN { print "/* GENERATED FILE */\n#define ORDERED" } \
1658                            { if (!match($$0, "^#include"))          \
1659                                  gsub(/hashmap/, "ordered_hashmap"); \
1660                              gsub(/HASHMAP/, "ORDERED_HASHMAP");     \
1661                              gsub(/Hashmap/, "OrderedHashmap");      \
1662                              print }' <$< >$@
1663
1664 nodist_test_hashmap_SOURCES = \
1665         src/test/test-hashmap-ordered.c
1666
1667 test_hashmap_SOURCES = \
1668         src/test/test-hashmap.c \
1669         src/test/test-hashmap-plain.c
1670
1671 test_hashmap_LDADD = \
1672         libsystemd-shared.la
1673
1674 test_set_SOURCES = \
1675         src/test/test-set.c
1676
1677 test_set_LDADD = \
1678         libsystemd-shared.la
1679
1680 test_xml_SOURCES = \
1681         src/test/test-xml.c
1682
1683 test_xml_LDADD = \
1684         libsystemd-shared.la
1685
1686 test_list_SOURCES = \
1687         src/test/test-list.c
1688
1689 test_list_LDADD = \
1690         libsystemd-shared.la
1691
1692 test_unaligned_LDADD = \
1693         libsystemd-shared.la
1694
1695 test_unaligned_SOURCES = \
1696         src/test/test-unaligned.c
1697
1698 test_tables_SOURCES = \
1699         src/test/test-tables.c \
1700         src/shared/test-tables.h \
1701         src/bus-proxyd/bus-policy.c \
1702         src/bus-proxyd/bus-policy.h \
1703         src/journal/journald-server.c \
1704         src/journal/journald-server.h
1705
1706 test_tables_CPPFLAGS = \
1707         $(AM_CPPFLAGS) \
1708         -I$(top_srcdir)/src/bus-proxyd
1709
1710 test_tables_CFLAGS = \
1711         $(AM_CFLAGS) \
1712         $(SECCOMP_CFLAGS)
1713
1714 test_tables_LDADD = \
1715         libsystemd-logs.la \
1716         libsystemd-journal-internal.la \
1717         libsystemd-journal-core.la \
1718         libsystemd-core.la \
1719         libudev-core.la \
1720         $(RT_LIBS)
1721
1722 test_prioq_SOURCES = \
1723         src/test/test-prioq.c
1724
1725 test_prioq_LDADD = \
1726         libsystemd-shared.la
1727
1728 test_fileio_SOURCES = \
1729         src/test/test-fileio.c
1730
1731 test_fileio_LDADD = \
1732         libsystemd-shared.la
1733
1734 test_time_SOURCES = \
1735         src/test/test-time.c
1736
1737 test_time_LDADD = \
1738         libsystemd-shared.la
1739
1740 test_architecture_SOURCES = \
1741         src/test/test-architecture.c
1742
1743 test_architecture_LDADD = \
1744         libsystemd-shared.la
1745
1746 test_log_SOURCES = \
1747         src/test/test-log.c
1748
1749 test_log_LDADD = \
1750         libsystemd-shared.la
1751
1752 test_ipcrm_SOURCES = \
1753         src/test/test-ipcrm.c
1754
1755 test_ipcrm_LDADD = \
1756         libsystemd-shared.la \
1757         -lrt
1758
1759 test_rtnl_manual_SOURCES = \
1760         src/test/test-rtnl-manual.c
1761
1762 test_rtnl_manual_CFLAGS = \
1763         $(AM_CFLAGS) \
1764         $(KMOD_CFLAGS)
1765
1766 test_rtnl_manual_LDADD = \
1767         libsystemd-internal.la \
1768         libsystemd-shared.la \
1769         $(KMOD_LIBS)
1770
1771 test_ellipsize_SOURCES = \
1772         src/test/test-ellipsize.c
1773
1774 test_ellipsize_LDADD = \
1775         libsystemd-shared.la
1776
1777 test_date_SOURCES = \
1778         src/test/test-date.c
1779
1780 test_date_LDADD = \
1781         libsystemd-shared.la
1782
1783 test_sleep_SOURCES = \
1784         src/test/test-sleep.c
1785
1786 test_sleep_LDADD = \
1787         libsystemd-core.la
1788
1789 test_replace_var_SOURCES = \
1790         src/test/test-replace-var.c
1791
1792 test_replace_var_LDADD = \
1793         libsystemd-shared.la
1794
1795 test_calendarspec_SOURCES = \
1796         src/test/test-calendarspec.c
1797
1798 test_calendarspec_LDADD = \
1799         libsystemd-shared.la
1800
1801 test_strip_tab_ansi_SOURCES = \
1802         src/test/test-strip-tab-ansi.c
1803
1804 test_strip_tab_ansi_LDADD = \
1805         libsystemd-shared.la
1806
1807 test_daemon_SOURCES = \
1808         src/test/test-daemon.c
1809
1810 test_daemon_LDADD = \
1811         libsystemd-internal.la \
1812         libsystemd-shared.la
1813
1814 test_cgroup_SOURCES = \
1815         src/test/test-cgroup.c
1816
1817 test_cgroup_LDADD = \
1818         libsystemd-label.la \
1819         libsystemd-shared.la \
1820         libsystemd-internal.la
1821
1822 test_cgroup_mask_SOURCES = \
1823         src/test/test-cgroup-mask.c
1824
1825 test_cgroup_mask_CPPFLAGS = \
1826         $(AM_CPPFLAGS)
1827
1828 test_cgroup_mask_CFLAGS = \
1829         $(AM_CFLAGS) \
1830         $(SECCOMP_CFLAGS)
1831
1832 test_cgroup_mask_LDADD = \
1833         libsystemd-core.la \
1834         $(RT_LIBS)
1835
1836 test_cgroup_util_SOURCES = \
1837         src/test/test-cgroup-util.c
1838
1839 test_cgroup_util_LDADD = \
1840         libsystemd-label.la \
1841         libsystemd-internal.la \
1842         libsystemd-shared.la
1843
1844 test_env_replace_SOURCES = \
1845         src/test/test-env-replace.c
1846
1847 test_env_replace_LDADD = \
1848         libsystemd-shared.la
1849
1850 test_strbuf_SOURCES = \
1851         src/test/test-strbuf.c
1852
1853 test_strbuf_LDADD = \
1854         libsystemd-shared.la
1855
1856 test_strv_SOURCES = \
1857         src/test/test-strv.c
1858
1859 test_strv_LDADD = \
1860         libsystemd-units.la \
1861         libsystemd-internal.la \
1862         libsystemd-shared.la
1863
1864 test_path_util_SOURCES = \
1865         src/test/test-path-util.c
1866
1867 test_path_util_LDADD = \
1868         libsystemd-shared.la
1869
1870 test_path_SOURCES = \
1871         src/test/test-path.c
1872
1873 test_path_CFLAGS = \
1874         $(AM_CFLAGS)
1875
1876 test_path_LDADD = \
1877         libsystemd-core.la
1878
1879 test_execute_SOURCES = \
1880         src/test/test-execute.c
1881
1882 test_execute_CFLAGS = \
1883         $(AM_CFLAGS)
1884
1885 test_execute_LDADD = \
1886         libsystemd-core.la
1887
1888 test_strxcpyx_SOURCES = \
1889         src/test/test-strxcpyx.c
1890
1891 test_strxcpyx_LDADD = \
1892         libsystemd-shared.la
1893
1894 test_install_SOURCES = \
1895         src/test/test-install.c
1896
1897 test_install_LDADD = \
1898         libsystemd-units.la \
1899         libsystemd-label.la \
1900         libsystemd-shared.la \
1901         libsystemd-internal.la
1902
1903 test_watchdog_SOURCES = \
1904         src/test/test-watchdog.c
1905
1906 test_watchdog_LDADD = \
1907         libsystemd-shared.la
1908
1909 test_sched_prio_SOURCES = \
1910         src/test/test-sched-prio.c
1911
1912 test_sched_prio_CPPFLAGS = \
1913         $(AM_CPPFLAGS)
1914
1915 test_sched_prio_CFLAGS = \
1916         $(AM_CFLAGS) \
1917         $(SECCOMP_CFLAGS)
1918
1919 test_sched_prio_LDADD = \
1920         libsystemd-core.la \
1921         $(RT_LIBS)
1922
1923 test_conf_files_SOURCES = \
1924         src/test/test-conf-files.c
1925
1926 test_conf_files_LDADD = \
1927         libsystemd-shared.la
1928
1929 test_bus_policy_SOURCES = \
1930         src/bus-proxyd/test-bus-policy.c \
1931         src/bus-proxyd/bus-policy.c \
1932         src/bus-proxyd/bus-policy.h
1933
1934 test_bus_policy_LDADD = \
1935         libsystemd-internal.la \
1936         libsystemd-shared.la
1937
1938 # ------------------------------------------------------------------------------
1939 ## .PHONY so it always rebuilds it
1940 .PHONY: coverage lcov-run lcov-report coverage-sync
1941
1942 # run lcov from scratch, always
1943 coverage: all
1944         $(MAKE) lcov-run
1945         $(MAKE) lcov-report
1946
1947 coverage_dir = coverage
1948 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
1949
1950 if ENABLE_COVERAGE
1951 # reset run coverage tests
1952 lcov-run:
1953         @rm -rf $(coverage_dir)
1954         lcov $(coverage_opts) --zerocounters
1955         -$(MAKE) check
1956
1957 # generate report based on current coverage data
1958 lcov-report:
1959         $(MKDIR_P) $(coverage_dir)
1960         lcov $(coverage_opts) --compat-libtool --capture --no-external \
1961                 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
1962         lcov --remove $(coverage_dir)/.lcov.info --output-file $(coverage_dir)/.lcov-clean.info 'test-*'
1963         genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov-clean.info
1964         @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
1965
1966 # lcov doesn't work properly with vpath builds, make sure that bad
1967 # output is not uploaded by mistake.
1968 coverage-sync: coverage
1969         test "$(builddir)" = "$(srcdir)"
1970         rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
1971
1972 else
1973 lcov-run lcov-report:
1974         echo "Need to reconfigure with --enable-coverage"
1975 endif
1976
1977 # ------------------------------------------------------------------------------
1978 systemd_analyze_SOURCES = \
1979         src/analyze/analyze.c \
1980         src/analyze/analyze-verify.c \
1981         src/analyze/analyze-verify.h
1982
1983 systemd_verify_CFLAGS = \
1984         $(AM_CFLAGS) \
1985         $(SECCOMP_CFLAGS)
1986
1987 systemd_analyze_LDADD = \
1988         libsystemd-core.la \
1989         libsystemd-internal.la \
1990         libsystemd-shared.la \
1991         $(RT_LIBS)
1992
1993 # ------------------------------------------------------------------------------
1994 systemd_initctl_SOURCES = \
1995         src/initctl/initctl.c
1996
1997 systemd_initctl_LDADD = \
1998         libsystemd-internal.la \
1999         libsystemd-shared.la
2000
2001 # ------------------------------------------------------------------------------
2002 systemd_update_utmp_SOURCES = \
2003         src/update-utmp/update-utmp.c
2004
2005 systemd_update_utmp_CFLAGS = \
2006         $(AM_CFLAGS) \
2007         $(AUDIT_CFLAGS)
2008
2009 systemd_update_utmp_LDADD = \
2010         libsystemd-internal.la \
2011         libsystemd-shared.la \
2012         $(AUDIT_LIBS)
2013
2014 # ------------------------------------------------------------------------------
2015 systemd_update_done_SOURCES = \
2016         src/update-done/update-done.c
2017
2018 systemd_update_done_LDADD = \
2019         libsystemd-internal.la \
2020         libsystemd-label.la \
2021         libsystemd-shared.la
2022
2023 # ------------------------------------------------------------------------------
2024 systemd_shutdownd_SOURCES = \
2025         src/shutdownd/shutdownd.c
2026
2027 systemd_shutdownd_LDADD = \
2028         libsystemd-label.la \
2029         libsystemd-internal.la \
2030         libsystemd-shared.la
2031
2032 dist_doc_DATA += \
2033         src/systemd/sd-shutdown.h
2034
2035 # ------------------------------------------------------------------------------
2036 systemd_shutdown_SOURCES = \
2037         src/core/umount.c \
2038         src/core/umount.h \
2039         src/core/shutdown.c \
2040         src/core/mount-setup.c \
2041         src/core/mount-setup.h \
2042         src/core/killall.h \
2043         src/core/killall.c
2044
2045 systemd_shutdown_LDADD = \
2046         libsystemd-label.la \
2047         libudev-internal.la \
2048         libsystemd-shared.la
2049
2050 # ------------------------------------------------------------------------------
2051 if HAVE_KMOD
2052 systemd_modules_load_SOURCES = \
2053         src/modules-load/modules-load.c
2054
2055 systemd_modules_load_CFLAGS = \
2056         $(AM_CFLAGS) \
2057         $(KMOD_CFLAGS)
2058
2059 systemd_modules_load_LDADD = \
2060         libsystemd-shared.la \
2061         $(KMOD_LIBS)
2062
2063 rootlibexec_PROGRAMS += \
2064         systemd-modules-load
2065
2066 nodist_systemunit_DATA += \
2067         units/systemd-modules-load.service
2068
2069 SYSINIT_TARGET_WANTS += \
2070         systemd-modules-load.service
2071
2072 if ENABLE_TMPFILES
2073 nodist_systemunit_DATA += \
2074         units/kmod-static-nodes.service
2075
2076 SYSINIT_TARGET_WANTS += \
2077         kmod-static-nodes.service
2078 endif
2079 endif
2080
2081 EXTRA_DIST += \
2082         units/systemd-modules-load.service.in \
2083         units/kmod-static-nodes.service.in
2084
2085 # ------------------------------------------------------------------------------
2086 if ENABLE_TMPFILES
2087 systemd_tmpfiles_SOURCES = \
2088         src/tmpfiles/tmpfiles.c
2089
2090 systemd_tmpfiles_LDADD = \
2091         libsystemd-units.la \
2092         libsystemd-label.la \
2093         libsystemd-internal.la \
2094         libsystemd-shared.la
2095
2096 rootbin_PROGRAMS += \
2097         systemd-tmpfiles
2098
2099 dist_systemunit_DATA += \
2100         units/systemd-tmpfiles-clean.timer
2101
2102 nodist_systemunit_DATA += \
2103         units/systemd-tmpfiles-setup-dev.service \
2104         units/systemd-tmpfiles-setup.service \
2105         units/systemd-tmpfiles-clean.service
2106
2107 nodist_tmpfiles_DATA = \
2108         tmpfiles.d/etc.conf
2109
2110 dist_tmpfiles_DATA = \
2111         tmpfiles.d/systemd.conf \
2112         tmpfiles.d/systemd-nologin.conf \
2113         tmpfiles.d/tmp.conf \
2114         tmpfiles.d/x11.conf \
2115         tmpfiles.d/var.conf
2116
2117 if HAVE_SYSV_COMPAT
2118 dist_tmpfiles_DATA += \
2119         tmpfiles.d/legacy.conf
2120 endif
2121
2122 SYSINIT_TARGET_WANTS += \
2123         systemd-tmpfiles-setup-dev.service \
2124         systemd-tmpfiles-setup.service
2125
2126 dist_zshcompletion_DATA += \
2127         shell-completion/zsh/_systemd-tmpfiles
2128
2129 TIMERS_TARGET_WANTS += \
2130         systemd-tmpfiles-clean.timer
2131
2132 INSTALL_DIRS += \
2133         $(tmpfilesdir) \
2134         $(sysconfdir)/tmpfiles.d
2135 endif
2136
2137 EXTRA_DIST += \
2138         tmpfiles.d/etc.conf.m4 \
2139         units/systemd-tmpfiles-setup-dev.service.in \
2140         units/systemd-tmpfiles-setup.service.in \
2141         units/systemd-tmpfiles-clean.service.in
2142
2143 CLEANFILES += \
2144         tmpfiles.d/etc.conf
2145
2146 # ------------------------------------------------------------------------------
2147 if ENABLE_SYSUSERS
2148 systemd_sysusers_SOURCES = \
2149         src/sysusers/sysusers.c
2150
2151 systemd_sysusers_LDADD = \
2152         libsystemd-units.la \
2153         libsystemd-label.la \
2154         libsystemd-internal.la \
2155         libsystemd-shared.la
2156
2157 rootbin_PROGRAMS += \
2158         systemd-sysusers
2159
2160 nodist_systemunit_DATA += \
2161         units/systemd-sysusers.service
2162
2163 SYSINIT_TARGET_WANTS += \
2164         systemd-sysusers.service
2165
2166 dist_sysusers_DATA = \
2167         sysusers.d/systemd.conf
2168
2169 nodist_sysusers_DATA = \
2170         sysusers.d/basic.conf
2171
2172 EXTRA_DIST += \
2173         units/systemd-sysusers.service.in \
2174         sysusers.d/basic.conf.in
2175
2176 CLEANFILES += \
2177         sysusers.d/basic.conf
2178
2179 INSTALL_DIRS += \
2180         $(sysusersdir)
2181 endif
2182
2183 # ------------------------------------------------------------------------------
2184 dist_factory_etc_DATA = \
2185         factory/etc/nsswitch.conf
2186
2187 if HAVE_PAM
2188 dist_factory_pam_DATA = \
2189         factory/etc/pam.d/system-auth \
2190         factory/etc/pam.d/other
2191 endif
2192
2193 # ------------------------------------------------------------------------------
2194 if ENABLE_FIRSTBOOT
2195 systemd_firstboot_SOURCES = \
2196         src/firstboot/firstboot.c
2197
2198 systemd_firstboot_LDADD = \
2199         libsystemd-units.la \
2200         libsystemd-label.la \
2201         libsystemd-internal.la \
2202         libsystemd-shared.la \
2203         -lcrypt
2204
2205 rootbin_PROGRAMS += \
2206         systemd-firstboot
2207
2208 nodist_systemunit_DATA += \
2209         units/systemd-firstboot.service
2210
2211 EXTRA_DIST += \
2212         units/systemd-firstboot.service.in
2213
2214 SYSINIT_TARGET_WANTS += \
2215         systemd-firstboot.service
2216 endif
2217
2218 # ------------------------------------------------------------------------------
2219 systemd_machine_id_setup_SOURCES = \
2220         src/machine-id-setup/machine-id-setup-main.c \
2221         src/core/machine-id-setup.c \
2222         src/core/machine-id-setup.h
2223
2224 systemd_machine_id_setup_LDADD = \
2225         libsystemd-label.la \
2226         libsystemd-internal.la \
2227         libsystemd-shared.la
2228
2229 # ------------------------------------------------------------------------------
2230 systemd_sysctl_SOURCES = \
2231         src/sysctl/sysctl.c
2232
2233 systemd_sysctl_LDADD = \
2234         libsystemd-shared.la
2235
2236 # ------------------------------------------------------------------------------
2237 systemd_sleep_SOURCES = \
2238         src/sleep/sleep.c
2239
2240 systemd_sleep_LDADD = \
2241         libsystemd-shared.la
2242
2243 # ------------------------------------------------------------------------------
2244 systemd_fsck_SOURCES = \
2245         src/fsck/fsck.c
2246
2247 systemd_fsck_LDADD = \
2248         libsystemd-internal.la \
2249         libudev-internal.la \
2250         libsystemd-shared.la
2251
2252 # ------------------------------------------------------------------------------
2253 systemd_machine_id_commit_SOURCES = \
2254         src/machine-id-commit/machine-id-commit.c \
2255         src/core/machine-id-setup.c \
2256         src/core/machine-id-setup.h
2257
2258 systemd_machine_id_commit_LDADD = \
2259         libsystemd-label.la \
2260         libsystemd-internal.la \
2261         libsystemd-shared.la
2262
2263 SYSINIT_TARGET_WANTS += \
2264         systemd-machine-id-commit.service
2265
2266 # ------------------------------------------------------------------------------
2267 systemd_ac_power_SOURCES = \
2268         src/ac-power/ac-power.c
2269
2270 systemd_ac_power_LDADD = \
2271         libudev-internal.la \
2272         libsystemd-shared.la
2273
2274 # ------------------------------------------------------------------------------
2275 systemd_detect_virt_SOURCES = \
2276         src/detect-virt/detect-virt.c
2277
2278 systemd_detect_virt_LDADD = \
2279         libsystemd-shared.la
2280
2281 INSTALL_EXEC_HOOKS += \
2282         systemd-detect-virt-install-hook
2283
2284 # ------------------------------------------------------------------------------
2285 systemd_delta_SOURCES = \
2286         src/delta/delta.c
2287
2288 systemd_delta_LDADD = \
2289         libsystemd-shared.la
2290
2291 # ------------------------------------------------------------------------------
2292 systemd_getty_generator_SOURCES = \
2293         src/getty-generator/getty-generator.c
2294
2295 systemd_getty_generator_LDADD = \
2296         libsystemd-label.la \
2297         libsystemd-shared.la
2298
2299 # ------------------------------------------------------------------------------
2300 systemd_debug_generator_SOURCES = \
2301         src/debug-generator/debug-generator.c
2302
2303 systemd_debug_generator_LDADD = \
2304         libsystemd-label.la \
2305         libsystemd-shared.la
2306
2307 # ------------------------------------------------------------------------------
2308 systemd_fstab_generator_SOURCES = \
2309         src/fstab-generator/fstab-generator.c \
2310         src/core/mount-setup.c
2311
2312 systemd_fstab_generator_LDADD = \
2313         libsystemd-label.la \
2314         libsystemd-shared.la
2315
2316 # ------------------------------------------------------------------------------
2317 systemd_system_update_generator_SOURCES = \
2318         src/system-update-generator/system-update-generator.c
2319
2320 systemd_system_update_generator_LDADD = \
2321         libsystemd-label.la \
2322         libsystemd-shared.la
2323
2324 # ------------------------------------------------------------------------------
2325 if ENABLE_HIBERNATE
2326 systemgenerator_PROGRAMS += \
2327         systemd-hibernate-resume-generator
2328
2329 rootlibexec_PROGRAMS += \
2330         systemd-hibernate-resume
2331
2332 systemd_hibernate_resume_SOURCES = \
2333         src/hibernate-resume/hibernate-resume.c
2334
2335 systemd_hibernate_resume_LDADD = \
2336         libsystemd-internal.la \
2337         libsystemd-shared.la
2338
2339 systemd_hibernate_resume_generator_SOURCES = \
2340         src/hibernate-resume/hibernate-resume-generator.c
2341
2342 systemd_hibernate_resume_generator_LDADD = \
2343         libsystemd-label.la \
2344         libsystemd-shared.la
2345
2346 EXTRA_DIST += \
2347         units/systemd-hibernate.service.in \
2348         units/systemd-hibernate-resume@.service.in \
2349         units/systemd-hybrid-sleep.service.in
2350
2351 dist_systemunit_DATA += \
2352         units/hibernate.target \
2353         units/hybrid-sleep.target
2354
2355 nodist_systemunit_DATA += \
2356         units/systemd-hibernate.service \
2357         units/systemd-hibernate-resume@.service \
2358         units/systemd-hybrid-sleep.service
2359 endif
2360
2361 # ------------------------------------------------------------------------------
2362 if ENABLE_EFI
2363 systemgenerator_PROGRAMS +=  \
2364         systemd-efi-boot-generator
2365
2366 systemd_efi_boot_generator_SOURCES = \
2367         src/efi-boot-generator/efi-boot-generator.c
2368
2369 systemd_efi_boot_generator_LDADD = \
2370         libsystemd-label.la \
2371         libsystemd-shared.la
2372
2373 # ------------------------------------------------------------------------------
2374 bootctl_SOURCES = \
2375         src/boot/boot.h \
2376         src/boot/boot-loader.h \
2377         src/boot/bootctl.c \
2378         src/boot/boot-loader.c \
2379         src/boot/boot-efi.c
2380
2381 bootctl_LDADD = \
2382         libsystemd-shared.la \
2383         libsystemd-internal.la
2384
2385 bin_PROGRAMS += \
2386         bootctl
2387
2388 dist_bashcompletion_DATA += \
2389         shell-completion/bash/bootctl
2390
2391 dist_zshcompletion_DATA += \
2392         shell-completion/zsh/_bootctl
2393
2394 endif
2395
2396 # ------------------------------------------------------------------------------
2397 if HAVE_BLKID
2398 systemgenerator_PROGRAMS +=  \
2399         systemd-gpt-auto-generator
2400
2401 systemd_gpt_auto_generator_SOURCES = \
2402         src/gpt-auto-generator/gpt-auto-generator.c \
2403         src/shared/blkid-util.h
2404
2405 systemd_gpt_auto_generator_LDADD = \
2406         libsystemd-label.la \
2407         libsystemd-internal.la \
2408         libudev-internal.la \
2409         libsystemd-shared.la \
2410         $(BLKID_LIBS)
2411
2412 systemd_gpt_auto_generator_CFLAGS = \
2413         $(AM_CFLAGS) \
2414         $(BLKID_CFLAGS)
2415 endif
2416
2417 # ------------------------------------------------------------------------------
2418 if ENABLE_KDBUS
2419 systemgenerator_PROGRAMS +=  \
2420         systemd-dbus1-generator
2421
2422 systemd_dbus1_generator_SOURCES = \
2423         src/dbus1-generator/dbus1-generator.c
2424
2425 systemd_dbus1_generator_LDADD = \
2426         libsystemd-label.la \
2427         libsystemd-internal.la \
2428         libsystemd-shared.la
2429
2430 dbus1-generator-install-hook:
2431         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
2432         $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2433         $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2434
2435 dbus1-generator-uninstall-hook:
2436         rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2437
2438 INSTALL_EXEC_HOOKS += dbus1-generator-install-hook
2439 UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook
2440 endif
2441
2442 # ------------------------------------------------------------------------------
2443 systemd_sysv_generator_SOURCES = \
2444         src/sysv-generator/sysv-generator.c
2445
2446 systemd_sysv_generator_LDADD = \
2447         libsystemd-core.la \
2448         libsystemd-label.la \
2449         libsystemd-shared.la
2450
2451 # ------------------------------------------------------------------------------
2452 systemd_rc_local_generator_SOURCES = \
2453         src/rc-local-generator/rc-local-generator.c
2454
2455 systemd_rc_local_generator_LDADD = \
2456         libsystemd-label.la \
2457         libsystemd-shared.la
2458
2459 # ------------------------------------------------------------------------------
2460 systemd_remount_fs_SOURCES = \
2461         src/remount-fs/remount-fs.c \
2462         src/core/mount-setup.c \
2463         src/core/mount-setup.h
2464
2465 systemd_remount_fs_LDADD = \
2466         libsystemd-label.la \
2467         libsystemd-shared.la
2468
2469 # ------------------------------------------------------------------------------
2470 systemd_cgroups_agent_SOURCES = \
2471         src/cgroups-agent/cgroups-agent.c
2472
2473 systemd_cgroups_agent_LDADD = \
2474         libsystemd-internal.la \
2475         libsystemd-shared.la
2476
2477 # ------------------------------------------------------------------------------
2478 systemd_escape_SOURCES = \
2479         src/escape/escape.c
2480
2481 systemd_escape_LDADD = \
2482         libsystemd-shared.la
2483
2484 # -----------------------------------------------------------------------------
2485 systemctl_SOURCES = \
2486         src/systemctl/systemctl.c
2487
2488 systemctl_LDADD = \
2489         libsystemd-units.la \
2490         libsystemd-label.la \
2491         libsystemd-internal.la \
2492         libsystemd-logs.la \
2493         libsystemd-journal-internal.la \
2494         libsystemd-shared.la
2495
2496 # ------------------------------------------------------------------------------
2497 systemd_notify_SOURCES = \
2498         src/notify/notify.c
2499
2500 systemd_notify_LDADD = \
2501         libsystemd-internal.la \
2502         libsystemd-shared.la
2503
2504 # ------------------------------------------------------------------------------
2505 systemd_path_SOURCES = \
2506         src/path/path.c
2507
2508 systemd_path_LDADD = \
2509         libsystemd-internal.la \
2510         libsystemd-shared.la
2511
2512 # ------------------------------------------------------------------------------
2513 systemd_ask_password_SOURCES = \
2514         src/ask-password/ask-password.c
2515
2516 systemd_ask_password_LDADD = \
2517         libsystemd-label.la \
2518         libsystemd-shared.la
2519
2520 # ------------------------------------------------------------------------------
2521 systemd_reply_password_SOURCES = \
2522         src/reply-password/reply-password.c
2523
2524 systemd_reply_password_LDADD = \
2525         libsystemd-shared.la
2526
2527 # ------------------------------------------------------------------------------
2528 systemd_cgls_SOURCES = \
2529         src/cgls/cgls.c
2530
2531 systemd_cgls_LDADD = \
2532         libsystemd-internal.la \
2533         libsystemd-shared.la
2534
2535 # ------------------------------------------------------------------------------
2536 systemd_cgtop_SOURCES = \
2537         src/cgtop/cgtop.c
2538
2539 systemd_cgtop_LDADD = \
2540         libsystemd-shared.la
2541
2542 # ------------------------------------------------------------------------------
2543 systemd_nspawn_SOURCES = \
2544         src/nspawn/nspawn.c \
2545         src/core/mount-setup.c \
2546         src/core/mount-setup.h \
2547         src/core/loopback-setup.c \
2548         src/core/loopback-setup.h
2549
2550 systemd_nspawn_CFLAGS = \
2551         $(AM_CFLAGS) \
2552         $(SECCOMP_CFLAGS) \
2553         $(BLKID_CFLAGS)
2554
2555 systemd_nspawn_LDADD = \
2556         libsystemd-label.la \
2557         libsystemd-internal.la \
2558         libudev-internal.la \
2559         libsystemd-shared.la \
2560         $(BLKID_LIBS)
2561
2562 if HAVE_SECCOMP
2563 systemd_nspawn_LDADD += \
2564         libsystemd-seccomp.la \
2565         $(SECCOMP_LIBS)
2566 endif
2567
2568 # ------------------------------------------------------------------------------
2569 systemd_run_SOURCES = \
2570         src/run/run.c
2571
2572 systemd_run_LDADD = \
2573         libsystemd-label.la \
2574         libsystemd-internal.la \
2575         libsystemd-shared.la
2576
2577 # ------------------------------------------------------------------------------
2578 systemd_bus_proxyd_SOURCES = \
2579         src/bus-proxyd/bus-proxyd.c \
2580         src/bus-proxyd/bus-policy.c \
2581         src/bus-proxyd/bus-policy.h
2582
2583 systemd_bus_proxyd_LDADD = \
2584         libsystemd-internal.la \
2585         libsystemd-shared.la
2586
2587 bus-proxyd-install-hook:
2588         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir)
2589         $(AM_V_RM)rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
2590         $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
2591
2592 bus-proxyd-uninstall-hook:
2593         rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
2594
2595 INSTALL_EXEC_HOOKS += bus-proxyd-install-hook
2596 UNINSTALL_EXEC_HOOKS += bus-proxyd-uninstall-hook
2597
2598 if ENABLE_KDBUS
2599 nodist_systemunit_DATA += \
2600         units/systemd-bus-proxyd@.service
2601
2602 dist_systemunit_DATA += \
2603         units/systemd-bus-proxyd.socket
2604
2605 nodist_userunit_DATA += \
2606         units/user/systemd-bus-proxyd@.service
2607
2608 dist_userunit_DATA += \
2609         units/user/systemd-bus-proxyd.socket
2610 endif
2611
2612 EXTRA_DIST += \
2613         units/systemd-bus-proxyd@.service.m4.in \
2614         units/user/systemd-bus-proxyd@.service.in
2615
2616 CLEANFILES += \
2617         units/systemd-bus-proxyd@.service.m4
2618
2619 if HAVE_SMACK
2620 bus-proxyd-set-cap-hook:
2621         -$(SETCAP) cap_mac_admin+ei $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd
2622
2623 INSTALL_EXEC_HOOKS += bus-proxyd-set-cap-hook
2624 endif
2625
2626 # ------------------------------------------------------------------------------
2627 systemd_tty_ask_password_agent_SOURCES = \
2628         src/tty-ask-password-agent/tty-ask-password-agent.c
2629
2630 systemd_tty_ask_password_agent_LDADD = \
2631         libsystemd-label.la \
2632         libsystemd-shared.la
2633
2634 # ------------------------------------------------------------------------------
2635 libsystemd_internal_la_SOURCES = \
2636         src/systemd/sd-bus.h \
2637         src/systemd/sd-bus-protocol.h \
2638         src/systemd/sd-bus-vtable.h \
2639         src/systemd/sd-utf8.h \
2640         src/systemd/sd-event.h \
2641         src/systemd/sd-rtnl.h \
2642         src/systemd/sd-resolve.h \
2643         src/systemd/sd-login.h \
2644         src/systemd/sd-id128.h \
2645         src/systemd/sd-daemon.h \
2646         src/systemd/sd-path.h \
2647         src/systemd/sd-network.h \
2648         src/systemd/sd-hwdb.h \
2649         src/libsystemd/sd-bus/sd-bus.c \
2650         src/libsystemd/sd-bus/bus-control.c \
2651         src/libsystemd/sd-bus/bus-control.h \
2652         src/libsystemd/sd-bus/bus-error.c \
2653         src/libsystemd/sd-bus/bus-error.h \
2654         src/libsystemd/sd-bus/bus-common-errors.h \
2655         src/libsystemd/sd-bus/bus-common-errors.c \
2656         src/libsystemd/sd-bus/bus-internal.c \
2657         src/libsystemd/sd-bus/bus-internal.h \
2658         src/libsystemd/sd-bus/bus-socket.c \
2659         src/libsystemd/sd-bus/bus-socket.h \
2660         src/libsystemd/sd-bus/bus-kernel.c \
2661         src/libsystemd/sd-bus/bus-kernel.h \
2662         src/libsystemd/sd-bus/bus-container.c \
2663         src/libsystemd/sd-bus/bus-container.h \
2664         src/libsystemd/sd-bus/bus-message.c \
2665         src/libsystemd/sd-bus/bus-message.h \
2666         src/libsystemd/sd-bus/bus-creds.c \
2667         src/libsystemd/sd-bus/bus-creds.h \
2668         src/libsystemd/sd-bus/bus-signature.c \
2669         src/libsystemd/sd-bus/bus-signature.h \
2670         src/libsystemd/sd-bus/bus-type.c \
2671         src/libsystemd/sd-bus/bus-type.h \
2672         src/libsystemd/sd-bus/bus-match.c \
2673         src/libsystemd/sd-bus/bus-match.h \
2674         src/libsystemd/sd-bus/bus-bloom.c \
2675         src/libsystemd/sd-bus/bus-bloom.h \
2676         src/libsystemd/sd-bus/bus-introspect.c \
2677         src/libsystemd/sd-bus/bus-introspect.h \
2678         src/libsystemd/sd-bus/bus-objects.c \
2679         src/libsystemd/sd-bus/bus-objects.h \
2680         src/libsystemd/sd-bus/bus-gvariant.c \
2681         src/libsystemd/sd-bus/bus-gvariant.h \
2682         src/libsystemd/sd-bus/bus-convenience.c \
2683         src/libsystemd/sd-bus/bus-track.c \
2684         src/libsystemd/sd-bus/bus-track.h \
2685         src/libsystemd/sd-bus/bus-util.c \
2686         src/libsystemd/sd-bus/bus-util.h \
2687         src/libsystemd/sd-bus/bus-slot.c \
2688         src/libsystemd/sd-bus/bus-slot.h \
2689         src/libsystemd/sd-bus/bus-protocol.h \
2690         src/libsystemd/sd-bus/kdbus.h \
2691         src/libsystemd/sd-utf8/sd-utf8.c \
2692         src/libsystemd/sd-event/sd-event.c \
2693         src/libsystemd/sd-event/event-util.h \
2694         src/libsystemd/sd-rtnl/sd-rtnl.c \
2695         src/libsystemd/sd-rtnl/rtnl-internal.h \
2696         src/libsystemd/sd-rtnl/rtnl-message.c \
2697         src/libsystemd/sd-rtnl/rtnl-types.h \
2698         src/libsystemd/sd-rtnl/rtnl-types.c \
2699         src/libsystemd/sd-rtnl/rtnl-util.h \
2700         src/libsystemd/sd-rtnl/rtnl-util.c \
2701         src/libsystemd/sd-rtnl/local-addresses.h \
2702         src/libsystemd/sd-rtnl/local-addresses.c \
2703         src/libsystemd/sd-id128/sd-id128.c \
2704         src/libsystemd/sd-daemon/sd-daemon.c \
2705         src/libsystemd/sd-login/sd-login.c \
2706         src/libsystemd/sd-path/sd-path.c \
2707         src/libsystemd/sd-network/sd-network.c \
2708         src/libsystemd/sd-network/network-util.h \
2709         src/libsystemd/sd-network/network-util.c \
2710         src/libsystemd/sd-hwdb/sd-hwdb.c \
2711         src/libsystemd/sd-hwdb/hwdb-util.h \
2712         src/libsystemd/sd-hwdb/hwdb-intenal.h
2713
2714 nodist_libsystemd_internal_la_SOURCES = \
2715         src/libsystemd/libsystemd.sym
2716
2717 libsystemd_internal_la_CFLAGS = \
2718         $(AM_CFLAGS) \
2719         -pthread
2720
2721 libsystemd_internal_la_LIBADD = \
2722         $(RT_LIBS)
2723
2724 libsystemd_resolve_la_SOURCES = \
2725         src/libsystemd/sd-resolve/sd-resolve.c \
2726         src/libsystemd/sd-resolve/resolve-util.h
2727
2728 libsystemd_resolve_la_CFLAGS = \
2729         $(AM_CFLAGS) \
2730         -pthread
2731
2732 libsystemd_resolve_la_LIBADD = \
2733         -lresolv
2734
2735 noinst_LTLIBRARIES += \
2736         libsystemd-internal.la \
2737         libsystemd-resolve.la
2738
2739 libsystemd_dump_la_SOURCES = \
2740         src/libsystemd/sd-bus/bus-dump.c \
2741         src/libsystemd/sd-bus/bus-dump.h
2742
2743 noinst_LTLIBRARIES += \
2744         libsystemd-dump.la
2745
2746 EXTRA_DIST += \
2747         src/libsystemd/libsystemd.sym.m4 \
2748         src/libsystemd/libsystemd.pc.in \
2749         src/libsystemd/sd-bus/DIFFERENCES \
2750         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
2751
2752 CLEANFILES += \
2753         src/libsystemd/libsystemd.sym
2754
2755 BUILT_SOURCES += \
2756         src/libsystemd/libsystemd.sym
2757
2758 libsystemd_la_SOURCES = \
2759         $(libsystemd_internal_la_SOURCES) \
2760         $(libsystemd_resolve_la_SOURCES) \
2761         $(libsystemd_journal_internal_la_SOURCES)
2762
2763 nodist_libsystemd_la_SOURCES = \
2764         $(nodist_libsystemd_internal_la_SOURCES)
2765
2766 libsystemd_la_CFLAGS = \
2767         $(libsystemd_internal_la_CFLAGS) \
2768         $(libsystemd_resolve_la_CFLAGS) \
2769         $(libsystemd_journal_internal_la_CFLAGS)
2770
2771 libsystemd_la_LDFLAGS = \
2772         $(AM_LDFLAGS) \
2773         -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
2774         -Wl,--version-script=$(top_builddir)/src/libsystemd/libsystemd.sym
2775
2776 libsystemd_la_LIBADD = \
2777         libsystemd-shared.la \
2778         $(libsystemd_internal_la_LIBADD) \
2779         $(libsystemd_journal_internal_la_LIBADD) \
2780         $(libsystemd_resolve_la_LIBADD)
2781
2782 libsystemd-install-hook:
2783         libname=libsystemd.so && $(move-to-rootlibdir)
2784
2785 libsystemd-uninstall-hook:
2786         rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
2787
2788 INSTALL_EXEC_HOOKS += libsystemd-install-hook
2789 UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
2790
2791 pkgconfiglib_DATA += \
2792         src/libsystemd/libsystemd.pc
2793
2794 pkginclude_HEADERS += \
2795         src/systemd/sd-login.h \
2796         src/systemd/sd-id128.h \
2797         src/systemd/sd-daemon.h
2798
2799 if ENABLE_KDBUS
2800 pkginclude_HEADERS += \
2801         src/systemd/sd-bus.h \
2802         src/systemd/sd-bus-protocol.h \
2803         src/systemd/sd-bus-vtable.h \
2804         src/systemd/sd-utf8.h \
2805         src/systemd/sd-event.h \
2806         src/systemd/sd-rtnl.h \
2807         src/systemd/sd-resolve.h \
2808         src/systemd/sd-path.h
2809 endif
2810
2811 lib_LTLIBRARIES += \
2812         libsystemd.la
2813
2814 tests += \
2815         test-bus-marshal \
2816         test-bus-signature \
2817         test-bus-chat \
2818         test-bus-cleanup \
2819         test-bus-server \
2820         test-bus-match \
2821         test-bus-kernel \
2822         test-bus-kernel-bloom \
2823         test-bus-kernel-benchmark \
2824         test-bus-zero-copy \
2825         test-bus-introspect \
2826         test-bus-objects \
2827         test-bus-error \
2828         test-bus-creds \
2829         test-bus-gvariant \
2830         test-event \
2831         test-rtnl \
2832         test-local-addresses \
2833         test-resolve
2834
2835 bin_PROGRAMS += \
2836         busctl
2837
2838 test_bus_marshal_SOURCES = \
2839         src/libsystemd/sd-bus/test-bus-marshal.c
2840
2841 test_bus_marshal_LDADD = \
2842         libsystemd-dump.la \
2843         libsystemd-internal.la \
2844         libsystemd-shared.la \
2845         $(GLIB_LIBS) \
2846         $(DBUS_LIBS)
2847
2848 test_bus_marshal_CFLAGS = \
2849         $(AM_CFLAGS) \
2850         $(GLIB_CFLAGS) \
2851         $(DBUS_CFLAGS)
2852
2853 test_bus_signature_SOURCES = \
2854         src/libsystemd/sd-bus/test-bus-signature.c
2855
2856 test_bus_signature_LDADD = \
2857         libsystemd-internal.la \
2858         libsystemd-shared.la
2859
2860 test_bus_chat_SOURCES = \
2861         src/libsystemd/sd-bus/test-bus-chat.c
2862
2863 test_bus_chat_CFLAGS = \
2864         $(AM_CFLAGS) \
2865         -pthread
2866
2867 test_bus_chat_LDADD = \
2868         libsystemd-internal.la \
2869         libsystemd-shared.la
2870
2871 test_bus_cleanup_SOURCES = \
2872         src/libsystemd/sd-bus/test-bus-cleanup.c
2873
2874 test_bus_cleanup_CFLAGS = \
2875         $(AM_CFLAGS) \
2876         $(SECCOMP_CFLAGS)
2877
2878 test_bus_cleanup_LDADD = \
2879         libsystemd-internal.la \
2880         libsystemd-shared.la
2881
2882 test_bus_server_SOURCES = \
2883         src/libsystemd/sd-bus/test-bus-server.c
2884
2885 test_bus_server_CFLAGS = \
2886         $(AM_CFLAGS) \
2887         -pthread
2888
2889 test_bus_server_LDADD = \
2890         libsystemd-internal.la \
2891         libsystemd-shared.la
2892
2893 test_bus_objects_SOURCES = \
2894         src/libsystemd/sd-bus/test-bus-objects.c
2895
2896 test_bus_objects_CFLAGS = \
2897         $(AM_CFLAGS) \
2898         -pthread
2899
2900 test_bus_objects_LDADD = \
2901         libsystemd-dump.la \
2902         libsystemd-internal.la \
2903         libsystemd-shared.la
2904
2905 test_bus_error_SOURCES = \
2906         src/libsystemd/sd-bus/test-bus-error.c
2907
2908 test_bus_error_LDADD = \
2909         libsystemd-internal.la \
2910         libsystemd-shared.la
2911
2912 test_bus_gvariant_SOURCES = \
2913         src/libsystemd/sd-bus/test-bus-gvariant.c
2914
2915 test_bus_gvariant_LDADD = \
2916         libsystemd-dump.la \
2917         libsystemd-internal.la \
2918         libsystemd-shared.la \
2919         $(GLIB_LIBS)
2920
2921 test_bus_gvariant_CFLAGS = \
2922         $(AM_CFLAGS) \
2923         $(GLIB_CFLAGS)
2924
2925 test_bus_creds_SOURCES = \
2926         src/libsystemd/sd-bus/test-bus-creds.c
2927
2928 test_bus_creds_LDADD = \
2929         libsystemd-dump.la \
2930         libsystemd-internal.la \
2931         libsystemd-shared.la
2932
2933 test_bus_match_SOURCES = \
2934         src/libsystemd/sd-bus/test-bus-match.c
2935
2936 test_bus_match_LDADD = \
2937         libsystemd-internal.la \
2938         libsystemd-shared.la
2939
2940 test_bus_kernel_SOURCES = \
2941         src/libsystemd/sd-bus/test-bus-kernel.c
2942
2943 test_bus_kernel_LDADD = \
2944         libsystemd-dump.la \
2945         libsystemd-internal.la \
2946         libsystemd-shared.la
2947
2948 test_bus_kernel_bloom_SOURCES = \
2949         src/libsystemd/sd-bus/test-bus-kernel-bloom.c
2950
2951 test_bus_kernel_bloom_LDADD = \
2952         libsystemd-internal.la \
2953         libsystemd-shared.la
2954
2955 test_bus_kernel_benchmark_SOURCES = \
2956         src/libsystemd/sd-bus/test-bus-kernel-benchmark.c
2957
2958 test_bus_kernel_benchmark_LDADD = \
2959         libsystemd-internal.la \
2960         libsystemd-shared.la
2961
2962 test_bus_zero_copy_SOURCES = \
2963         src/libsystemd/sd-bus/test-bus-zero-copy.c
2964
2965 test_bus_zero_copy_LDADD = \
2966         libsystemd-dump.la \
2967         libsystemd-internal.la \
2968         libsystemd-shared.la
2969
2970 test_bus_introspect_SOURCES = \
2971         src/libsystemd/sd-bus/test-bus-introspect.c
2972
2973 test_bus_introspect_LDADD = \
2974         libsystemd-internal.la \
2975         libsystemd-shared.la
2976
2977 test_event_SOURCES = \
2978         src/libsystemd/sd-event/test-event.c
2979
2980 test_event_LDADD = \
2981         libsystemd-internal.la \
2982         libsystemd-shared.la
2983
2984 test_rtnl_SOURCES = \
2985         src/libsystemd/sd-rtnl/test-rtnl.c
2986
2987 test_rtnl_LDADD = \
2988         libsystemd-internal.la \
2989         libsystemd-shared.la
2990
2991 test_local_addresses_SOURCES = \
2992         src/libsystemd/sd-rtnl/test-local-addresses.c
2993
2994 test_local_addresses_LDADD = \
2995         libsystemd-internal.la \
2996         libsystemd-shared.la
2997
2998 test_resolve_SOURCES = \
2999         src/libsystemd/sd-resolve/test-resolve.c
3000
3001 test_resolve_LDADD = \
3002         libsystemd-resolve.la \
3003         libsystemd-internal.la \
3004         libsystemd-shared.la
3005
3006 test_resolve_CFLAGS = \
3007         $(AM_CFLAGS) \
3008         -pthread
3009
3010 busctl_SOURCES = \
3011         src/libsystemd/sd-bus/busctl.c \
3012         src/libsystemd/sd-bus/busctl-introspect.c \
3013         src/libsystemd/sd-bus/busctl-introspect.h
3014
3015 busctl_LDADD = \
3016         libsystemd-dump.la \
3017         libsystemd-internal.la \
3018         libsystemd-shared.la
3019
3020 # ------------------------------------------------------------------------------
3021 noinst_LTLIBRARIES += \
3022         libsystemd-network.la
3023
3024 libsystemd_network_la_CFLAGS = \
3025         $(AM_CFLAGS) \
3026         $(KMOD_CFLAGS)
3027
3028 libsystemd_network_la_SOURCES = \
3029         src/systemd/sd-dhcp-client.h \
3030         src/systemd/sd-dhcp-server.h \
3031         src/systemd/sd-dhcp-lease.h \
3032         src/systemd/sd-ipv4ll.h \
3033         src/systemd/sd-icmp6-nd.h \
3034         src/systemd/sd-dhcp6-client.h \
3035         src/systemd/sd-dhcp6-lease.h \
3036         src/systemd/sd-pppoe.h \
3037         src/libsystemd-network/sd-dhcp-client.c \
3038         src/libsystemd-network/sd-dhcp-server.c \
3039         src/libsystemd-network/dhcp-network.c \
3040         src/libsystemd-network/dhcp-option.c \
3041         src/libsystemd-network/dhcp-packet.c \
3042         src/libsystemd-network/dhcp-internal.h \
3043         src/libsystemd-network/dhcp-server-internal.h \
3044         src/libsystemd-network/dhcp-protocol.h \
3045         src/libsystemd-network/dhcp-lease-internal.h \
3046         src/libsystemd-network/sd-dhcp-lease.c \
3047         src/libsystemd-network/sd-ipv4ll.c \
3048         src/libsystemd-network/ipv4ll-network.c \
3049         src/libsystemd-network/ipv4ll-packet.c \
3050         src/libsystemd-network/ipv4ll-internal.h \
3051         src/libsystemd-network/sd-pppoe.c \
3052         src/libsystemd-network/network-internal.c \
3053         src/libsystemd-network/network-internal.h \
3054         src/libsystemd-network/sd-icmp6-nd.c \
3055         src/libsystemd-network/sd-dhcp6-client.c \
3056         src/libsystemd-network/dhcp6-internal.h \
3057         src/libsystemd-network/dhcp6-protocol.h \
3058         src/libsystemd-network/dhcp6-network.c \
3059         src/libsystemd-network/dhcp6-option.c \
3060         src/libsystemd-network/dhcp6-lease-internal.h \
3061         src/libsystemd-network/sd-dhcp6-lease.c
3062
3063 libsystemd_network_la_LIBADD = \
3064         libudev-internal.la \
3065         libsystemd-label.la \
3066         libsystemd-internal.la \
3067         libsystemd-shared.la \
3068         $(KMOD_LIBS)
3069
3070 test_dhcp_option_SOURCES = \
3071         src/libsystemd-network/dhcp-protocol.h \
3072         src/libsystemd-network/dhcp-internal.h \
3073         src/libsystemd-network/test-dhcp-option.c
3074
3075 test_dhcp_option_LDADD = \
3076         libsystemd-network.la \
3077         libsystemd-internal.la \
3078         libsystemd-shared.la
3079
3080 test_dhcp_client_SOURCES = \
3081         src/systemd/sd-dhcp-client.h \
3082         src/libsystemd-network/dhcp-protocol.h \
3083         src/libsystemd-network/dhcp-internal.h \
3084         src/libsystemd-network/test-dhcp-client.c
3085
3086 test_dhcp_client_LDADD = \
3087         libsystemd-network.la \
3088         libsystemd-label.la \
3089         libsystemd-internal.la \
3090         libsystemd-shared.la
3091
3092 test_dhcp_server_SOURCES = \
3093         src/libsystemd-network/test-dhcp-server.c
3094
3095 test_dhcp_server_LDADD = \
3096         libsystemd-network.la \
3097         libsystemd-internal.la \
3098         libsystemd-shared.la
3099
3100 test_ipv4ll_SOURCES = \
3101         src/systemd/sd-ipv4ll.h \
3102         src/libsystemd-network/ipv4ll-internal.h \
3103         src/libsystemd-network/test-ipv4ll.c
3104
3105 test_ipv4ll_LDADD = \
3106         libsystemd-network.la \
3107         libsystemd-label.la \
3108         libsystemd-internal.la \
3109         libsystemd-shared.la
3110
3111 test_pppoe_SOURCES = \
3112         src/systemd/sd-pppoe.h \
3113         src/libsystemd-network/test-pppoe.c
3114
3115 test_pppoe_LDADD = \
3116         libsystemd-network.la \
3117         libsystemd-shared.la
3118
3119 test_icmp6_rs_SOURCES = \
3120         src/systemd/sd-dhcp6-client.h \
3121         src/systemd/sd-icmp6-nd.h \
3122         src/libsystemd-network/dhcp6-internal.h \
3123         src/libsystemd-network/test-icmp6-rs.c
3124
3125 test_icmp6_rs_LDADD = \
3126         libsystemd-network.la \
3127         libsystemd-internal.la \
3128         libsystemd-shared.la
3129
3130 test_dhcp6_client_SOURCES = \
3131         src/systemd/sd-dhcp6-client.h \
3132         src/libsystemd-network/dhcp6-internal.h \
3133         src/libsystemd-network/test-dhcp6-client.c
3134
3135 test_dhcp6_client_LDADD = \
3136         libsystemd-network.la \
3137         libsystemd-internal.la \
3138         libsystemd-shared.la
3139
3140 tests += \
3141         test-dhcp-option \
3142         test-dhcp-client \
3143         test-dhcp-server \
3144         test-ipv4ll \
3145         test-icmp6-rs \
3146         test-dhcp6-client
3147
3148 manual_tests += \
3149         test-pppoe
3150
3151 # ------------------------------------------------------------------------------
3152 if ENABLE_TERMINAL
3153 noinst_LTLIBRARIES += \
3154         libsystemd-terminal.la
3155
3156 rootlibexec_PROGRAMS += \
3157         systemd-consoled
3158
3159 noinst_PROGRAMS += \
3160         systemd-evcat \
3161         systemd-modeset \
3162         systemd-subterm
3163
3164 dist_pkgdata_DATA += \
3165         src/libsystemd-terminal/unifont-glyph-array.bin
3166
3167 nodist_userunit_DATA += \
3168         units/user/systemd-consoled.service
3169
3170 USER_DEFAULT_TARGET_WANTS += \
3171         systemd-consoled.service
3172
3173 EXTRA_DIST += \
3174         units/user/systemd-consoled.service.in
3175
3176 tests += \
3177         test-term-page \
3178         test-term-parser \
3179         test-unifont
3180 endif
3181
3182 libsystemd_terminal_la_CFLAGS = \
3183         $(AM_CFLAGS) \
3184         $(TERMINAL_CFLAGS)
3185
3186 libsystemd_terminal_la_SOURCES = \
3187         src/libsystemd-terminal/grdev.h \
3188         src/libsystemd-terminal/grdev-internal.h \
3189         src/libsystemd-terminal/grdev.c \
3190         src/libsystemd-terminal/grdev-drm.c \
3191         src/libsystemd-terminal/idev.h \
3192         src/libsystemd-terminal/idev-internal.h \
3193         src/libsystemd-terminal/idev.c \
3194         src/libsystemd-terminal/idev-evdev.c \
3195         src/libsystemd-terminal/idev-keyboard.c \
3196         src/libsystemd-terminal/sysview.h \
3197         src/libsystemd-terminal/sysview-internal.h \
3198         src/libsystemd-terminal/sysview.c \
3199         src/libsystemd-terminal/term.h \
3200         src/libsystemd-terminal/term-internal.h \
3201         src/libsystemd-terminal/term-charset.c \
3202         src/libsystemd-terminal/term-page.c \
3203         src/libsystemd-terminal/term-parser.c \
3204         src/libsystemd-terminal/term-screen.c \
3205         src/libsystemd-terminal/term-wcwidth.c \
3206         src/libsystemd-terminal/unifont.h \
3207         src/libsystemd-terminal/unifont-def.h \
3208         src/libsystemd-terminal/unifont.c
3209
3210 libsystemd_terminal_la_LIBADD = \
3211         libudev-internal.la \
3212         libsystemd-internal.la \
3213         libsystemd-shared.la \
3214         $(TERMINAL_LIBS)
3215
3216 systemd_consoled_CFLAGS = \
3217         $(AM_CFLAGS) \
3218         $(TERMINAL_CFLAGS)
3219
3220 systemd_consoled_SOURCES = \
3221         src/console/consoled.h \
3222         src/console/consoled.c \
3223         src/console/consoled-display.c \
3224         src/console/consoled-manager.c \
3225         src/console/consoled-session.c \
3226         src/console/consoled-terminal.c \
3227         src/console/consoled-workspace.c
3228
3229 systemd_consoled_LDADD = \
3230         libsystemd-terminal.la \
3231         libsystemd-internal.la \
3232         libsystemd-shared.la \
3233         $(TERMINAL_LIBS)
3234
3235 systemd_evcat_CFLAGS = \
3236         $(AM_CFLAGS) \
3237         $(TERMINAL_CFLAGS)
3238
3239 systemd_evcat_SOURCES = \
3240         src/libsystemd-terminal/evcat.c
3241
3242 systemd_evcat_LDADD = \
3243         libsystemd-terminal.la \
3244         libsystemd-internal.la \
3245         libsystemd-shared.la \
3246         $(TERMINAL_LIBS)
3247
3248 systemd_modeset_CFLAGS = \
3249         $(AM_CFLAGS) \
3250         $(TERMINAL_CFLAGS)
3251
3252 systemd_modeset_SOURCES = \
3253         src/libsystemd-terminal/modeset.c
3254
3255 systemd_modeset_LDADD = \
3256         libsystemd-terminal.la \
3257         libsystemd-internal.la \
3258         libsystemd-shared.la \
3259         $(TERMINAL_LIBS)
3260
3261 systemd_subterm_SOURCES = \
3262         src/libsystemd-terminal/subterm.c
3263
3264 systemd_subterm_LDADD = \
3265         libsystemd-terminal.la \
3266         libsystemd-internal.la \
3267         libsystemd-shared.la
3268
3269 test_term_page_SOURCES = \
3270         src/libsystemd-terminal/test-term-page.c
3271
3272 test_term_page_LDADD = \
3273         libsystemd-terminal.la \
3274         libsystemd-internal.la \
3275         libsystemd-shared.la
3276
3277 test_term_parser_SOURCES = \
3278         src/libsystemd-terminal/test-term-parser.c
3279
3280 test_term_parser_LDADD = \
3281         libsystemd-terminal.la \
3282         libsystemd-internal.la \
3283         libsystemd-shared.la
3284
3285 test_unifont_SOURCES = \
3286         src/libsystemd-terminal/test-unifont.c
3287
3288 test_unifont_LDADD = \
3289         libsystemd-terminal.la \
3290         libsystemd-internal.la \
3291         libsystemd-shared.la
3292
3293 .PHONY: update-unifont
3294 update-unifont: tools/compile-unifont.py
3295         $(AM_V_GEN)$(PYTHON) $< \
3296                 <$(top_srcdir)/src/libsystemd-terminal/unifont.hex \
3297                 >$(top_srcdir)/src/libsystemd-terminal/unifont-glyph-array.bin
3298         @echo "unifont-glyph-array.bin has been regenerated"
3299
3300 # ------------------------------------------------------------------------------
3301 if ENABLE_GTK_DOC
3302 SUBDIRS += \
3303         docs/libudev
3304
3305 noinst_DATA += \
3306         docs/html/libudev \
3307         docs/html/gudev
3308 endif
3309
3310 include_HEADERS += \
3311         src/libudev/libudev.h
3312
3313 lib_LTLIBRARIES += \
3314         libudev.la
3315
3316 libudev_la_SOURCES =\
3317         src/libudev/libudev.sym \
3318         src/libudev/libudev-private.h \
3319         src/libudev/libudev.c \
3320         src/libudev/libudev-list.c \
3321         src/libudev/libudev-util.c \
3322         src/libudev/libudev-device.c \
3323         src/libudev/libudev-enumerate.c \
3324         src/libudev/libudev-monitor.c \
3325         src/libudev/libudev-queue.c \
3326         src/libudev/libudev-hwdb-def.h \
3327         src/libudev/libudev-hwdb.c
3328
3329 libudev_la_CFLAGS = \
3330         $(AM_CFLAGS) \
3331         -fvisibility=hidden
3332
3333 libudev_la_LDFLAGS = \
3334         $(AM_LDFLAGS) \
3335         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
3336         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
3337
3338 libudev_la_LIBADD = \
3339         libsystemd-internal.la \
3340         libsystemd-shared.la
3341
3342 pkgconfiglib_DATA += \
3343         src/libudev/libudev.pc
3344
3345 EXTRA_DIST += \
3346         src/libudev/libudev.pc.in
3347
3348 CLEANFILES += \
3349         src/libudev/libudev.pc \
3350         docs/html/libudev \
3351         docs/html/gudev
3352
3353 docs/html/libudev:
3354         $(AM_V_at)$(MKDIR_P) $(dir $@)
3355         $(AM_V_LN)$(LN_S) -f ../libudev/html $@
3356
3357 docs/html/gudev:
3358         $(AM_V_at)$(MKDIR_P) $(dir $@)
3359         $(AM_V_LN)$(LN_S) -f ../gudev/html $@
3360
3361 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
3362 libudev-install-hook:
3363         libname=libudev.so && $(move-to-rootlibdir)
3364
3365 libudev-uninstall-hook:
3366         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
3367
3368 INSTALL_EXEC_HOOKS += libudev-install-hook
3369 UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
3370
3371 # ------------------------------------------------------------------------------
3372 noinst_LTLIBRARIES += \
3373         libudev-internal.la
3374
3375 libudev_internal_la_SOURCES =\
3376         $(libudev_la_SOURCES) \
3377         src/libudev/libudev-device-private.c
3378
3379 libudev_internal_la_CFLAGS = \
3380         $(AM_CFLAGS) \
3381         -fvisibility=default
3382
3383 # ------------------------------------------------------------------------------
3384 INSTALL_DIRS += \
3385         $(sysconfdir)/udev/rules.d \
3386         $(sysconfdir)/udev/hwdb.d
3387
3388 dist_network_DATA = \
3389         network/99-default.link \
3390         network/80-container-host0.network \
3391         network/80-container-ve.network
3392
3393 dist_udevrules_DATA += \
3394         rules/42-usb-hid-pm.rules \
3395         rules/50-udev-default.rules \
3396         rules/60-drm.rules \
3397         rules/60-keyboard.rules \
3398         rules/70-mouse.rules \
3399         rules/60-persistent-storage-tape.rules \
3400         rules/60-persistent-serial.rules \
3401         rules/60-persistent-input.rules \
3402         rules/60-persistent-alsa.rules \
3403         rules/60-persistent-storage.rules \
3404         rules/64-btrfs.rules \
3405         rules/75-net-description.rules \
3406         rules/75-tty-description.rules \
3407         rules/78-sound-card.rules \
3408         rules/80-net-setup-link.rules \
3409         rules/95-udev-late.rules
3410
3411 nodist_udevrules_DATA += \
3412         rules/99-systemd.rules
3413
3414 dist_udevhwdb_DATA = \
3415         hwdb/20-pci-vendor-model.hwdb \
3416         hwdb/20-pci-classes.hwdb \
3417         hwdb/20-usb-vendor-model.hwdb \
3418         hwdb/20-usb-classes.hwdb \
3419         hwdb/20-sdio-vendor-model.hwdb \
3420         hwdb/20-sdio-classes.hwdb \
3421         hwdb/20-bluetooth-vendor-product.hwdb \
3422         hwdb/20-acpi-vendor.hwdb \
3423         hwdb/20-OUI.hwdb \
3424         hwdb/20-net-ifname.hwdb \
3425         hwdb/60-keyboard.hwdb \
3426         hwdb/70-mouse.hwdb
3427
3428 udevconfdir = $(sysconfdir)/udev
3429 dist_udevconf_DATA = \
3430         src/udev/udev.conf
3431
3432 sharepkgconfigdir = $(datadir)/pkgconfig
3433 sharepkgconfig_DATA = \
3434         src/udev/udev.pc
3435
3436 EXTRA_DIST += \
3437         rules/99-systemd.rules.in \
3438         src/udev/udev.pc.in
3439
3440 CLEANFILES += \
3441         rules/99-systemd.rules \
3442         src/udev/udev.pc
3443
3444 EXTRA_DIST += \
3445         units/systemd-udevd.service.in \
3446         units/systemd-udev-trigger.service.in \
3447         units/systemd-udev-settle.service.in \
3448         units/systemd-udev-hwdb-update.service.in
3449
3450 CLEANFILES += \
3451         units/systemd-udevd.service \
3452         units/systemd-udev-trigger.service \
3453         units/systemd-udev-settle.service \
3454         units/systemd-udev-hwdb-update.service
3455
3456 SOCKETS_TARGET_WANTS += \
3457         systemd-udevd-control.socket \
3458         systemd-udevd-kernel.socket
3459
3460 SYSINIT_TARGET_WANTS += \
3461         systemd-udevd.service \
3462         systemd-udev-trigger.service \
3463         systemd-udev-hwdb-update.service
3464
3465 rootbin_PROGRAMS += \
3466         udevadm
3467
3468 rootlibexec_PROGRAMS += \
3469         systemd-udevd
3470
3471 noinst_LTLIBRARIES += \
3472         libudev-core.la
3473
3474 src/udev/keyboard-keys.txt:
3475         $(AM_V_at)$(MKDIR_P) $(dir $@)
3476         $(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/' > $@
3477
3478 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt
3479         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
3480
3481 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
3482         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
3483
3484 src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt
3485         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
3486
3487 libudev_core_la_SOURCES = \
3488         src/udev/udev.h \
3489         src/udev/udev-event.c \
3490         src/udev/udev-watch.c \
3491         src/udev/udev-node.c \
3492         src/udev/udev-rules.c \
3493         src/udev/udev-ctrl.c \
3494         src/udev/udev-builtin.c \
3495         src/udev/udev-builtin-btrfs.c \
3496         src/udev/udev-builtin-hwdb.c \
3497         src/udev/udev-builtin-input_id.c \
3498         src/udev/udev-builtin-keyboard.c \
3499         src/udev/udev-builtin-net_id.c \
3500         src/udev/udev-builtin-net_setup_link.c \
3501         src/udev/udev-builtin-path_id.c \
3502         src/udev/udev-builtin-usb_id.c \
3503         src/udev/net/link-config.h \
3504         src/udev/net/link-config.c \
3505         src/udev/net/ethtool-util.h \
3506         src/udev/net/ethtool-util.c
3507
3508 nodist_libudev_core_la_SOURCES = \
3509         src/udev/keyboard-keys-from-name.h \
3510         src/udev/keyboard-keys-to-name.h \
3511         src/udev/net/link-config-gperf.c
3512
3513 BUILT_SOURCES += \
3514         $(nodist_libudev_core_la_SOURCES)
3515
3516 CLEANFILES += \
3517         src/udev/keyboard-keys-from-name.gperf \
3518         src/udev/keyboard-keys.txt \
3519         src/udev/net/link-config-gperf.c
3520
3521 EXTRA_DIST += \
3522         src/udev/net/link-config-gperf.gperf
3523
3524 libudev_core_la_CFLAGS = \
3525         $(AM_CFLAGS) \
3526         $(BLKID_CFLAGS) \
3527         $(KMOD_CFLAGS)
3528
3529 libudev_core_la_LIBADD = \
3530         libudev-internal.la \
3531         libsystemd-label.la \
3532         libsystemd-internal.la \
3533         libsystemd-network.la \
3534         libsystemd-shared.la \
3535         $(BLKID_LIBS) \
3536         $(KMOD_LIBS)
3537
3538 if HAVE_KMOD
3539 libudev_core_la_SOURCES += \
3540         src/udev/udev-builtin-kmod.c
3541
3542 dist_udevrules_DATA += \
3543         rules/80-drivers.rules
3544 endif
3545
3546 if HAVE_BLKID
3547 libudev_core_la_SOURCES += \
3548         src/udev/udev-builtin-blkid.c
3549 endif
3550
3551 if HAVE_ACL
3552 libudev_core_la_SOURCES += \
3553         src/udev/udev-builtin-uaccess.c \
3554         src/login/logind-acl.c \
3555         src/libsystemd/sd-login/sd-login.c \
3556         src/systemd/sd-login.h
3557
3558 libudev_core_la_LIBADD += \
3559         libsystemd-acl.la
3560 endif
3561
3562 systemd_udevd_SOURCES = \
3563         src/udev/udevd.c
3564
3565 systemd_udevd_LDADD = \
3566         libudev-core.la
3567
3568 udevadm_SOURCES = \
3569         src/udev/udevadm.c \
3570         src/udev/udevadm-info.c \
3571         src/udev/udevadm-control.c \
3572         src/udev/udevadm-monitor.c \
3573         src/udev/udevadm-hwdb.c \
3574         src/udev/udevadm-settle.c \
3575         src/udev/udevadm-trigger.c \
3576         src/udev/udevadm-test.c \
3577         src/udev/udevadm-test-builtin.c \
3578         src/udev/udevadm-util.c \
3579         src/udev/udevadm-util.h
3580
3581 udevadm_LDADD = \
3582         libudev-core.la
3583
3584 # Update hwdb on installation. Do not bother if installing
3585 # in DESTDIR, since this is likely for packaging purposes.
3586 hwdb-update-hook:
3587         -test -n "$(DESTDIR)" || $(rootbindir)/udevadm hwdb --update
3588
3589 INSTALL_DATA_HOOKS += \
3590         hwdb-update-hook
3591
3592 hwdb-remove-hook:
3593         -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
3594
3595 # ------------------------------------------------------------------------------
3596 TESTS += \
3597         test/udev-test.pl \
3598         test/rules-test.sh
3599
3600 manual_tests += \
3601         test-libudev \
3602         test-udev
3603
3604 test_libudev_SOURCES = \
3605         src/test/test-libudev.c
3606
3607 test_libudev_LDADD = \
3608         libsystemd-label.la \
3609         libudev-internal.la \
3610         libsystemd-shared.la \
3611         libsystemd-internal.la
3612
3613 test_udev_SOURCES = \
3614         src/test/test-udev.c
3615
3616 test_udev_LDADD = \
3617         libudev-core.la  \
3618         $(BLKID_LIBS) \
3619         $(KMOD_LIBS) \
3620         $(SELINUX_LIBS)
3621
3622 if HAVE_ACL
3623 test_udev_LDADD += \
3624         libsystemd-acl.la
3625 endif
3626
3627 check_DATA += \
3628         test/sys
3629
3630 # packed sysfs test tree
3631 test/sys:
3632         $(AM_V_at)$(MKDIR_P) $(dir $@)
3633         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
3634
3635 test-sys-distclean:
3636         -rm -rf test/sys
3637 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
3638
3639 EXTRA_DIST += \
3640         test/sys.tar.xz \
3641         test/udev-test.pl \
3642         test/rules-test.sh \
3643         test/rule-syntax-check.py
3644
3645 # ------------------------------------------------------------------------------
3646 ata_id_SOURCES = \
3647         src/udev/ata_id/ata_id.c
3648
3649 ata_id_LDADD = \
3650         libudev-internal.la \
3651         libsystemd-shared.la
3652
3653 udevlibexec_PROGRAMS += \
3654         ata_id
3655
3656 # ------------------------------------------------------------------------------
3657 cdrom_id_SOURCES = \
3658         src/udev/cdrom_id/cdrom_id.c
3659
3660 cdrom_id_LDADD = \
3661         libudev-internal.la \
3662         libsystemd-shared.la
3663
3664 udevlibexec_PROGRAMS += \
3665         cdrom_id
3666
3667 dist_udevrules_DATA += \
3668         rules/60-cdrom_id.rules
3669
3670 # ------------------------------------------------------------------------------
3671 collect_SOURCES = \
3672         src/udev/collect/collect.c
3673
3674 collect_LDADD = \
3675         libudev-internal.la \
3676         libsystemd-shared.la
3677
3678 udevlibexec_PROGRAMS += \
3679         collect
3680
3681 # ------------------------------------------------------------------------------
3682 scsi_id_SOURCES =\
3683         src/udev/scsi_id/scsi_id.c \
3684         src/udev/scsi_id/scsi_serial.c \
3685         src/udev/scsi_id/scsi.h \
3686         src/udev/scsi_id/scsi_id.h
3687
3688 scsi_id_LDADD = \
3689         libudev-internal.la \
3690         libsystemd-shared.la
3691
3692 udevlibexec_PROGRAMS += \
3693         scsi_id
3694
3695 EXTRA_DIST += \
3696         src/udev/scsi_id/README
3697
3698 # ------------------------------------------------------------------------------
3699 v4l_id_SOURCES = \
3700         src/udev/v4l_id/v4l_id.c
3701
3702 v4l_id_LDADD = \
3703         libudev-internal.la
3704
3705 udevlibexec_PROGRAMS += \
3706         v4l_id
3707
3708 dist_udevrules_DATA += \
3709         rules/60-persistent-v4l.rules
3710
3711 # ------------------------------------------------------------------------------
3712 accelerometer_SOURCES = \
3713         src/udev/accelerometer/accelerometer.c
3714
3715 accelerometer_LDADD = \
3716         libudev-internal.la -lm \
3717         libsystemd-shared.la
3718
3719 udevlibexec_PROGRAMS += \
3720         accelerometer
3721
3722 dist_udevrules_DATA += \
3723         rules/61-accelerometer.rules
3724
3725 # ------------------------------------------------------------------------------
3726 if ENABLE_GUDEV
3727 if ENABLE_GTK_DOC
3728 SUBDIRS += \
3729         docs/gudev
3730 endif
3731
3732 libgudev_includedir = \
3733         $(includedir)/gudev-1.0/gudev
3734
3735 libgudev_include_HEADERS = \
3736         src/gudev/gudev.h \
3737         src/gudev/gudevenums.h \
3738         src/gudev/gudevenumtypes.h \
3739         src/gudev/gudevtypes.h \
3740         src/gudev/gudevclient.h \
3741         src/gudev/gudevdevice.h \
3742         src/gudev/gudevenumerator.h
3743
3744 lib_LTLIBRARIES += libgudev-1.0.la
3745
3746 pkgconfiglib_DATA += \
3747         src/gudev/gudev-1.0.pc
3748
3749 CLEANFILES += \
3750         src/gudev/gudev-1.0.pc
3751
3752 libgudev_1_0_la_SOURCES = \
3753         src/gudev/libgudev-1.0.sym \
3754         src/gudev/gudevenums.h \
3755         src/gudev/gudevenumtypes.h \
3756         src/gudev/gudevenumtypes.h\
3757         src/gudev/gudevtypes.h \
3758         src/gudev/gudevclient.h \
3759         src/gudev/gudevclient.c \
3760         src/gudev/gudevdevice.h \
3761         src/gudev/gudevdevice.c \
3762         src/gudev/gudevenumerator.h \
3763         src/gudev/gudevenumerator.c \
3764         src/gudev/gudevprivate.h
3765
3766 nodist_libgudev_1_0_la_SOURCES = \
3767         src/gudev/gudevmarshal.h \
3768         src/gudev/gudevmarshal.c \
3769         src/gudev/gudevenumtypes.h \
3770         src/gudev/gudevenumtypes.c
3771
3772 BUILT_SOURCES += \
3773         $(nodist_libgudev_1_0_la_SOURCES)
3774
3775 libgudev_1_0_la_CPPFLAGS = \
3776         $(AM_CPPFLAGS) \
3777         -I$(top_builddir)/src\
3778         -I$(top_srcdir)/src\
3779         -I$(top_builddir)/src/gudev \
3780         -I$(top_srcdir)/src/gudev \
3781         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
3782         -D_GUDEV_COMPILATION \
3783         -DG_LOG_DOMAIN=\"GUdev\"
3784
3785 libgudev_1_0_la_CFLAGS = \
3786         $(AM_CFLAGS) \
3787         -fvisibility=default \
3788         $(GLIB_CFLAGS)
3789
3790 libgudev_1_0_la_LIBADD = \
3791         libudev.la \
3792         $(GLIB_LIBS)
3793
3794 libgudev_1_0_la_LDFLAGS = \
3795         $(AM_LDFLAGS) \
3796         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
3797         -export-dynamic \
3798         -no-undefined \
3799         -Wl,--version-script=$(top_srcdir)/src/gudev/libgudev-1.0.sym
3800
3801 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
3802         $(AM_V_at)$(MKDIR_P) $(dir $@)
3803         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
3804
3805 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
3806         $(AM_V_at)$(MKDIR_P) $(dir $@)
3807         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
3808         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
3809
3810 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
3811         $(AM_V_at)$(MKDIR_P) $(dir $@)
3812         $(AM_V_GEN)glib-mkenums --template $^ > $@
3813
3814 if HAVE_INTROSPECTION
3815 -include $(INTROSPECTION_MAKEFILE)
3816
3817 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
3818
3819 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
3820
3821 src_gudev_GUdev_1_0_gir_CFLAGS = \
3822         $(AM_CFLAGS) \
3823         $(INCLUDES) \
3824         -D_GUDEV_COMPILATION \
3825         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
3826         -I$(top_srcdir)/src \
3827         -I$(top_builddir)/src \
3828         -I$(top_srcdir)/src/gudev \
3829         -I$(top_builddir)/src/gudev
3830
3831 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
3832
3833 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
3834         --pkg-export=gudev-1.0 \
3835         --warn-all
3836
3837 src_gudev_GUdev_1_0_gir_FILES = \
3838         src/gudev/gudev.h \
3839         src/gudev/gudevtypes.h \
3840         src/gudev/gudevenums.h \
3841         src/gudev/gudevenumtypes.h \
3842         src/gudev/gudevclient.h \
3843         src/gudev/gudevdevice.h \
3844         src/gudev/gudevenumerator.h \
3845         src/gudev/gudevclient.c \
3846         src/gudev/gudevdevice.c \
3847         src/gudev/gudevenumerator.c
3848
3849 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
3850 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
3851
3852 girdir = $(datadir)/gir-1.0
3853 gir_DATA = \
3854         src/gudev/GUdev-1.0.gir
3855
3856 typelibsdir = $(libdir)/girepository-1.0
3857 typelibs_DATA = \
3858         src/gudev/GUdev-1.0.typelib
3859
3860 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
3861 endif # HAVE_INTROSPECTION
3862 endif
3863
3864 EXTRA_DIST += \
3865         src/gudev/gudev-1.0.pc.in \
3866         src/gudev/gudevmarshal.list \
3867         src/gudev/gudevenumtypes.h.template \
3868         src/gudev/gudevenumtypes.c.template \
3869         src/gudev/gjs-example.js \
3870         src/gudev/seed-example-enum.js \
3871         src/gudev/seed-example.js
3872
3873 # ------------------------------------------------------------------------------
3874 mtd_probe_SOURCES =  \
3875         src/udev/mtd_probe/mtd_probe.c \
3876         src/udev/mtd_probe/mtd_probe.h \
3877         src/udev/mtd_probe/probe_smartmedia.c
3878
3879 dist_udevrules_DATA += \
3880         rules/75-probe_mtd.rules
3881
3882 udevlibexec_PROGRAMS += \
3883         mtd_probe
3884
3885 # ------------------------------------------------------------------------------
3886 test_id128_SOURCES = \
3887         src/test/test-id128.c
3888
3889 test_id128_LDADD = \
3890         libsystemd-internal.la \
3891         libsystemd-shared.la
3892
3893 tests += \
3894         test-id128
3895
3896 # ------------------------------------------------------------------------------
3897
3898 rootlibexec_PROGRAMS += \
3899         systemd-activate
3900
3901 systemd_activate_SOURCES = \
3902         src/activate/activate.c
3903
3904 systemd_activate_LDADD = \
3905         libsystemd-label.la \
3906         libsystemd-internal.la \
3907         libsystemd-shared.la
3908
3909 # ------------------------------------------------------------------------------
3910 systemd_journald_SOURCES = \
3911         src/journal/journald.c \
3912         src/journal/journald-server.h
3913
3914 systemd_journald_LDADD = \
3915         libsystemd-journal-core.la \
3916         libsystemd-internal.la \
3917         libsystemd-shared.la
3918
3919 systemd_cat_SOURCES = \
3920         src/journal/cat.c
3921
3922 systemd_cat_LDADD = \
3923         libsystemd-journal-core.la
3924
3925 if HAVE_MICROHTTPD
3926 rootlibexec_PROGRAMS += \
3927         systemd-journal-remote
3928
3929 systemd_journal_remote_SOURCES = \
3930         src/journal-remote/journal-remote-parse.h \
3931         src/journal-remote/journal-remote-parse.c \
3932         src/journal-remote/journal-remote-write.h \
3933         src/journal-remote/journal-remote-write.c \
3934         src/journal-remote/journal-remote.h \
3935         src/journal-remote/journal-remote.c
3936
3937 systemd_journal_remote_LDADD = \
3938         libsystemd-internal.la \
3939         libsystemd-journal-core.la
3940
3941 systemd_journal_remote_SOURCES += \
3942         src/journal-remote/microhttpd-util.h \
3943         src/journal-remote/microhttpd-util.c
3944
3945 systemd_journal_remote_CFLAGS = \
3946         $(AM_CFLAGS) \
3947         $(MICROHTTPD_CFLAGS)
3948
3949 systemd_journal_remote_LDADD += \
3950         $(MICROHTTPD_LIBS)
3951
3952 if ENABLE_SYSUSERS
3953 dist_sysusers_DATA += \
3954         sysusers.d/systemd-remote.conf
3955 endif
3956
3957 if ENABLE_TMPFILES
3958 dist_tmpfiles_DATA += \
3959         tmpfiles.d/systemd-remote.conf
3960 endif
3961
3962 if HAVE_GNUTLS
3963 systemd_journal_remote_LDADD += \
3964         $(GNUTLS_LIBS)
3965
3966 # systemd-journal-remote make sense mostly with full crypto stack
3967 dist_systemunit_DATA += \
3968         units/systemd-journal-remote.socket
3969
3970 nodist_systemunit_DATA += \
3971         units/systemd-journal-remote.service
3972
3973 EXTRA_DIST += \
3974         units/systemd-journal-remote.service.in
3975
3976 journal-remote-install-hook: journal-install-hook
3977         -$(MKDIR_P) $(DESTDIR)/var/log/journal/remote
3978         -chown 0:0 $(DESTDIR)/var/log/journal/remote
3979         -chmod 755 $(DESTDIR)/var/log/journal/remote
3980
3981 INSTALL_EXEC_HOOKS += journal-remote-install-hook
3982
3983 endif
3984
3985 nodist_pkgsysconf_DATA += \
3986         src/journal-remote/journal-remote.conf
3987
3988 EXTRA_DIST += \
3989         src/journal-remote/journal-remote.conf.in
3990
3991 CLEANFILES += \
3992         src/journal-remote/journal-remote.conf
3993 endif
3994
3995 if HAVE_LIBCURL
3996 rootlibexec_PROGRAMS += \
3997         systemd-journal-upload
3998
3999 systemd_journal_upload_SOURCES = \
4000         src/journal-remote/journal-upload.h \
4001         src/journal-remote/journal-upload.c \
4002         src/journal-remote/journal-upload-journal.c
4003
4004 systemd_journal_upload_CFLAGS = \
4005         $(AM_CFLAGS) \
4006         $(LIBCURL_CFLAGS)
4007
4008 systemd_journal_upload_LDADD = \
4009         libsystemd-internal.la \
4010         libsystemd-journal-internal.la \
4011         libsystemd-shared.la \
4012         $(LIBCURL_LIBS)
4013
4014 nodist_systemunit_DATA += \
4015         units/systemd-journal-upload.service
4016
4017 EXTRA_DIST += \
4018         units/systemd-journal-upload.service.in
4019
4020 nodist_pkgsysconf_DATA += \
4021         src/journal-remote/journal-upload.conf
4022
4023 EXTRA_DIST += \
4024         src/journal-remote/journal-upload.conf.in
4025
4026 CLEANFILES += \
4027         src/journal-remote/journal-upload.conf
4028 endif
4029
4030 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4031 journalctl_CFLAGS = \
4032         $(AM_CFLAGS)
4033
4034 journalctl_SOURCES = \
4035         src/journal/journalctl.c
4036
4037 journalctl_LDADD = \
4038         libsystemd-journal-internal.la \
4039         libsystemd-internal.la \
4040         libsystemd-logs.la \
4041         libsystemd-shared.la
4042
4043 if HAVE_ACL
4044 journalctl_LDADD += \
4045         libsystemd-acl.la
4046 endif
4047
4048 if HAVE_QRENCODE
4049 journalctl_SOURCES += \
4050         src/journal/journal-qrcode.c \
4051         src/journal/journal-qrcode.h
4052
4053 journalctl_CFLAGS += \
4054         $(QRENCODE_CFLAGS)
4055
4056 journalctl_LDADD += \
4057         $(QRENCODE_LIBS)
4058 endif
4059
4060 test_journal_SOURCES = \
4061         src/journal/test-journal.c
4062
4063 test_journal_LDADD = \
4064         libsystemd-journal-core.la
4065
4066 test_journal_send_SOURCES = \
4067         src/journal/test-journal-send.c
4068
4069 test_journal_send_LDADD = \
4070         libsystemd-journal-core.la
4071
4072 test_journal_syslog_SOURCES = \
4073         src/journal/test-journal-syslog.c
4074
4075 test_journal_syslog_LDADD = \
4076         libsystemd-journal-core.la
4077
4078 test_journal_match_SOURCES = \
4079         src/journal/test-journal-match.c
4080
4081 test_journal_match_LDADD = \
4082         libsystemd-journal-core.la
4083
4084 test_journal_enum_SOURCES = \
4085         src/journal/test-journal-enum.c
4086
4087 test_journal_enum_LDADD = \
4088         libsystemd-journal-core.la
4089
4090 test_journal_stream_SOURCES = \
4091         src/journal/test-journal-stream.c
4092
4093 test_journal_stream_LDADD = \
4094         libsystemd-journal-core.la
4095
4096 test_journal_flush_SOURCES = \
4097         src/journal/test-journal-flush.c
4098
4099 test_journal_flush_LDADD = \
4100         libsystemd-journal-core.la
4101
4102 test_journal_init_SOURCES = \
4103         src/journal/test-journal-init.c
4104
4105 test_journal_init_LDADD = \
4106         libsystemd-journal-core.la
4107
4108 test_journal_verify_SOURCES = \
4109         src/journal/test-journal-verify.c
4110
4111 test_journal_verify_LDADD = \
4112         libsystemd-journal-core.la
4113
4114 test_journal_interleaving_SOURCES = \
4115         src/journal/test-journal-interleaving.c
4116
4117 test_journal_interleaving_LDADD = \
4118         libsystemd-journal-core.la
4119
4120 test_mmap_cache_SOURCES = \
4121         src/journal/test-mmap-cache.c
4122
4123 test_mmap_cache_LDADD = \
4124         libsystemd-journal-core.la
4125
4126 test_catalog_SOURCES = \
4127         src/journal/test-catalog.c
4128
4129 test_catalog_CPPFLAGS = \
4130         $(AM_CPPFLAGS) \
4131         -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
4132
4133 test_catalog_LDADD = \
4134         libsystemd-journal-core.la
4135
4136 test_compress_SOURCES = \
4137         src/journal/test-compress.c
4138
4139 test_compress_LDADD = \
4140         libsystemd-journal-internal.la \
4141         libsystemd-shared.la
4142
4143 test_compress_benchmark_SOURCES = \
4144         src/journal/test-compress-benchmark.c
4145
4146 test_compress_benchmark_LDADD = \
4147         libsystemd-journal-internal.la \
4148         libsystemd-shared.la
4149
4150 libsystemd_journal_core_la_SOURCES = \
4151         src/journal/journald-kmsg.c \
4152         src/journal/journald-kmsg.h \
4153         src/journal/journald-syslog.c \
4154         src/journal/journald-syslog.h \
4155         src/journal/journald-stream.c \
4156         src/journal/journald-stream.h \
4157         src/journal/journald-server.c \
4158         src/journal/journald-server.h \
4159         src/journal/journald-console.c \
4160         src/journal/journald-console.h \
4161         src/journal/journald-wall.c \
4162         src/journal/journald-wall.h \
4163         src/journal/journald-native.c \
4164         src/journal/journald-native.h \
4165         src/journal/journald-audit.c \
4166         src/journal/journald-audit.h \
4167         src/journal/journald-rate-limit.c \
4168         src/journal/journald-rate-limit.h \
4169         src/journal/journal-internal.h
4170
4171 nodist_libsystemd_journal_core_la_SOURCES = \
4172         src/journal/journald-gperf.c
4173
4174 libsystemd_journal_core_la_LIBADD = \
4175         libsystemd-journal-internal.la \
4176         libudev-internal.la \
4177         libsystemd-label.la \
4178         libsystemd-internal.la \
4179         libsystemd-shared.la
4180
4181 if HAVE_ACL
4182 libsystemd_journal_core_la_LIBADD += \
4183         libsystemd-acl.la
4184 endif
4185
4186 noinst_LTLIBRARIES += \
4187         libsystemd-journal-core.la
4188
4189 journal-install-hook:
4190         -$(MKDIR_P) $(DESTDIR)/var/log/journal
4191         -chown 0:0 $(DESTDIR)/var/log/journal
4192         -chmod 755 $(DESTDIR)/var/log/journal
4193         -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
4194         -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
4195
4196 journal-uninstall-hook:
4197         -rmdir $(DESTDIR)/var/log/journal/remote
4198         -rmdir $(DESTDIR)/var/log/journal/
4199
4200 INSTALL_EXEC_HOOKS += journal-install-hook
4201 UNINSTALL_EXEC_HOOKS += journal-uninstall-hook
4202
4203 # ------------------------------------------------------------------------------
4204 # Update catalog on installation. Do not bother if installing
4205 # in DESTDIR, since this is likely for packaging purposes.
4206 catalog-update-hook:
4207         -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
4208
4209 INSTALL_DATA_HOOKS += \
4210         catalog-update-hook
4211
4212 catalog-remove-hook:
4213         -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
4214
4215 UNINSTALL_DATA_HOOKS += \
4216         catalog-remove-hook
4217
4218 manual_tests += \
4219         test-journal-enum
4220
4221 tests += \
4222         test-journal \
4223         test-journal-send \
4224         test-journal-syslog \
4225         test-journal-match \
4226         test-journal-stream \
4227         test-journal-init \
4228         test-journal-verify \
4229         test-journal-interleaving \
4230         test-journal-flush \
4231         test-mmap-cache \
4232         test-catalog
4233
4234 if HAVE_COMPRESSION
4235 tests += \
4236         test-compress \
4237         test-compress-benchmark
4238 endif
4239
4240 pkginclude_HEADERS += \
4241         src/systemd/sd-journal.h \
4242         src/systemd/sd-messages.h \
4243         src/systemd/_sd-common.h
4244
4245 libsystemd_journal_internal_la_SOURCES = \
4246         src/journal/sd-journal.c \
4247         src/systemd/sd-journal.h \
4248         src/systemd/_sd-common.h \
4249         src/journal/journal-file.c \
4250         src/journal/journal-file.h \
4251         src/journal/journal-vacuum.c \
4252         src/journal/journal-vacuum.h \
4253         src/journal/journal-verify.c \
4254         src/journal/journal-verify.h \
4255         src/journal/lookup3.c \
4256         src/journal/lookup3.h \
4257         src/journal/journal-send.c \
4258         src/journal/journal-def.h \
4259         src/journal/compress.h \
4260         src/journal/catalog.c \
4261         src/journal/catalog.h \
4262         src/journal/mmap-cache.c \
4263         src/journal/mmap-cache.h
4264
4265 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4266 libsystemd_journal_internal_la_CFLAGS = \
4267         $(AM_CFLAGS)
4268
4269 libsystemd_journal_internal_la_LIBADD =
4270
4271 libsystemd_journal_internal_la_SOURCES += \
4272         src/journal/compress.c
4273
4274 if HAVE_XZ
4275 libsystemd_journal_internal_la_CFLAGS += \
4276         $(XZ_CFLAGS)
4277
4278 libsystemd_journal_internal_la_LIBADD += \
4279         $(XZ_LIBS)
4280 endif
4281
4282 if HAVE_LZ4
4283 libsystemd_journal_internal_la_LIBADD += \
4284         -llz4
4285 endif
4286
4287 if HAVE_GCRYPT
4288 libsystemd_journal_internal_la_SOURCES += \
4289         src/journal/journal-authenticate.c \
4290         src/journal/journal-authenticate.h \
4291         src/journal/fsprg.c \
4292         src/journal/fsprg.h
4293
4294 libsystemd_journal_internal_la_LIBADD += \
4295         $(GCRYPT_LIBS)
4296
4297 # fsprg.c is a drop-in file using void pointer arithmetic
4298 libsystemd_journal_internal_la_CFLAGS += \
4299         $(GCRYPT_CFLAGS) \
4300         -Wno-pointer-arith
4301 endif
4302
4303 noinst_LTLIBRARIES += \
4304         libsystemd-journal-internal.la
4305
4306 rootlibexec_PROGRAMS += \
4307         systemd-journald
4308
4309 rootbin_PROGRAMS += \
4310         journalctl
4311
4312 bin_PROGRAMS += \
4313         systemd-cat
4314
4315 dist_systemunit_DATA += \
4316         units/systemd-journald.socket \
4317         units/systemd-journald-dev-log.socket \
4318         units/systemd-journald-audit.socket
4319
4320 nodist_systemunit_DATA += \
4321         units/systemd-journald.service \
4322         units/systemd-journal-flush.service \
4323         units/systemd-journal-catalog-update.service
4324
4325 dist_pkgsysconf_DATA += \
4326         src/journal/journald.conf
4327
4328 dist_catalog_DATA = \
4329         catalog/systemd.fr.catalog \
4330         catalog/systemd.it.catalog \
4331         catalog/systemd.pl.catalog \
4332         catalog/systemd.ru.catalog \
4333         catalog/systemd.catalog
4334
4335 SOCKETS_TARGET_WANTS += \
4336         systemd-journald.socket \
4337         systemd-journald-dev-log.socket \
4338         systemd-journald-audit.socket
4339
4340 SYSINIT_TARGET_WANTS += \
4341         systemd-journald.service \
4342         systemd-journal-flush.service \
4343         systemd-journal-catalog-update.service
4344
4345 EXTRA_DIST += \
4346         units/systemd-journald.service.in \
4347         units/systemd-journal-flush.service.in \
4348         units/systemd-journal-catalog-update.service.in \
4349         src/journal/journald-gperf.gperf
4350
4351 CLEANFILES += \
4352         src/journal/journald-gperf.c
4353
4354 # ------------------------------------------------------------------------------
4355 if HAVE_MICROHTTPD
4356 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
4357
4358 rootlibexec_PROGRAMS += \
4359         systemd-journal-gatewayd
4360
4361 systemd_journal_gatewayd_SOURCES = \
4362         src/journal-remote/journal-gatewayd.c \
4363         src/journal-remote/microhttpd-util.h \
4364         src/journal-remote/microhttpd-util.c
4365
4366 systemd_journal_gatewayd_LDADD = \
4367         libsystemd-logs.la \
4368         libsystemd-journal-internal.la \
4369         libsystemd-internal.la \
4370         libsystemd-shared.la \
4371         $(MICROHTTPD_LIBS)
4372
4373 if HAVE_GNUTLS
4374 systemd_journal_gatewayd_LDADD += \
4375         $(GNUTLS_LIBS)
4376 endif
4377
4378 systemd_journal_gatewayd_CFLAGS = \
4379         $(AM_CFLAGS) \
4380         $(MICROHTTPD_CFLAGS)
4381
4382 systemd_journal_gatewayd_CPPFLAGS = \
4383         $(AM_CPPFLAGS) \
4384         -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
4385
4386 dist_systemunit_DATA += \
4387         units/systemd-journal-gatewayd.socket
4388
4389 nodist_systemunit_DATA += \
4390         units/systemd-journal-gatewayd.service
4391
4392 dist_gatewayddocumentroot_DATA = \
4393         src/journal-remote/browse.html
4394
4395 endif
4396
4397 EXTRA_DIST += \
4398         units/systemd-journal-gatewayd.service.in
4399
4400 # ------------------------------------------------------------------------------
4401
4402 systemd_socket_proxyd_SOURCES = \
4403         src/socket-proxy/socket-proxyd.c
4404
4405 systemd_socket_proxyd_LDADD = \
4406         libsystemd-logs.la \
4407         libsystemd-internal.la \
4408         libsystemd-journal-internal.la \
4409         libsystemd-shared.la \
4410         libsystemd-resolve.la
4411
4412 # ------------------------------------------------------------------------------
4413 if ENABLE_COREDUMP
4414 systemd_coredump_SOURCES = \
4415         src/journal/coredump.c \
4416         src/journal/coredump-vacuum.c \
4417         src/journal/coredump-vacuum.h
4418
4419 systemd_coredump_LDADD = \
4420         libsystemd-journal-internal.la \
4421         libsystemd-label.la \
4422         libsystemd-internal.la \
4423         libsystemd-shared.la
4424
4425 if HAVE_ELFUTILS
4426 systemd_coredump_SOURCES += \
4427         src/journal/stacktrace.c \
4428         src/journal/stacktrace.h
4429
4430 systemd_coredump_LDADD += \
4431         $(ELFUTILS_LIBS)
4432 endif
4433
4434 rootlibexec_PROGRAMS += \
4435         systemd-coredump
4436
4437 dist_pkgsysconf_DATA += \
4438         src/journal/coredump.conf
4439
4440 if HAVE_ACL
4441 systemd_coredump_LDADD += \
4442         libsystemd-acl.la
4443 endif
4444
4445 coredumpctl_SOURCES = \
4446         src/journal/coredumpctl.c
4447
4448 coredumpctl_LDADD = \
4449         libsystemd-journal-internal.la \
4450         libsystemd-internal.la \
4451         libsystemd-shared.la
4452
4453 bin_PROGRAMS += \
4454         coredumpctl
4455
4456 manual_tests += \
4457         test-coredump-vacuum
4458
4459 test_coredump_vacuum_SOURCES = \
4460         src/journal/test-coredump-vacuum.c  \
4461         src/journal/coredump-vacuum.c \
4462         src/journal/coredump-vacuum.h
4463
4464 test_coredump_vacuum_LDADD = \
4465         libsystemd-internal.la \
4466         libsystemd-shared.la
4467
4468 dist_bashcompletion_DATA += \
4469         shell-completion/bash/coredumpctl
4470
4471 dist_zshcompletion_DATA += \
4472         shell-completion/zsh/_coredumpctl
4473
4474 sysctl_DATA = \
4475         sysctl.d/50-coredump.conf
4476
4477 CLEANFILES += \
4478         sysctl.d/50-coredump.conf
4479 endif
4480
4481 EXTRA_DIST += \
4482         sysctl.d/50-coredump.conf.in
4483
4484 # ------------------------------------------------------------------------------
4485 if ENABLE_BINFMT
4486 systemd_binfmt_SOURCES = \
4487         src/binfmt/binfmt.c
4488
4489 systemd_binfmt_LDADD = \
4490         libsystemd-shared.la
4491
4492 rootlibexec_PROGRAMS += \
4493         systemd-binfmt
4494
4495 dist_systemunit_DATA += \
4496         units/proc-sys-fs-binfmt_misc.automount \
4497         units/proc-sys-fs-binfmt_misc.mount
4498
4499 nodist_systemunit_DATA += \
4500         units/systemd-binfmt.service
4501
4502 INSTALL_DIRS += \
4503         $(prefix)/lib/binfmt.d \
4504         $(sysconfdir)/binfmt.d
4505
4506 SYSINIT_TARGET_WANTS += \
4507         systemd-binfmt.service \
4508         proc-sys-fs-binfmt_misc.automount
4509
4510 endif
4511
4512 EXTRA_DIST += \
4513         units/systemd-binfmt.service.in
4514
4515 # ------------------------------------------------------------------------------
4516 if ENABLE_VCONSOLE
4517 systemd_vconsole_setup_SOURCES = \
4518         src/vconsole/vconsole-setup.c
4519
4520 systemd_vconsole_setup_LDADD = \
4521         libsystemd-shared.la
4522
4523 rootlibexec_PROGRAMS += \
4524         systemd-vconsole-setup
4525
4526 nodist_systemunit_DATA += \
4527         units/systemd-vconsole-setup.service
4528
4529 nodist_udevrules_DATA += \
4530         src/vconsole/90-vconsole.rules
4531
4532 SYSINIT_TARGET_WANTS += \
4533         systemd-vconsole-setup.service
4534
4535 CLEANFILES += \
4536         src/vconsole/90-vconsole.rules
4537 endif
4538
4539 EXTRA_DIST += \
4540         src/vconsole/90-vconsole.rules.in \
4541         units/systemd-vconsole-setup.service.in
4542
4543 # ------------------------------------------------------------------------------
4544 if ENABLE_BOOTCHART
4545 systemd_bootchart_SOURCES = \
4546         src/bootchart/bootchart.c \
4547         src/bootchart/bootchart.h \
4548         src/bootchart/store.c \
4549         src/bootchart/store.h \
4550         src/bootchart/svg.c \
4551         src/bootchart/svg.h
4552
4553 systemd_bootchart_LDADD = \
4554         libsystemd-journal-internal.la \
4555         libsystemd-shared.la
4556
4557 rootlibexec_PROGRAMS += \
4558         systemd-bootchart
4559
4560 dist_pkgsysconf_DATA += \
4561         src/bootchart/bootchart.conf
4562
4563 nodist_systemunit_DATA += \
4564         units/systemd-bootchart.service
4565
4566 EXTRA_DIST += \
4567         units/systemd-bootchart.service.in
4568
4569 CLEANFILES += \
4570         units/systemd-bootchart.service
4571 endif
4572
4573 # ------------------------------------------------------------------------------
4574 if ENABLE_QUOTACHECK
4575 rootlibexec_PROGRAMS += \
4576         systemd-quotacheck
4577
4578 nodist_systemunit_DATA += \
4579         units/systemd-quotacheck.service
4580
4581 systemd_quotacheck_SOURCES = \
4582         src/quotacheck/quotacheck.c
4583
4584 systemd_quotacheck_LDADD = \
4585         libsystemd-shared.la
4586 endif
4587
4588 EXTRA_DIST += \
4589         units/systemd-quotacheck.service.in
4590
4591 nodist_systemunit_DATA += \
4592         units/quotaon.service
4593
4594 # ------------------------------------------------------------------------------
4595 if ENABLE_RANDOMSEED
4596 rootlibexec_PROGRAMS += \
4597         systemd-random-seed
4598
4599 nodist_systemunit_DATA += \
4600         units/systemd-random-seed.service
4601
4602 systemd_random_seed_SOURCES = \
4603         src/random-seed/random-seed.c
4604
4605 systemd_random_seed_LDADD = \