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