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