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