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