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