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