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