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