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