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