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