chiark / gitweb /
doc: specify kernel configs for cpushares
[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-pre.target \
417         units/network-online.target \
418         units/nss-lookup.target \
419         units/nss-user-lookup.target \
420         units/hibernate.target \
421         units/hybrid-sleep.target \
422         units/poweroff.target \
423         units/reboot.target \
424         units/rescue.target \
425         units/rpcbind.target \
426         units/time-sync.target \
427         units/shutdown.target \
428         units/final.target \
429         units/umount.target \
430         units/sigpwr.target \
431         units/sleep.target \
432         units/sockets.target \
433         units/busnames.target \
434         units/timers.target \
435         units/paths.target \
436         units/suspend.target \
437         units/swap.target \
438         units/slices.target \
439         units/system.slice \
440         units/x-.slice \
441         units/systemd-initctl.socket \
442         units/systemd-shutdownd.socket \
443         units/syslog.socket \
444         units/dev-hugepages.mount \
445         units/dev-mqueue.mount \
446         units/sys-kernel-config.mount \
447         units/sys-kernel-debug.mount \
448         units/sys-fs-fuse-connections.mount \
449         units/tmp.mount \
450         units/printer.target \
451         units/sound.target \
452         units/bluetooth.target \
453         units/smartcard.target \
454         units/systemd-ask-password-wall.path \
455         units/systemd-ask-password-console.path \
456         units/systemd-udevd-control.socket \
457         units/systemd-udevd-kernel.socket \
458         units/system-update.target \
459         units/initrd-switch-root.target
460
461 nodist_systemunit_DATA = \
462         units/getty@.service \
463         units/serial-getty@.service \
464         units/console-shell.service \
465         units/console-getty.service \
466         units/container-getty@.service \
467         units/systemd-initctl.service \
468         units/systemd-shutdownd.service \
469         units/systemd-remount-fs.service \
470         units/systemd-update-utmp.service \
471         units/systemd-update-utmp-runlevel.service \
472         units/systemd-ask-password-wall.service \
473         units/systemd-ask-password-console.service \
474         units/systemd-sysctl.service \
475         units/emergency.service \
476         units/rescue.service \
477         units/user@.service \
478         units/systemd-hibernate.service \
479         units/systemd-hybrid-sleep.service \
480         units/systemd-suspend.service \
481         units/systemd-halt.service \
482         units/systemd-poweroff.service \
483         units/systemd-reboot.service \
484         units/systemd-kexec.service \
485         units/systemd-fsck@.service \
486         units/systemd-fsck-root.service \
487         units/systemd-udevd.service \
488         units/systemd-udev-trigger.service \
489         units/systemd-udev-settle.service \
490         units/debug-shell.service \
491         units/initrd-parse-etc.service \
492         units/initrd-cleanup.service \
493         units/initrd-udevadm-cleanup-db.service \
494         units/initrd-switch-root.service \
495         units/systemd-nspawn@.service
496
497 dist_userunit_DATA = \
498         units/user/basic.target \
499         units/user/default.target \
500         units/user/exit.target
501
502 nodist_userunit_DATA = \
503         units/user/systemd-exit.service
504
505 EXTRA_DIST += \
506         units/getty@.service.m4 \
507         units/serial-getty@.service.m4 \
508         units/console-shell.service.m4.in \
509         units/console-getty.service.m4.in \
510         units/container-getty@.service.m4.in \
511         units/rescue.service.m4.in \
512         units/systemd-initctl.service.in \
513         units/systemd-shutdownd.service.in \
514         units/systemd-remount-fs.service.in \
515         units/systemd-update-utmp.service.in \
516         units/systemd-update-utmp-runlevel.service.in \
517         units/systemd-ask-password-wall.service.in \
518         units/systemd-ask-password-console.service.in \
519         units/systemd-sysctl.service.in \
520         units/emergency.service.in \
521         units/systemd-halt.service.in \
522         units/systemd-poweroff.service.in \
523         units/systemd-reboot.service.in \
524         units/systemd-kexec.service.in \
525         units/user/systemd-exit.service.in \
526         units/systemd-fsck@.service.in \
527         units/systemd-fsck-root.service.in \
528         units/user@.service.in \
529         units/debug-shell.service.in \
530         units/systemd-hibernate.service.in \
531         units/systemd-hybrid-sleep.service.in \
532         units/systemd-suspend.service.in \
533         units/quotaon.service.in \
534         units/initrd-parse-etc.service.in \
535         units/initrd-cleanup.service.in \
536         units/initrd-udevadm-cleanup-db.service.in \
537         units/initrd-switch-root.service.in \
538         units/systemd-nspawn@.service.in
539
540 CLEANFILES += \
541         units/console-shell.service.m4 \
542         units/console-getty.service.m4 \
543         units/container-getty@.service.m4 \
544         units/rescue.service.m4 \
545         units/user@.service.m4
546
547 if HAVE_SYSV_COMPAT
548 nodist_systemunit_DATA += \
549         units/rc-local.service \
550         units/halt-local.service
551
552 systemgenerator_PROGRAMS += \
553         systemd-sysv-generator \
554         systemd-rc-local-generator
555 endif
556
557 EXTRA_DIST += \
558         units/rc-local.service.in \
559         units/halt-local.service.in
560
561 # automake is broken and can't handle files with a dash in front
562 # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14728#8
563 units-install-hook:
564         mv $(DESTDIR)$(systemunitdir)/x-.slice $(DESTDIR)/$(systemunitdir)/-.slice
565
566 units-uninstall-hook:
567         rm -f $(DESTDIR)/$(systemunitdir)/-.slice
568
569 INSTALL_DATA_HOOKS += units-install-hook
570 UNINSTALL_DATA_HOOKS += units-uninstall-hook
571
572 dist_doc_DATA = \
573         README \
574         NEWS \
575         LICENSE.LGPL2.1 \
576         LICENSE.GPL2 \
577         LICENSE.MIT \
578         DISTRO_PORTING \
579         src/libsystemd/sd-bus/PORTING-DBUS1 \
580         src/libsystemd/sd-bus/DIFFERENCES \
581         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
582
583 @INTLTOOL_POLICY_RULE@
584
585 # ------------------------------------------------------------------------------
586
587 MANPAGES =
588 MANPAGES_ALIAS =
589
590 include Makefile-man.am
591
592 .PHONY: man update-man-list
593 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
594
595 XML_FILES = \
596         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
597 HTML_FILES = \
598         ${XML_FILES:.xml=.html}
599 HTML_ALIAS = \
600         ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
601
602 if ENABLE_MANPAGES
603 man_MANS = \
604         $(MANPAGES) \
605         $(MANPAGES_ALIAS)
606
607 noinst_DATA += \
608         $(HTML_FILES) \
609         $(HTML_ALIAS)
610
611 CLEANFILES += \
612         $(man_MANS) \
613         $(HTML_FILES) \
614         $(HTML_ALIAS)
615
616 docs/html/man:
617         $(AM_V_at)$(MKDIR_P) $(dir $@)
618         $(AM_V_LN)$(LN_S) -f ../../man $@
619
620 noinst_DATA += \
621         docs/html/man
622
623 CLEANFILES += \
624         docs/html/man
625
626 if HAVE_PYTHON
627 man/index.html: man/systemd.index.html
628         $(AM_V_LN)$(LN_S) -f systemd.index.html $@
629
630 noinst_DATA += \
631         man/index.html
632
633 CLEANFILES += \
634         man/index.html
635
636 XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_builddir)/man/*.xml)
637 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
638 SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
639
640 update-man-list: $(top_srcdir)/tools/make-man-rules.py $(XML_GLOB)
641         $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
642         $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
643         @echo "Makefile-man.am has been regenerated"
644
645 man/systemd.index.xml: $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES)
646         $(AM_V_at)$(MKDIR_P) $(dir $@)
647         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
648
649 man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py $(SOURCE_XML_FILES)
650         $(AM_V_at)$(MKDIR_P) $(dir $@)
651         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
652
653 EXTRA_DIST += \
654         man/systemd.index.xml \
655         man/index.html \
656         man/systemd.directives.xml
657
658 CLEANFILES += \
659         man/systemd.index.xml \
660         man/systemd.directives.xml
661
662 endif
663
664 endif
665
666 EXTRA_DIST += \
667         $(XML_FILES) \
668         $(HTML_FILES) \
669         $(HTML_ALIAS) \
670         $(man_MANS) \
671         tools/make-man-index.py \
672         tools/make-directive-index.py \
673         tools/make-man-rules.py \
674         tools/xml_helper.py
675
676 # ------------------------------------------------------------------------------
677 noinst_LTLIBRARIES += \
678         libsystemd-shared.la
679
680 libsystemd_shared_la_SOURCES = \
681         src/shared/linux/auto_dev-ioctl.h \
682         src/shared/linux/fanotify.h \
683         src/shared/ioprio.h \
684         src/shared/missing.h \
685         src/shared/initreq.h \
686         src/shared/securebits.h \
687         src/shared/special.h \
688         src/shared/list.h \
689         src/shared/macro.h \
690         src/shared/def.h \
691         src/shared/sparse-endian.h \
692         src/shared/refcnt.h \
693         src/shared/udev-util.h \
694         src/shared/bus-errors.h \
695         src/shared/device-nodes.c \
696         src/shared/device-nodes.h \
697         src/shared/util.c \
698         src/shared/util.h \
699         src/shared/virt.c \
700         src/shared/virt.h \
701         src/shared/architecture.c \
702         src/shared/architecture.h \
703         src/shared/efivars.c \
704         src/shared/efivars.h \
705         src/shared/path-util.c \
706         src/shared/path-util.h \
707         src/shared/time-util.c \
708         src/shared/time-util.h \
709         src/shared/hashmap.c \
710         src/shared/hashmap.h \
711         src/shared/siphash24.c \
712         src/shared/siphash24.h \
713         src/shared/set.c \
714         src/shared/set.h \
715         src/shared/fdset.c \
716         src/shared/fdset.h \
717         src/shared/prioq.c \
718         src/shared/prioq.h \
719         src/shared/sleep-config.c \
720         src/shared/sleep-config.h \
721         src/shared/strv.c \
722         src/shared/strv.h \
723         src/shared/env-util.c \
724         src/shared/env-util.h \
725         src/shared/strbuf.c \
726         src/shared/strbuf.h \
727         src/shared/strxcpyx.c \
728         src/shared/strxcpyx.h \
729         src/shared/conf-parser.c \
730         src/shared/conf-parser.h \
731         src/shared/log.c \
732         src/shared/log.h \
733         src/shared/ratelimit.h \
734         src/shared/ratelimit.c \
735         src/shared/exit-status.c \
736         src/shared/exit-status.h \
737         src/shared/utf8.c \
738         src/shared/utf8.h \
739         src/shared/gunicode.c \
740         src/shared/gunicode.h \
741         src/shared/pager.c \
742         src/shared/pager.h \
743         src/shared/socket-util.c \
744         src/shared/socket-util.h \
745         src/shared/conf-files.c \
746         src/shared/conf-files.h \
747         src/shared/cgroup-util.c \
748         src/shared/cgroup-util.h \
749         src/shared/cgroup-show.c \
750         src/shared/cgroup-show.h \
751         src/shared/unit-name.c \
752         src/shared/unit-name.h \
753         src/shared/utmp-wtmp.c \
754         src/shared/utmp-wtmp.h \
755         src/shared/watchdog.c \
756         src/shared/watchdog.h \
757         src/shared/spawn-ask-password-agent.c \
758         src/shared/spawn-ask-password-agent.h \
759         src/shared/replace-var.c \
760         src/shared/replace-var.h \
761         src/shared/spawn-polkit-agent.c \
762         src/shared/spawn-polkit-agent.h \
763         src/shared/clock-util.c \
764         src/shared/clock-util.h \
765         src/shared/time-dst.c \
766         src/shared/time-dst.h \
767         src/shared/calendarspec.c \
768         src/shared/calendarspec.h \
769         src/shared/fileio.c \
770         src/shared/fileio.h \
771         src/shared/output-mode.h \
772         src/shared/MurmurHash2.c \
773         src/shared/MurmurHash2.h \
774         src/shared/acpi-fpdt.h \
775         src/shared/acpi-fpdt.c \
776         src/shared/boot-timestamps.h \
777         src/shared/boot-timestamps.c \
778         src/shared/mkdir.c \
779         src/shared/mkdir.h \
780         src/shared/smack-util.c \
781         src/shared/smack-util.h \
782         src/shared/apparmor-util.c \
783         src/shared/apparmor-util.h \
784         src/shared/ima-util.c \
785         src/shared/ima-util.h \
786         src/shared/ptyfwd.c \
787         src/shared/ptyfwd.h \
788         src/shared/errno-list.c \
789         src/shared/errno-list.h \
790         src/shared/af-list.c \
791         src/shared/af-list.h \
792         src/shared/audit.c \
793         src/shared/audit.h \
794         src/shared/xml.c \
795         src/shared/xml.h \
796         src/shared/condition-util.c \
797         src/shared/condition-util.h \
798         src/shared/bus-label.c \
799         src/shared/bus-label.h \
800         src/shared/gpt.h \
801         src/shared/generator.h \
802         src/shared/generator.c \
803         src/shared/clean-ipc.h \
804         src/shared/clean-ipc.c \
805         src/shared/login-shared.c \
806         src/shared/login-shared.h \
807         src/shared/ring.c \
808         src/shared/ring.h \
809         src/shared/async.c \
810         src/shared/async.h \
811         src/shared/eventfd-util.c \
812         src/shared/eventfd-util.h \
813         src/shared/copy.c \
814         src/shared/copy.h
815
816 nodist_libsystemd_shared_la_SOURCES = \
817         src/shared/errno-from-name.h \
818         src/shared/errno-to-name.h \
819         src/shared/af-from-name.h \
820         src/shared/af-to-name.h
821
822 libsystemd_shared_la_CFLAGS = \
823         $(AM_CFLAGS) \
824         $(SECCOMP_CFLAGS)
825
826 # ------------------------------------------------------------------------------
827 noinst_LTLIBRARIES += \
828         libsystemd-units.la
829
830 libsystemd_units_la_SOURCES = \
831         src/shared/install.c \
832         src/shared/install.h \
833         src/shared/install-printf.c \
834         src/shared/install-printf.h \
835         src/shared/path-lookup.c \
836         src/shared/path-lookup.h \
837         src/shared/specifier.c \
838         src/shared/specifier.h
839
840 # ------------------------------------------------------------------------------
841 noinst_LTLIBRARIES += \
842         libsystemd-label.la
843
844 libsystemd_label_la_SOURCES = \
845         src/shared/socket-label.c \
846         src/shared/label.c \
847         src/shared/label.h \
848         src/shared/selinux-util.c \
849         src/shared/selinux-util.h \
850         src/shared/mkdir-label.c \
851         src/shared/ask-password-api.c \
852         src/shared/ask-password-api.h \
853         src/shared/fileio-label.c \
854         src/shared/fileio-label.h \
855         src/shared/dev-setup.c \
856         src/shared/dev-setup.h
857
858 libsystemd_label_la_CFLAGS = \
859         $(AM_CFLAGS) \
860         $(SELINUX_CFLAGS)
861
862 libsystemd_label_la_LIBADD = \
863         $(SELINUX_LIBS)
864
865 # ------------------------------------------------------------------------------
866
867 if HAVE_SECCOMP
868 noinst_LTLIBRARIES += \
869         libsystemd-seccomp.la
870
871 libsystemd_seccomp_la_SOURCES = \
872         src/shared/seccomp-util.h \
873         src/shared/seccomp-util.c
874
875 libsystemd_seccomp_la_CFLAGS = \
876         $(AM_CFLAGS) \
877         $(SECCOMP_CFLAGS)
878
879 libsystemd_seccomp_la_LIBADD = \
880         $(SECCOMP_LIBS)
881 endif
882
883 # ------------------------------------------------------------------------------
884 noinst_LTLIBRARIES += \
885         libsystemd-logs.la
886
887 libsystemd_logs_la_SOURCES = \
888         src/shared/logs-show.c \
889         src/shared/logs-show.h
890
891 # ------------------------------------------------------------------------------
892 noinst_LTLIBRARIES += \
893         libsystemd-capability.la
894
895 libsystemd_capability_la_SOURCES = \
896         src/shared/capability.c \
897         src/shared/capability.h
898
899 libsystemd_capability_la_CFLAGS = \
900         $(AM_CFLAGS) \
901         $(CAP_CFLAGS)
902
903 libsystemd_capability_la_LIBADD = \
904         $(CAP_LIBS)
905
906 # ------------------------------------------------------------------------------
907 if HAVE_ACL
908 noinst_LTLIBRARIES += \
909         libsystemd-acl.la
910
911 libsystemd_acl_la_SOURCES = \
912         src/shared/acl-util.c \
913         src/shared/acl-util.h
914
915 libsystemd_acl_la_CFLAGS = \
916         $(AM_CFLAGS) \
917         $(ACL_CFLAGS)
918
919 libsystemd_acl_la_LIBADD = \
920         $(ACL_LIBS)
921 endif
922
923 # ------------------------------------------------------------------------------
924 noinst_LTLIBRARIES += \
925         libsystemd-core.la
926
927 libsystemd_core_la_SOURCES = \
928         src/core/unit.c \
929         src/core/unit.h \
930         src/core/unit-printf.c \
931         src/core/unit-printf.h \
932         src/core/job.c \
933         src/core/job.h \
934         src/core/manager.c \
935         src/core/manager.h \
936         src/core/transaction.c \
937         src/core/transaction.h \
938         src/core/load-fragment.c \
939         src/core/load-fragment.h \
940         src/core/service.c \
941         src/core/service.h \
942         src/core/socket.c \
943         src/core/socket.h \
944         src/core/busname.c \
945         src/core/busname.h \
946         src/core/target.c \
947         src/core/target.h \
948         src/core/snapshot.c \
949         src/core/snapshot.h \
950         src/core/device.c \
951         src/core/device.h \
952         src/core/mount.c \
953         src/core/mount.h \
954         src/core/automount.c \
955         src/core/automount.h \
956         src/core/swap.c \
957         src/core/swap.h \
958         src/core/timer.c \
959         src/core/timer.h \
960         src/core/path.c \
961         src/core/path.h \
962         src/core/slice.c \
963         src/core/slice.h \
964         src/core/scope.c \
965         src/core/scope.h \
966         src/core/load-dropin.c \
967         src/core/load-dropin.h \
968         src/core/execute.c \
969         src/core/execute.h \
970         src/core/kill.c \
971         src/core/kill.h \
972         src/core/dbus.c \
973         src/core/dbus.h \
974         src/core/dbus-manager.c \
975         src/core/dbus-manager.h \
976         src/core/dbus-unit.c \
977         src/core/dbus-unit.h \
978         src/core/dbus-job.c \
979         src/core/dbus-job.h \
980         src/core/dbus-service.c \
981         src/core/dbus-service.h \
982         src/core/dbus-socket.c \
983         src/core/dbus-socket.h \
984         src/core/dbus-busname.c \
985         src/core/dbus-busname.h \
986         src/core/dbus-target.c \
987         src/core/dbus-target.h \
988         src/core/dbus-snapshot.c \
989         src/core/dbus-snapshot.h \
990         src/core/dbus-device.c \
991         src/core/dbus-device.h \
992         src/core/dbus-mount.c \
993         src/core/dbus-mount.h \
994         src/core/dbus-automount.c \
995         src/core/dbus-automount.h \
996         src/core/dbus-swap.c \
997         src/core/dbus-swap.h \
998         src/core/dbus-timer.c \
999         src/core/dbus-timer.h \
1000         src/core/dbus-path.c \
1001         src/core/dbus-path.h \
1002         src/core/dbus-slice.c \
1003         src/core/dbus-slice.h \
1004         src/core/dbus-scope.c \
1005         src/core/dbus-scope.h \
1006         src/core/dbus-execute.c \
1007         src/core/dbus-execute.h \
1008         src/core/dbus-kill.c \
1009         src/core/dbus-kill.h \
1010         src/core/dbus-cgroup.c \
1011         src/core/dbus-cgroup.h \
1012         src/core/cgroup.c \
1013         src/core/cgroup.h \
1014         src/core/selinux-access.c \
1015         src/core/selinux-access.h \
1016         src/core/selinux-setup.c \
1017         src/core/selinux-setup.h \
1018         src/core/smack-setup.c \
1019         src/core/smack-setup.h \
1020         src/core/ima-setup.c \
1021         src/core/ima-setup.h \
1022         src/core/locale-setup.h \
1023         src/core/locale-setup.c \
1024         src/core/hostname-setup.c \
1025         src/core/hostname-setup.h \
1026         src/core/machine-id-setup.c \
1027         src/core/machine-id-setup.h \
1028         src/core/mount-setup.c \
1029         src/core/mount-setup.h \
1030         src/core/loopback-setup.h \
1031         src/core/loopback-setup.c \
1032         src/core/condition.c \
1033         src/core/condition.h \
1034         src/core/namespace.c \
1035         src/core/namespace.h \
1036         src/core/build.h \
1037         src/core/sysfs-show.h \
1038         src/core/switch-root.h \
1039         src/core/switch-root.c \
1040         src/core/killall.h \
1041         src/core/killall.c \
1042         src/core/audit-fd.c \
1043         src/core/audit-fd.h \
1044         src/core/show-status.c \
1045         src/core/show-status.h
1046
1047 if HAVE_KMOD
1048 libsystemd_core_la_SOURCES += \
1049         src/core/kmod-setup.c \
1050         src/core/kmod-setup.h
1051 endif
1052
1053 nodist_libsystemd_core_la_SOURCES = \
1054         src/core/load-fragment-gperf.c \
1055         src/core/load-fragment-gperf-nulstr.c
1056
1057 libsystemd_core_la_CFLAGS = \
1058         $(AM_CFLAGS) \
1059         $(PAM_CFLAGS) \
1060         $(AUDIT_CFLAGS) \
1061         $(CAP_CFLAGS) \
1062         $(KMOD_CFLAGS) \
1063         $(APPARMOR_CFLAGS) \
1064         $(SECCOMP_CFLAGS) \
1065         -pthread
1066
1067 libsystemd_core_la_LIBADD = \
1068         libsystemd-capability.la \
1069         libsystemd-units.la \
1070         libsystemd-label.la \
1071         libudev-internal.la \
1072         libsystemd-shared.la \
1073         libsystemd-internal.la \
1074         $(PAM_LIBS) \
1075         $(AUDIT_LIBS) \
1076         $(CAP_LIBS) \
1077         $(KMOD_LIBS) \
1078         $(APPARMOR_LIBS) \
1079         $(SECCOMP_LIBS)
1080
1081 if HAVE_SECCOMP
1082 libsystemd_core_la_LIBADD += \
1083         libsystemd-seccomp.la
1084 endif
1085
1086 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1087         $(AM_V_at)$(MKDIR_P) $(dir $@)
1088         $(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 ";" }' < $< > $@
1089
1090 EXTRA_DIST += \
1091         src/core/load-fragment-gperf.gperf.m4
1092
1093 CLEANFILES += \
1094         src/core/load-fragment-gperf.gperf \
1095         src/core/load-fragment-gperf.c \
1096         src/core/load-fragment-gperf-nulstr.c \
1097         src/shared/errno-list.txt \
1098         src/shared/errno-from-name.gperf \
1099         src/shared/af-list.txt \
1100         src/shared/af-from-name.gperf
1101
1102 BUILT_SOURCES += \
1103         src/shared/errno-from-name.h \
1104         src/shared/errno-to-name.h \
1105         src/shared/af-from-name.h \
1106         src/shared/af-to-name.h
1107
1108 src/shared/errno-list.txt:
1109         $(AM_V_at)$(MKDIR_P) $(dir $@)
1110         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - < /dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }'  > $@
1111
1112 src/shared/errno-from-name.gperf: src/shared/errno-list.txt
1113         $(AM_V_at)$(MKDIR_P) $(dir $@)
1114         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct errno_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' < $< > $@
1115
1116 src/shared/errno-from-name.h: src/shared/errno-from-name.gperf
1117         $(AM_V_at)$(MKDIR_P) $(dir $@)
1118         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_errno -H hash_errno_name -p -C < $< > $@
1119
1120 src/shared/errno-to-name.h: src/shared/errno-list.txt
1121         $(AM_V_at)$(MKDIR_P) $(dir $@)
1122         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
1123
1124 src/shared/af-list.txt:
1125         $(AM_V_at)$(MKDIR_P) $(dir $@)
1126         $(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; }'  > $@
1127
1128 src/shared/af-from-name.gperf: src/shared/af-list.txt
1129         $(AM_V_at)$(MKDIR_P) $(dir $@)
1130         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct af_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' < $< > $@
1131
1132 src/shared/af-from-name.h: src/shared/af-from-name.gperf
1133         $(AM_V_at)$(MKDIR_P) $(dir $@)
1134         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_af -H hash_af_name -p -C < $< > $@
1135
1136 src/shared/af-to-name.h: src/shared/af-list.txt
1137         $(AM_V_at)$(MKDIR_P) $(dir $@)
1138         $(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 "};"}' < $< > $@
1139
1140 # ------------------------------------------------------------------------------
1141 systemd_SOURCES = \
1142         src/core/main.c
1143
1144 systemd_CFLAGS = \
1145         $(AM_CFLAGS) \
1146         $(SECCOMP_CFLAGS)
1147
1148 systemd_LDADD = \
1149         libsystemd-core.la \
1150         $(RT_LIBS)
1151
1152 dist_pkgsysconf_DATA += \
1153         src/core/system.conf \
1154         src/core/user.conf
1155
1156 dist_dbuspolicy_DATA += \
1157         src/core/org.freedesktop.systemd1.conf
1158
1159 dist_dbussystemservice_DATA += \
1160         src/core/org.freedesktop.systemd1.service
1161
1162 polkitpolicy_in_in_files += \
1163         src/core/org.freedesktop.systemd1.policy.in.in
1164
1165 pkgconfigdata_DATA = \
1166         src/core/systemd.pc
1167
1168 nodist_rpmmacros_DATA = \
1169         src/core/macros.systemd
1170
1171 EXTRA_DIST += \
1172         src/core/systemd.pc.in \
1173         src/core/macros.systemd.in
1174
1175 CLEANFILES += \
1176         src/core/macros.systemd \
1177         src/core/org.freedesktop.systemd1.policy.in
1178
1179 # ------------------------------------------------------------------------------
1180 manual_tests += \
1181         test-engine \
1182         test-ns \
1183         test-loopback \
1184         test-hostname \
1185         test-daemon \
1186         test-cgroup \
1187         test-cgroup-mask \
1188         test-install \
1189         test-watchdog \
1190         test-log \
1191         test-ipcrm
1192
1193 if HAVE_KMOD
1194 manual_tests += \
1195         test-rtnl-manual
1196 endif
1197
1198 tests += \
1199         test-job-type \
1200         test-env-replace \
1201         test-strbuf \
1202         test-strv \
1203         test-path-util \
1204         test-strxcpyx \
1205         test-unit-name \
1206         test-unit-file \
1207         test-utf8 \
1208         test-ellipsize \
1209         test-util \
1210         test-ring \
1211         test-tmpfiles \
1212         test-namespace \
1213         test-date \
1214         test-sleep \
1215         test-replace-var \
1216         test-sched-prio \
1217         test-calendarspec \
1218         test-strip-tab-ansi \
1219         test-cgroup-util \
1220         test-prioq \
1221         test-fileio \
1222         test-time \
1223         test-hashmap \
1224         test-list \
1225         test-tables \
1226         test-device-nodes \
1227         test-xml \
1228         test-architecture
1229
1230 EXTRA_DIST += \
1231         test/sched_idle_bad.service \
1232         test/sched_idle_ok.service \
1233         test/sched_rr_bad.service \
1234         test/sched_rr_ok.service \
1235         test/sched_rr_change.service \
1236         test/son.service \
1237         test/daughter.service \
1238         test/parent.slice
1239
1240 EXTRA_DIST += \
1241         src/test/test-helper.h
1242
1243 test_device_nodes_SOURCES = \
1244         src/test/test-device-nodes.c
1245
1246 test_device_nodes_LDADD = \
1247         libsystemd-shared.la
1248
1249 test_engine_SOURCES = \
1250         src/test/test-engine.c
1251
1252 test_engine_CFLAGS = \
1253         $(AM_CFLAGS) \
1254         $(SECCOMP_CFLAGS)
1255
1256 test_engine_LDADD = \
1257         libsystemd-core.la \
1258         $(RT_LIBS)
1259
1260 test_job_type_SOURCES = \
1261         src/test/test-job-type.c
1262
1263 test_job_type_CFLAGS = \
1264         $(AM_CFLAGS) \
1265         $(SECCOMP_CFLAGS)
1266
1267 test_job_type_LDADD = \
1268         libsystemd-core.la \
1269         $(RT_LIBS)
1270
1271 test_ns_SOURCES = \
1272         src/test/test-ns.c
1273
1274 test_ns_CFLAGS = \
1275         $(AM_CFLAGS) \
1276         $(SECCOMP_CFLAGS)
1277
1278 test_ns_LDADD = \
1279         libsystemd-core.la
1280
1281 test_loopback_SOURCES = \
1282         src/test/test-loopback.c
1283
1284 test_loopback_LDADD = \
1285         libsystemd-core.la
1286
1287 test_hostname_SOURCES = \
1288         src/test/test-hostname.c
1289
1290 test_hostname_LDADD = \
1291         libsystemd-core.la
1292
1293 if ENABLE_EFI
1294 manual_tests += \
1295         test-boot-timestamp
1296
1297 test_boot_timestamp_SOURCES = \
1298         src/test/test-boot-timestamps.c
1299
1300 test_boot_timestamp_LDADD = \
1301         libsystemd-shared.la
1302 endif
1303
1304 test_unit_name_SOURCES = \
1305         src/test/test-unit-name.c
1306
1307 test_unit_name_CFLAGS = \
1308         $(AM_CFLAGS) \
1309         $(SECCOMP_CFLAGS)
1310
1311 test_unit_name_LDADD = \
1312         libsystemd-core.la \
1313         $(RT_LIBS)
1314
1315 test_unit_file_SOURCES = \
1316         src/test/test-unit-file.c
1317
1318 test_unit_file_CFLAGS = \
1319         $(AM_CFLAGS) \
1320         $(SECCOMP_CFLAGS)
1321
1322 test_unit_file_LDADD = \
1323         libsystemd-core.la \
1324         $(RT_LIBS)
1325
1326 test_utf8_SOURCES = \
1327         src/test/test-utf8.c
1328
1329 test_utf8_LDADD = \
1330         libsystemd-shared.la
1331
1332 test_util_SOURCES = \
1333         src/test/test-util.c
1334
1335 test_util_LDADD = \
1336         libsystemd-core.la
1337
1338 test_ring_SOURCES = \
1339         src/test/test-ring.c
1340
1341 test_ring_LDADD = \
1342         libsystemd-core.la
1343
1344 test_tmpfiles_SOURCES = \
1345         src/test/test-tmpfiles.c
1346
1347 test_tmpfiles_LDADD = \
1348         libsystemd-shared.la
1349
1350 test_namespace_SOURCES = \
1351         src/test/test-namespace.c
1352
1353 test_namespace_LDADD = \
1354         libsystemd-core.la
1355
1356 test_hashmap_SOURCES = \
1357         src/test/test-hashmap.c
1358
1359 test_hashmap_LDADD = \
1360         libsystemd-core.la
1361
1362 test_xml_SOURCES = \
1363         src/test/test-xml.c
1364
1365 test_xml_LDADD = \
1366         libsystemd-shared.la
1367
1368 test_list_SOURCES = \
1369         src/test/test-list.c
1370
1371 test_list_LDADD = \
1372         libsystemd-core.la
1373
1374 test_tables_SOURCES = \
1375         src/test/test-tables.c \
1376         src/shared/test-tables.h
1377
1378 test_tables_CFLAGS = \
1379         $(AM_CFLAGS) \
1380         $(SECCOMP_CFLAGS)
1381
1382 test_tables_LDADD = \
1383         libsystemd-logs.la \
1384         libsystemd-journal-internal.la \
1385         libsystemd-core.la \
1386         $(RT_LIBS)
1387
1388 test_prioq_SOURCES = \
1389         src/test/test-prioq.c
1390
1391 test_prioq_LDADD = \
1392         libsystemd-core.la
1393
1394 test_fileio_SOURCES = \
1395         src/test/test-fileio.c
1396
1397 test_fileio_LDADD = \
1398         libsystemd-core.la
1399
1400 test_time_SOURCES = \
1401         src/test/test-time.c
1402
1403 test_time_LDADD = \
1404         libsystemd-core.la
1405
1406 test_architecture_SOURCES = \
1407         src/test/test-architecture.c
1408
1409 test_architecture_LDADD = \
1410         libsystemd-shared.la
1411
1412 test_log_SOURCES = \
1413         src/test/test-log.c
1414
1415 test_log_LDADD = \
1416         libsystemd-core.la
1417
1418 test_ipcrm_SOURCES = \
1419         src/test/test-ipcrm.c
1420
1421 test_ipcrm_LDADD = \
1422         libsystemd-shared.la \
1423         -lrt
1424
1425 test_rtnl_manual_SOURCES = \
1426         src/test/test-rtnl-manual.c
1427
1428 test_rtnl_manual_CFLAGS = \
1429         $(AM_CFLAGS) \
1430         $(KMOD_CFLAGS)
1431
1432 test_rtnl_manual_LDADD = \
1433         libsystemd-internal.la \
1434         libsystemd-shared.la \
1435         $(KMOD_LIBS)
1436
1437 test_ellipsize_SOURCES = \
1438         src/test/test-ellipsize.c
1439
1440 test_ellipsize_LDADD = \
1441         libsystemd-core.la
1442
1443 test_date_SOURCES = \
1444         src/test/test-date.c
1445
1446 test_date_LDADD = \
1447         libsystemd-core.la
1448
1449 test_sleep_SOURCES = \
1450         src/test/test-sleep.c
1451
1452 test_sleep_LDADD = \
1453         libsystemd-core.la
1454
1455 test_replace_var_SOURCES = \
1456         src/test/test-replace-var.c
1457
1458 test_replace_var_LDADD = \
1459         libsystemd-shared.la
1460
1461 test_calendarspec_SOURCES = \
1462         src/test/test-calendarspec.c
1463
1464 test_calendarspec_LDADD = \
1465         libsystemd-shared.la
1466
1467 test_strip_tab_ansi_SOURCES = \
1468         src/test/test-strip-tab-ansi.c
1469
1470 test_strip_tab_ansi_LDADD = \
1471         libsystemd-shared.la
1472
1473 test_daemon_SOURCES = \
1474         src/test/test-daemon.c
1475
1476 test_daemon_LDADD = \
1477         libsystemd-internal.la \
1478         libsystemd-shared.la
1479
1480 test_cgroup_SOURCES = \
1481         src/test/test-cgroup.c
1482
1483 test_cgroup_LDADD = \
1484         libsystemd-label.la \
1485         libsystemd-shared.la \
1486         libsystemd-internal.la
1487
1488 test_cgroup_mask_SOURCES = \
1489         src/test/test-cgroup-mask.c
1490
1491 test_cgroup_mask_CPPFLAGS = \
1492         $(AM_CPPFLAGS) \
1493         -DTEST_DIR=\"$(abs_top_srcdir)/test\"
1494
1495 test_cgroup_mask_CFLAGS = \
1496         $(AM_CFLAGS) \
1497         $(SECCOMP_CFLAGS)
1498
1499 test_cgroup_mask_LDADD = \
1500         libsystemd-core.la \
1501         $(RT_LIBS)
1502
1503 test_cgroup_util_SOURCES = \
1504         src/test/test-cgroup-util.c
1505
1506 test_cgroup_util_LDADD = \
1507         libsystemd-label.la \
1508         libsystemd-internal.la \
1509         libsystemd-shared.la
1510
1511 test_env_replace_SOURCES = \
1512         src/test/test-env-replace.c
1513
1514 test_env_replace_LDADD = \
1515         libsystemd-shared.la
1516
1517 test_strbuf_SOURCES = \
1518         src/test/test-strbuf.c
1519
1520 test_strbuf_LDADD = \
1521         libsystemd-shared.la
1522
1523 test_strv_SOURCES = \
1524         src/test/test-strv.c
1525
1526 test_strv_LDADD = \
1527         libsystemd-units.la \
1528         libsystemd-internal.la \
1529         libsystemd-shared.la
1530
1531 test_path_util_SOURCES = \
1532         src/test/test-path-util.c
1533
1534 test_path_util_LDADD = \
1535         libsystemd-shared.la
1536
1537 test_strxcpyx_SOURCES = \
1538         src/test/test-strxcpyx.c
1539
1540 test_strxcpyx_LDADD = \
1541         libsystemd-shared.la
1542
1543 test_install_SOURCES = \
1544         src/test/test-install.c
1545
1546 test_install_LDADD = \
1547         libsystemd-units.la \
1548         libsystemd-label.la \
1549         libsystemd-shared.la \
1550         libsystemd-internal.la
1551
1552 test_watchdog_SOURCES = \
1553         src/test/test-watchdog.c
1554
1555 test_watchdog_LDADD = \
1556         libsystemd-shared.la
1557
1558 test_sched_prio_SOURCES = \
1559         src/test/test-sched-prio.c
1560
1561 test_sched_prio_CPPFLAGS = \
1562         $(AM_CPPFLAGS) \
1563         -DTEST_DIR=\"$(abs_top_srcdir)/test\"
1564
1565 test_sched_prio_CFLAGS = \
1566         $(AM_CFLAGS) \
1567         $(SECCOMP_CFLAGS)
1568
1569 test_sched_prio_LDADD = \
1570         libsystemd-core.la \
1571         $(RT_LIBS)
1572
1573 # ------------------------------------------------------------------------------
1574 ## .PHONY so it always rebuilds it
1575 .PHONY: coverage lcov-run lcov-report coverage-sync
1576
1577 # run lcov from scratch, always
1578 coverage:
1579         $(MAKE) lcov-run
1580         $(MAKE) lcov-report
1581
1582 coverage_dir = coverage
1583 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
1584
1585 if ENABLE_COVERAGE
1586 # reset run coverage tests
1587 lcov-run:
1588         @rm -rf $(coverage_dir)
1589         lcov $(coverage_opts) --zerocounters
1590         -$(MAKE) check
1591
1592 # generate report based on current coverage data
1593 lcov-report:
1594         $(MKDIR_P) $(coverage_dir)
1595         lcov $(coverage_opts) --compat-libtool --capture --no-external \
1596                 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
1597         genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov.info
1598         @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
1599
1600 # lcov doesn't work properly with vpath builds, make sure that bad
1601 # output is not uploaded by mistake.
1602 coverage-sync: coverage
1603         test "$(builddir)" = "$(srcdir)"
1604         rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
1605
1606 else
1607 lcov-run lcov-report:
1608         echo "Need to reconfigure with --enable-coverage"
1609 endif
1610
1611 # ------------------------------------------------------------------------------
1612 systemd_analyze_SOURCES = \
1613         src/analyze/analyze.c
1614
1615 systemd_analyze_LDADD = \
1616         libsystemd-internal.la \
1617         libsystemd-shared.la
1618
1619 # ------------------------------------------------------------------------------
1620 systemd_initctl_SOURCES = \
1621         src/initctl/initctl.c
1622
1623 systemd_initctl_LDADD = \
1624         libsystemd-internal.la \
1625         libsystemd-shared.la
1626
1627 # ------------------------------------------------------------------------------
1628 systemd_update_utmp_SOURCES = \
1629         src/update-utmp/update-utmp.c
1630
1631 systemd_update_utmp_CFLAGS = \
1632         $(AM_CFLAGS) \
1633         $(AUDIT_CFLAGS)
1634
1635 systemd_update_utmp_LDADD = \
1636         libsystemd-internal.la \
1637         libsystemd-shared.la \
1638         $(AUDIT_LIBS)
1639
1640 # ------------------------------------------------------------------------------
1641 systemd_shutdownd_SOURCES = \
1642         src/shutdownd/shutdownd.c
1643
1644 systemd_shutdownd_LDADD = \
1645         libsystemd-label.la \
1646         libsystemd-internal.la \
1647         libsystemd-shared.la
1648
1649 dist_doc_DATA += \
1650         src/systemd/sd-shutdown.h
1651
1652 # ------------------------------------------------------------------------------
1653 systemd_shutdown_SOURCES = \
1654         src/core/umount.c \
1655         src/core/umount.h \
1656         src/core/shutdown.c \
1657         src/core/mount-setup.c \
1658         src/core/mount-setup.h \
1659         src/core/killall.h \
1660         src/core/killall.c
1661
1662 systemd_shutdown_LDADD = \
1663         libsystemd-label.la \
1664         libudev-internal.la \
1665         libsystemd-shared.la
1666
1667 # ------------------------------------------------------------------------------
1668 if HAVE_KMOD
1669 systemd_modules_load_SOURCES = \
1670         src/modules-load/modules-load.c
1671
1672 systemd_modules_load_CFLAGS = \
1673         $(AM_CFLAGS) \
1674         $(KMOD_CFLAGS)
1675
1676 systemd_modules_load_LDADD = \
1677         libsystemd-shared.la \
1678         $(KMOD_LIBS)
1679
1680 rootlibexec_PROGRAMS += \
1681         systemd-modules-load
1682
1683 nodist_systemunit_DATA += \
1684         units/systemd-modules-load.service
1685
1686 SYSINIT_TARGET_WANTS += \
1687         systemd-modules-load.service
1688
1689 if ENABLE_TMPFILES
1690 nodist_systemunit_DATA += \
1691         units/kmod-static-nodes.service
1692
1693 SYSINIT_TARGET_WANTS += \
1694         kmod-static-nodes.service
1695 endif
1696 endif
1697
1698 EXTRA_DIST += \
1699         units/systemd-modules-load.service.in \
1700         units/kmod-static-nodes.service.in
1701
1702 # ------------------------------------------------------------------------------
1703 if ENABLE_TMPFILES
1704 systemd_tmpfiles_SOURCES = \
1705         src/tmpfiles/tmpfiles.c
1706
1707 systemd_tmpfiles_LDADD = \
1708         libsystemd-units.la \
1709         libsystemd-label.la \
1710         libsystemd-capability.la \
1711         libsystemd-internal.la \
1712         libsystemd-shared.la
1713
1714 rootbin_PROGRAMS += \
1715         systemd-tmpfiles
1716
1717 dist_systemunit_DATA += \
1718         units/systemd-tmpfiles-clean.timer
1719
1720 nodist_systemunit_DATA += \
1721         units/systemd-tmpfiles-setup-dev.service \
1722         units/systemd-tmpfiles-setup.service \
1723         units/systemd-tmpfiles-clean.service
1724
1725 dist_tmpfiles_DATA = \
1726         tmpfiles.d/systemd.conf \
1727         tmpfiles.d/systemd-nologin.conf \
1728         tmpfiles.d/tmp.conf \
1729         tmpfiles.d/x11.conf \
1730         tmpfiles.d/var.conf
1731
1732 if HAVE_SYSV_COMPAT
1733 dist_tmpfiles_DATA += \
1734         tmpfiles.d/legacy.conf
1735 endif
1736
1737 SYSINIT_TARGET_WANTS += \
1738         systemd-tmpfiles-setup-dev.service \
1739         systemd-tmpfiles-setup.service
1740
1741 dist_zshcompletion_DATA += \
1742         shell-completion/zsh/_systemd-tmpfiles
1743
1744 TIMERS_TARGET_WANTS += \
1745         systemd-tmpfiles-clean.timer
1746
1747 INSTALL_DIRS += \
1748         $(tmpfilesdir) \
1749         $(sysconfdir)/tmpfiles.d
1750 endif
1751
1752 EXTRA_DIST += \
1753         units/systemd-tmpfiles-setup-dev.service.in \
1754         units/systemd-tmpfiles-setup.service.in \
1755         units/systemd-tmpfiles-clean.service.in
1756
1757 # ------------------------------------------------------------------------------
1758 systemd_machine_id_setup_SOURCES = \
1759         src/machine-id-setup/machine-id-setup-main.c \
1760         src/core/machine-id-setup.c \
1761         src/core/machine-id-setup.h
1762
1763 systemd_machine_id_setup_LDADD = \
1764         libsystemd-label.la \
1765         libsystemd-internal.la \
1766         libsystemd-shared.la
1767
1768 # ------------------------------------------------------------------------------
1769 systemd_sysctl_SOURCES = \
1770         src/sysctl/sysctl.c
1771
1772 systemd_sysctl_LDADD = \
1773         libsystemd-shared.la
1774
1775 # ------------------------------------------------------------------------------
1776 systemd_sleep_SOURCES = \
1777         src/sleep/sleep.c
1778
1779 systemd_sleep_LDADD = \
1780         libsystemd-shared.la
1781
1782 # ------------------------------------------------------------------------------
1783 systemd_fsck_SOURCES = \
1784         src/fsck/fsck.c
1785
1786 systemd_fsck_LDADD = \
1787         libsystemd-internal.la \
1788         libudev-internal.la \
1789         libsystemd-shared.la
1790
1791 # ------------------------------------------------------------------------------
1792 systemd_ac_power_SOURCES = \
1793         src/ac-power/ac-power.c
1794
1795 systemd_ac_power_LDADD = \
1796         libudev-internal.la \
1797         libsystemd-shared.la
1798
1799 # ------------------------------------------------------------------------------
1800 systemd_detect_virt_SOURCES = \
1801         src/detect-virt/detect-virt.c
1802
1803 systemd_detect_virt_LDADD = \
1804         libsystemd-shared.la
1805
1806 INSTALL_EXEC_HOOKS += \
1807         systemd-detect-virt-install-hook
1808
1809 # ------------------------------------------------------------------------------
1810 systemd_delta_SOURCES = \
1811         src/delta/delta.c
1812
1813 systemd_delta_LDADD = \
1814         libsystemd-shared.la
1815
1816 # ------------------------------------------------------------------------------
1817 systemd_getty_generator_SOURCES = \
1818         src/getty-generator/getty-generator.c
1819
1820 systemd_getty_generator_LDADD = \
1821         libsystemd-label.la \
1822         libsystemd-shared.la
1823
1824 # ------------------------------------------------------------------------------
1825 systemd_fstab_generator_SOURCES = \
1826         src/fstab-generator/fstab-generator.c \
1827         src/core/mount-setup.c
1828
1829 systemd_fstab_generator_LDADD = \
1830         libsystemd-label.la \
1831         libsystemd-shared.la
1832
1833 # ------------------------------------------------------------------------------
1834 systemd_system_update_generator_SOURCES = \
1835         src/system-update-generator/system-update-generator.c
1836
1837 systemd_system_update_generator_LDADD = \
1838         libsystemd-label.la \
1839         libsystemd-shared.la
1840
1841 if ENABLE_EFI
1842 # ------------------------------------------------------------------------------
1843 systemgenerator_PROGRAMS +=  \
1844         systemd-efi-boot-generator
1845
1846 systemd_efi_boot_generator_SOURCES = \
1847         src/efi-boot-generator/efi-boot-generator.c
1848
1849 systemd_efi_boot_generator_LDADD = \
1850         libsystemd-label.la \
1851         libsystemd-shared.la
1852
1853 # ------------------------------------------------------------------------------
1854 bootctl_SOURCES = \
1855         src/boot/boot.h \
1856         src/boot/boot-loader.h \
1857         src/boot/bootctl.c \
1858         src/boot/boot-loader.c \
1859         src/boot/boot-efi.c
1860
1861 bootctl_LDADD = \
1862         libsystemd-shared.la \
1863         libsystemd-internal.la
1864
1865 bin_PROGRAMS += \
1866         bootctl
1867
1868 dist_bashcompletion_DATA += \
1869         shell-completion/bash/bootctl
1870
1871 dist_zshcompletion_DATA += \
1872         shell-completion/zsh/_bootctl
1873
1874 endif
1875
1876 # ------------------------------------------------------------------------------
1877 if HAVE_BLKID
1878 systemgenerator_PROGRAMS +=  \
1879         systemd-gpt-auto-generator
1880
1881 systemd_gpt_auto_generator_SOURCES = \
1882         src/gpt-auto-generator/gpt-auto-generator.c \
1883         src/shared/blkid-util.h
1884
1885 systemd_gpt_auto_generator_LDADD = \
1886         libsystemd-label.la \
1887         libsystemd-internal.la \
1888         libudev-internal.la \
1889         libsystemd-shared.la \
1890         $(BLKID_LIBS)
1891
1892 systemd_gpt_auto_generator_CFLAGS = \
1893         $(AM_CFLAGS) \
1894         $(BLKID_CFLAGS)
1895 endif
1896
1897 # ------------------------------------------------------------------------------
1898 if ENABLE_KDBUS
1899 systemgenerator_PROGRAMS +=  \
1900         systemd-dbus1-generator
1901
1902 systemd_dbus1_generator_SOURCES = \
1903         src/dbus1-generator/dbus1-generator.c
1904
1905 systemd_dbus1_generator_LDADD = \
1906         libsystemd-label.la \
1907         libsystemd-shared.la \
1908         libsystemd-internal.la
1909
1910 dbus1-generator-install-hook:
1911         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
1912         $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
1913         $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
1914
1915 dbus1-generator-uninstall-hook:
1916         rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
1917
1918 INSTALL_EXEC_HOOKS += dbus1-generator-install-hook
1919 UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook
1920 endif
1921
1922 # ------------------------------------------------------------------------------
1923 systemd_sysv_generator_SOURCES = \
1924         src/sysv-generator/sysv-generator.c
1925
1926 systemd_sysv_generator_LDADD = \
1927         libsystemd-core.la \
1928         libsystemd-label.la \
1929         libsystemd-shared.la
1930
1931 # ------------------------------------------------------------------------------
1932 systemd_rc_local_generator_SOURCES = \
1933         src/rc-local-generator/rc-local-generator.c
1934
1935 systemd_rc_local_generator_LDADD = \
1936         libsystemd-label.la \
1937         libsystemd-shared.la
1938
1939 # ------------------------------------------------------------------------------
1940 systemd_remount_fs_SOURCES = \
1941         src/remount-fs/remount-fs.c \
1942         src/core/mount-setup.c \
1943         src/core/mount-setup.h
1944
1945 systemd_remount_fs_LDADD = \
1946         libsystemd-label.la \
1947         libsystemd-shared.la
1948
1949 # ------------------------------------------------------------------------------
1950 systemd_cgroups_agent_SOURCES = \
1951         src/cgroups-agent/cgroups-agent.c
1952
1953 systemd_cgroups_agent_LDADD = \
1954         libsystemd-internal.la \
1955         libsystemd-shared.la
1956
1957 # ------------------------------------------------------------------------------
1958 systemctl_SOURCES = \
1959         src/systemctl/systemctl.c
1960
1961 systemctl_LDADD = \
1962         libsystemd-units.la \
1963         libsystemd-label.la \
1964         libsystemd-internal.la \
1965         libsystemd-logs.la \
1966         libsystemd-journal-internal.la \
1967         libsystemd-shared.la
1968
1969 # ------------------------------------------------------------------------------
1970 systemd_notify_SOURCES = \
1971         src/notify/notify.c \
1972         src/readahead/sd-readahead.c
1973
1974 systemd_notify_LDADD = \
1975         libsystemd-internal.la \
1976         libsystemd-shared.la
1977
1978 # ------------------------------------------------------------------------------
1979 systemd_ask_password_SOURCES = \
1980         src/ask-password/ask-password.c
1981
1982 systemd_ask_password_LDADD = \
1983         libsystemd-label.la \
1984         libsystemd-shared.la
1985
1986 # ------------------------------------------------------------------------------
1987 systemd_reply_password_SOURCES = \
1988         src/reply-password/reply-password.c
1989
1990 systemd_reply_password_LDADD = \
1991         libsystemd-shared.la
1992
1993 # ------------------------------------------------------------------------------
1994 systemd_cgls_SOURCES = \
1995         src/cgls/cgls.c
1996
1997 systemd_cgls_LDADD = \
1998         libsystemd-internal.la \
1999         libsystemd-shared.la
2000
2001 # ------------------------------------------------------------------------------
2002 systemd_cgtop_SOURCES = \
2003         src/cgtop/cgtop.c
2004
2005 systemd_cgtop_LDADD = \
2006         libsystemd-shared.la
2007
2008 # ------------------------------------------------------------------------------
2009 systemd_nspawn_SOURCES = \
2010         src/nspawn/nspawn.c \
2011         src/core/mount-setup.c \
2012         src/core/mount-setup.h \
2013         src/core/loopback-setup.c \
2014         src/core/loopback-setup.h
2015
2016 systemd_nspawn_CFLAGS = \
2017         $(AM_CFLAGS) \
2018         $(SECCOMP_CFLAGS) \
2019         $(BLKID_CFLAGS)
2020
2021 systemd_nspawn_LDADD = \
2022         libsystemd-label.la \
2023         libsystemd-capability.la \
2024         libsystemd-internal.la \
2025         libudev-internal.la \
2026         libsystemd-shared.la \
2027         $(BLKID_LIBS)
2028
2029 if HAVE_SECCOMP
2030 systemd_nspawn_LDADD += \
2031         libsystemd-seccomp.la \
2032         $(SECCOMP_LIBS)
2033 endif
2034
2035 # ------------------------------------------------------------------------------
2036 systemd_run_SOURCES = \
2037         src/run/run.c
2038
2039 systemd_run_LDADD = \
2040         libsystemd-label.la \
2041         libsystemd-capability.la \
2042         libsystemd-internal.la \
2043         libsystemd-shared.la
2044
2045 # ------------------------------------------------------------------------------
2046 systemd_bus_proxyd_SOURCES = \
2047         src/bus-proxyd/bus-proxyd.c \
2048         src/bus-proxyd/bus-policy.c \
2049         src/bus-proxyd/bus-policy.h
2050
2051 systemd_bus_proxyd_LDADD = \
2052         libsystemd-capability.la \
2053         libsystemd-internal.la \
2054         libsystemd-shared.la
2055
2056 bus-proxyd-install-hook:
2057         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir)
2058         $(AM_V_RM)rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
2059         $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
2060
2061 bus-proxyd-uninstall-hook:
2062         rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
2063
2064 INSTALL_EXEC_HOOKS += bus-proxyd-install-hook
2065 UNINSTALL_EXEC_HOOKS += bus-proxyd-uninstall-hook
2066
2067 if ENABLE_KDBUS
2068 nodist_systemunit_DATA += \
2069         units/systemd-bus-proxyd@.service
2070
2071 dist_systemunit_DATA += \
2072         units/systemd-bus-proxyd.socket
2073
2074 dist_userunit_DATA += \
2075         units/user/systemd-bus-proxyd.socket \
2076         units/user/systemd-bus-proxyd@.service
2077 endif
2078
2079 EXTRA_DIST += \
2080         units/systemd-bus-proxyd@.service.in
2081
2082 # ------------------------------------------------------------------------------
2083 systemd_tty_ask_password_agent_SOURCES = \
2084         src/tty-ask-password-agent/tty-ask-password-agent.c
2085
2086 systemd_tty_ask_password_agent_LDADD = \
2087         libsystemd-label.la \
2088         libsystemd-shared.la
2089
2090 # ------------------------------------------------------------------------------
2091 libsystemd_internal_la_SOURCES = \
2092         src/systemd/sd-bus.h \
2093         src/systemd/sd-bus-protocol.h \
2094         src/systemd/sd-bus-vtable.h \
2095         src/systemd/sd-memfd.h \
2096         src/systemd/sd-utf8.h \
2097         src/systemd/sd-event.h \
2098         src/systemd/sd-rtnl.h \
2099         src/systemd/sd-resolve.h \
2100         src/systemd/sd-login.h \
2101         src/systemd/sd-id128.h \
2102         src/systemd/sd-daemon.h \
2103         src/libsystemd/sd-bus/sd-bus.c \
2104         src/libsystemd/sd-bus/bus-control.c \
2105         src/libsystemd/sd-bus/bus-control.h \
2106         src/libsystemd/sd-bus/bus-error.c \
2107         src/libsystemd/sd-bus/bus-error.h \
2108         src/libsystemd/sd-bus/bus-internal.c \
2109         src/libsystemd/sd-bus/bus-internal.h \
2110         src/libsystemd/sd-bus/bus-socket.c \
2111         src/libsystemd/sd-bus/bus-socket.h \
2112         src/libsystemd/sd-bus/bus-kernel.c \
2113         src/libsystemd/sd-bus/bus-kernel.h \
2114         src/libsystemd/sd-bus/bus-container.c \
2115         src/libsystemd/sd-bus/bus-container.h \
2116         src/libsystemd/sd-bus/bus-message.c \
2117         src/libsystemd/sd-bus/bus-message.h \
2118         src/libsystemd/sd-bus/bus-creds.c \
2119         src/libsystemd/sd-bus/bus-creds.h \
2120         src/libsystemd/sd-bus/bus-signature.c \
2121         src/libsystemd/sd-bus/bus-signature.h \
2122         src/libsystemd/sd-bus/bus-type.c \
2123         src/libsystemd/sd-bus/bus-type.h \
2124         src/libsystemd/sd-bus/bus-match.c \
2125         src/libsystemd/sd-bus/bus-match.h \
2126         src/libsystemd/sd-bus/bus-bloom.c \
2127         src/libsystemd/sd-bus/bus-bloom.h \
2128         src/libsystemd/sd-bus/bus-introspect.c \
2129         src/libsystemd/sd-bus/bus-introspect.h \
2130         src/libsystemd/sd-bus/bus-objects.c \
2131         src/libsystemd/sd-bus/bus-objects.h \
2132         src/libsystemd/sd-bus/bus-gvariant.c \
2133         src/libsystemd/sd-bus/bus-gvariant.h \
2134         src/libsystemd/sd-bus/bus-convenience.c \
2135         src/libsystemd/sd-bus/bus-track.c \
2136         src/libsystemd/sd-bus/bus-track.h \
2137         src/libsystemd/sd-bus/bus-util.c \
2138         src/libsystemd/sd-bus/bus-util.h \
2139         src/libsystemd/sd-bus/bus-slot.c \
2140         src/libsystemd/sd-bus/bus-slot.h \
2141         src/libsystemd/sd-bus/bus-protocol.h \
2142         src/libsystemd/sd-bus/kdbus.h \
2143         src/libsystemd/sd-bus/sd-memfd.c \
2144         src/libsystemd/sd-utf8/sd-utf8.c \
2145         src/libsystemd/sd-event/sd-event.c \
2146         src/libsystemd/sd-event/event-util.h \
2147         src/libsystemd/sd-rtnl/sd-rtnl.c \
2148         src/libsystemd/sd-rtnl/rtnl-internal.h \
2149         src/libsystemd/sd-rtnl/rtnl-message.c \
2150         src/libsystemd/sd-rtnl/rtnl-types.h \
2151         src/libsystemd/sd-rtnl/rtnl-types.c \
2152         src/libsystemd/sd-rtnl/rtnl-util.h \
2153         src/libsystemd/sd-rtnl/rtnl-util.c \
2154         src/libsystemd/sd-id128/sd-id128.c \
2155         src/libsystemd/sd-daemon/sd-daemon.c \
2156         src/libsystemd/sd-login/sd-login.c
2157
2158 nodist_libsystemd_internal_la_SOURCES = \
2159         src/libsystemd/libsystemd.sym \
2160         src/libsystemd/sd-bus/bus-error-mapping.c
2161
2162 libsystemd_internal_la_CFLAGS = \
2163         $(AM_CFLAGS) \
2164         -pthread
2165
2166 libsystemd_internal_la_LIBADD = \
2167         $(RT_LIBS)
2168
2169 libsystemd_resolve_la_SOURCES = \
2170         src/libsystemd/sd-resolve/sd-resolve.c \
2171         src/libsystemd/sd-resolve/resolve-util.h
2172
2173 libsystemd_resolve_la_CFLAGS = \
2174         $(AM_CFLAGS) \
2175         -pthread
2176
2177 libsystemd_resolve_la_LIBADD = \
2178         -lresolv
2179
2180 noinst_LTLIBRARIES += \
2181         libsystemd-internal.la \
2182         libsystemd-resolve.la
2183
2184 libsystemd_dump_la_SOURCES = \
2185         src/libsystemd/sd-bus/bus-dump.c \
2186         src/libsystemd/sd-bus/bus-dump.h
2187
2188 libsystemd_dump_la_CFLAGS = \
2189         $(AM_CFLAGS) \
2190         $(CAP_CFLAGS)
2191
2192 noinst_LTLIBRARIES += \
2193         libsystemd-dump.la
2194
2195 EXTRA_DIST += \
2196         src/libsystemd/libsystemd.sym.m4 \
2197         src/libsystemd/libsystemd.pc.in \
2198         src/libsystemd/sd-bus/bus-error-mapping.gperf \
2199         src/libsystemd/sd-bus/DIFFERENCES \
2200         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
2201
2202 CLEANFILES += \
2203         src/libsystemd/libsystemd.sym \
2204         src/libsystemd/sd-bus/bus-error-mapping.c
2205
2206 BUILT_SOURCES += \
2207         src/libsystemd/libsystemd.sym
2208
2209 libsystemd_la_SOURCES = \
2210         $(libsystemd_internal_la_SOURCES) \
2211         $(libsystemd_resolve_la_SOURCES) \
2212         $(libsystemd_journal_internal_la_SOURCES)
2213
2214 nodist_libsystemd_la_SOURCES = \
2215         $(nodist_libsystemd_internal_la_SOURCES)
2216
2217 libsystemd_la_CFLAGS = \
2218         $(libsystemd_internal_la_CFLAGS) \
2219         $(libsystemd_resolve_la_CFLAGS) \
2220         $(libsystemd_journal_internal_la_CFLAGS)
2221
2222 libsystemd_la_LDFLAGS = \
2223         $(AM_LDFLAGS) \
2224         -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
2225         -Wl,--version-script=$(top_builddir)/src/libsystemd/libsystemd.sym
2226
2227 libsystemd_la_LIBADD = \
2228         libsystemd-shared.la \
2229         $(libsystemd_internal_la_LIBADD) \
2230         $(libsystemd_journal_internal_la_LIBADD) \
2231         $(libsystemd_resolve_la_LIBADD)
2232
2233 libsystemd-install-hook:
2234         libname=libsystemd.so && $(move-to-rootlibdir)
2235
2236 libsystemd-uninstall-hook:
2237         rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
2238
2239 INSTALL_EXEC_HOOKS += libsystemd-install-hook
2240 UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
2241
2242 pkgconfiglib_DATA += \
2243         src/libsystemd/libsystemd.pc
2244
2245 pkginclude_HEADERS += \
2246         src/systemd/sd-login.h \
2247         src/systemd/sd-id128.h \
2248         src/systemd/sd-daemon.h
2249
2250 if ENABLE_KDBUS
2251 pkginclude_HEADERS += \
2252         src/systemd/sd-bus.h \
2253         src/systemd/sd-bus-protocol.h \
2254         src/systemd/sd-bus-vtable.h \
2255         src/systemd/sd-memfd.h \
2256         src/systemd/sd-utf8.h \
2257         src/systemd/sd-event.h \
2258         src/systemd/sd-rtnl.h \
2259         src/systemd/sd-resolve.h
2260 endif
2261
2262 lib_LTLIBRARIES += \
2263         libsystemd.la
2264
2265 tests += \
2266         test-bus-marshal \
2267         test-bus-signature \
2268         test-bus-chat \
2269         test-bus-cleanup \
2270         test-bus-server \
2271         test-bus-match \
2272         test-bus-kernel \
2273         test-bus-kernel-bloom \
2274         test-bus-kernel-benchmark \
2275         test-bus-memfd \
2276         test-bus-zero-copy \
2277         test-bus-introspect \
2278         test-bus-objects \
2279         test-bus-error \
2280         test-bus-creds \
2281         test-bus-gvariant \
2282         test-event \
2283         test-rtnl \
2284         test-resolve
2285
2286 bin_PROGRAMS += \
2287         busctl
2288
2289 test_bus_marshal_SOURCES = \
2290         src/libsystemd/sd-bus/test-bus-marshal.c
2291
2292 test_bus_marshal_LDADD = \
2293         libsystemd-internal.la \
2294         libsystemd-shared.la \
2295         libsystemd-dump.la \
2296         libsystemd-capability.la \
2297         $(GLIB_LIBS) \
2298         $(DBUS_LIBS) \
2299         $(CAP_LIBS)
2300
2301 test_bus_marshal_CFLAGS = \
2302         $(AM_CFLAGS) \
2303         $(GLIB_CFLAGS) \
2304         $(DBUS_CFLAGS) \
2305         $(CAP_CFLAGS)
2306
2307 test_bus_signature_SOURCES = \
2308         src/libsystemd/sd-bus/test-bus-signature.c
2309
2310 test_bus_signature_LDADD = \
2311         libsystemd-shared.la \
2312         libsystemd-internal.la
2313
2314 test_bus_chat_SOURCES = \
2315         src/libsystemd/sd-bus/test-bus-chat.c
2316
2317 test_bus_chat_CFLAGS = \
2318         $(AM_CFLAGS) \
2319         -pthread
2320
2321 test_bus_chat_LDADD = \
2322         libsystemd-internal.la \
2323         libsystemd-shared.la
2324
2325 test_bus_cleanup_SOURCES = \
2326         src/libsystemd/sd-bus/test-bus-cleanup.c
2327
2328 test_bus_cleanup_CFLAGS = \
2329         $(AM_CFLAGS) \
2330         $(SECCOMP_CFLAGS)
2331
2332 test_bus_cleanup_LDADD = \
2333         libsystemd-internal.la \
2334         libsystemd-shared.la
2335
2336 test_bus_server_SOURCES = \
2337         src/libsystemd/sd-bus/test-bus-server.c
2338
2339 test_bus_server_CFLAGS = \
2340         $(AM_CFLAGS) \
2341         -pthread
2342
2343 test_bus_server_LDADD = \
2344         libsystemd-internal.la \
2345         libsystemd-shared.la
2346
2347 test_bus_objects_SOURCES = \
2348         src/libsystemd/sd-bus/test-bus-objects.c
2349
2350 test_bus_objects_CFLAGS = \
2351         $(AM_CFLAGS) \
2352         $(CAP_CFLAGS) \
2353         -pthread
2354
2355 test_bus_objects_LDADD = \
2356         libsystemd-internal.la \
2357         libsystemd-shared.la \
2358         libsystemd-dump.la \
2359         libsystemd-capability.la \
2360         $(CAP_LIBS)
2361
2362 test_bus_error_SOURCES = \
2363         src/libsystemd/sd-bus/test-bus-error.c
2364
2365 test_bus_error_LDADD = \
2366         libsystemd-internal.la \
2367         libsystemd-shared.la
2368
2369 test_bus_gvariant_SOURCES = \
2370         src/libsystemd/sd-bus/test-bus-gvariant.c
2371
2372 test_bus_gvariant_LDADD = \
2373         libsystemd-internal.la \
2374         libsystemd-shared.la \
2375         libsystemd-dump.la \
2376         libsystemd-capability.la \
2377         $(GLIB_LIBS) \
2378         $(CAP_LIBS)
2379
2380 test_bus_gvariant_CFLAGS = \
2381         $(AM_CFLAGS) \
2382         $(GLIB_CFLAGS)
2383         $(CAP_CFLAGS)
2384
2385 test_bus_creds_SOURCES = \
2386         src/libsystemd/sd-bus/test-bus-creds.c
2387
2388 test_bus_creds_LDADD = \
2389         libsystemd-internal.la \
2390         libsystemd-shared.la \
2391         libsystemd-dump.la \
2392         libsystemd-capability.la
2393
2394 test_bus_match_SOURCES = \
2395         src/libsystemd/sd-bus/test-bus-match.c
2396
2397 test_bus_match_LDADD = \
2398         libsystemd-internal.la \
2399         libsystemd-shared.la
2400
2401 test_bus_kernel_SOURCES = \
2402         src/libsystemd/sd-bus/test-bus-kernel.c
2403
2404 test_bus_kernel_LDADD = \
2405         libsystemd-internal.la \
2406         libsystemd-shared.la \
2407         libsystemd-dump.la \
2408         libsystemd-capability.la \
2409         $(CAP_LIBS)
2410
2411 test_bus_kernel_CFLAGS = \
2412         $(AM_CFLAGS) \
2413         $(CAP_CFLAGS)
2414
2415 test_bus_kernel_bloom_SOURCES = \
2416         src/libsystemd/sd-bus/test-bus-kernel-bloom.c
2417
2418 test_bus_kernel_bloom_LDADD = \
2419         libsystemd-internal.la \
2420         libsystemd-shared.la
2421
2422 test_bus_kernel_benchmark_SOURCES = \
2423         src/libsystemd/sd-bus/test-bus-kernel-benchmark.c
2424
2425 test_bus_kernel_benchmark_LDADD = \
2426         libsystemd-internal.la \
2427         libsystemd-shared.la
2428
2429 test_bus_memfd_SOURCES = \
2430         src/libsystemd/sd-bus/test-bus-memfd.c
2431
2432 test_bus_memfd_LDADD = \
2433         libsystemd-internal.la \
2434         libsystemd-shared.la
2435
2436 test_bus_zero_copy_SOURCES = \
2437         src/libsystemd/sd-bus/test-bus-zero-copy.c
2438
2439 test_bus_zero_copy_LDADD = \
2440         libsystemd-internal.la \
2441         libsystemd-shared.la \
2442         libsystemd-dump.la \
2443         libsystemd-capability.la \
2444         $(CAP_LIBS)
2445
2446 test_bus_zero_copy_CFLAGS = \
2447         $(AM_CFLAGS) \
2448         $(CAP_CFLAGS)
2449
2450 test_bus_introspect_SOURCES = \
2451         src/libsystemd/sd-bus/test-bus-introspect.c
2452
2453 test_bus_introspect_LDADD = \
2454         libsystemd-internal.la \
2455         libsystemd-shared.la
2456
2457 test_event_SOURCES = \
2458         src/libsystemd/sd-event/test-event.c
2459
2460 test_event_LDADD = \
2461         libsystemd-internal.la \
2462         libsystemd-shared.la
2463
2464 test_rtnl_SOURCES = \
2465         src/libsystemd/sd-rtnl/test-rtnl.c
2466
2467 test_rtnl_LDADD = \
2468         libsystemd-internal.la \
2469         libsystemd-shared.la
2470
2471 test_resolve_SOURCES = \
2472         src/libsystemd/sd-resolve/test-resolve.c
2473
2474 test_resolve_LDADD = \
2475         libsystemd-resolve.la \
2476         libsystemd-internal.la \
2477         libsystemd-shared.la
2478
2479 test_resolve_CFLAGS = \
2480         $(AM_CFLAGS) \
2481         -pthread
2482
2483 busctl_SOURCES = \
2484         src/libsystemd/sd-bus/busctl.c
2485
2486 busctl_LDADD = \
2487         libsystemd-internal.la \
2488         libsystemd-shared.la \
2489         libsystemd-dump.la \
2490         libsystemd-capability.la \
2491         $(CAP_LIBS)
2492
2493 busctl_CFLAGS = \
2494         $(AM_CFLAGS) \
2495         $(CAP_CFLAGS)
2496
2497 # ------------------------------------------------------------------------------
2498 noinst_LTLIBRARIES += \
2499         libsystemd-network.la
2500
2501 libsystemd_network_la_CFLAGS = \
2502         $(AM_CFLAGS) \
2503         $(KMOD_CFLAGS)
2504
2505 libsystemd_network_la_SOURCES = \
2506         src/systemd/sd-network.h \
2507         src/systemd/sd-dhcp-client.h \
2508         src/systemd/sd-dhcp-lease.h \
2509         src/systemd/sd-ipv4ll.h \
2510         src/network/sd-network.c \
2511         src/network/network-util.h \
2512         src/libsystemd-network/sd-dhcp-client.c \
2513         src/libsystemd-network/dhcp-network.c \
2514         src/libsystemd-network/dhcp-option.c \
2515         src/libsystemd-network/dhcp-packet.c \
2516         src/libsystemd-network/dhcp-internal.h \
2517         src/libsystemd-network/dhcp-protocol.h \
2518         src/libsystemd-network/dhcp-lease-internal.h \
2519         src/libsystemd-network/sd-dhcp-lease.c \
2520         src/libsystemd-network/sd-ipv4ll.c \
2521         src/libsystemd-network/ipv4ll-network.c \
2522         src/libsystemd-network/ipv4ll-packet.c \
2523         src/libsystemd-network/ipv4ll-internal.h \
2524         src/libsystemd-network/network-internal.c \
2525         src/libsystemd-network/network-internal.h
2526
2527 libsystemd_network_la_LIBADD = \
2528         libudev-internal.la \
2529         libsystemd-label.la \
2530         libsystemd-internal.la \
2531         libsystemd-shared.la \
2532         $(KMOD_LIBS)
2533
2534 test_dhcp_option_SOURCES = \
2535         src/libsystemd-network/dhcp-protocol.h \
2536         src/libsystemd-network/dhcp-internal.h \
2537         src/libsystemd-network/test-dhcp-option.c
2538
2539 test_dhcp_option_LDADD = \
2540         libsystemd-network.la \
2541         libsystemd-internal.la \
2542         libsystemd-shared.la
2543
2544 test_dhcp_client_SOURCES = \
2545         src/systemd/sd-dhcp-client.h \
2546         src/libsystemd-network/dhcp-protocol.h \
2547         src/libsystemd-network/dhcp-internal.h \
2548         src/libsystemd-network/test-dhcp-client.c
2549
2550 test_dhcp_client_LDADD = \
2551         libsystemd-network.la \
2552         libsystemd-label.la \
2553         libsystemd-internal.la \
2554         libsystemd-shared.la
2555
2556 test_ipv4ll_SOURCES = \
2557         src/systemd/sd-ipv4ll.h \
2558         src/libsystemd-network/ipv4ll-internal.h \
2559         src/libsystemd-network/test-ipv4ll.c
2560
2561 test_ipv4ll_LDADD = \
2562         libsystemd-network.la \
2563         libsystemd-label.la \
2564         libsystemd-internal.la \
2565         libsystemd-shared.la
2566
2567 tests += \
2568         test-dhcp-option \
2569         test-dhcp-client \
2570         test-ipv4ll
2571
2572 # ------------------------------------------------------------------------------
2573 if ENABLE_GTK_DOC
2574 SUBDIRS += \
2575         docs/libudev
2576
2577 noinst_DATA += \
2578         docs/html/libudev \
2579         docs/html/gudev
2580 endif
2581
2582 include_HEADERS += \
2583         src/libudev/libudev.h
2584
2585 lib_LTLIBRARIES += \
2586         libudev.la
2587
2588 libudev_la_SOURCES =\
2589         src/libudev/libudev.sym \
2590         src/libudev/libudev-private.h \
2591         src/libudev/libudev.c \
2592         src/libudev/libudev-list.c \
2593         src/libudev/libudev-util.c \
2594         src/libudev/libudev-device.c \
2595         src/libudev/libudev-enumerate.c \
2596         src/libudev/libudev-monitor.c \
2597         src/libudev/libudev-queue.c \
2598         src/libudev/libudev-hwdb-def.h \
2599         src/libudev/libudev-hwdb.c
2600
2601 libudev_la_CFLAGS = \
2602         $(AM_CFLAGS) \
2603         -fvisibility=hidden
2604
2605 libudev_la_LDFLAGS = \
2606         $(AM_LDFLAGS) \
2607         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
2608         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
2609
2610 libudev_la_LIBADD = \
2611         libsystemd-internal.la \
2612         libsystemd-shared.la
2613
2614 pkgconfiglib_DATA += \
2615         src/libudev/libudev.pc
2616
2617 EXTRA_DIST += \
2618         src/libudev/libudev.pc.in
2619
2620 CLEANFILES += \
2621         src/libudev/libudev.pc \
2622         docs/html/libudev \
2623         docs/html/gudev
2624
2625 docs/html/libudev:
2626         $(AM_V_at)$(MKDIR_P) $(dir $@)
2627         $(AM_V_LN)$(LN_S) -f ../libudev/html $@
2628
2629 docs/html/gudev:
2630         $(AM_V_at)$(MKDIR_P) $(dir $@)
2631         $(AM_V_LN)$(LN_S) -f ../gudev/html $@
2632
2633 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2634 libudev-install-hook:
2635         libname=libudev.so && $(move-to-rootlibdir)
2636
2637 libudev-uninstall-hook:
2638         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
2639
2640 INSTALL_EXEC_HOOKS += libudev-install-hook
2641 UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
2642
2643 # ------------------------------------------------------------------------------
2644 noinst_LTLIBRARIES += \
2645         libudev-internal.la
2646
2647 libudev_internal_la_SOURCES =\
2648         $(libudev_la_SOURCES) \
2649         src/libudev/libudev-device-private.c
2650
2651 libudev_internal_la_CFLAGS = \
2652         $(AM_CFLAGS) \
2653         -fvisibility=default
2654
2655 # ------------------------------------------------------------------------------
2656 INSTALL_DIRS += \
2657         $(sysconfdir)/udev/rules.d \
2658         $(sysconfdir)/udev/hwdb.d
2659
2660 dist_network_DATA = \
2661         network/99-default.link \
2662         network/80-container-host0.network \
2663         network/80-container-ve.network
2664
2665 dist_udevrules_DATA += \
2666         rules/42-usb-hid-pm.rules \
2667         rules/50-udev-default.rules \
2668         rules/60-drm.rules \
2669         rules/60-keyboard.rules \
2670         rules/60-persistent-storage-tape.rules \
2671         rules/60-persistent-serial.rules \
2672         rules/60-persistent-input.rules \
2673         rules/60-persistent-alsa.rules \
2674         rules/60-persistent-storage.rules \
2675         rules/64-btrfs.rules \
2676         rules/75-net-description.rules \
2677         rules/75-tty-description.rules \
2678         rules/78-sound-card.rules \
2679         rules/80-net-setup-link.rules \
2680         rules/95-udev-late.rules
2681
2682 nodist_udevrules_DATA += \
2683         rules/99-systemd.rules
2684
2685 dist_udevhwdb_DATA = \
2686         hwdb/20-pci-vendor-model.hwdb \
2687         hwdb/20-pci-classes.hwdb \
2688         hwdb/20-usb-vendor-model.hwdb \
2689         hwdb/20-usb-classes.hwdb \
2690         hwdb/20-sdio-vendor-model.hwdb \
2691         hwdb/20-sdio-classes.hwdb \
2692         hwdb/20-bluetooth-vendor-product.hwdb \
2693         hwdb/20-acpi-vendor.hwdb \
2694         hwdb/20-OUI.hwdb \
2695         hwdb/20-net-ifname.hwdb \
2696         hwdb/60-keyboard.hwdb
2697
2698 udevconfdir = $(sysconfdir)/udev
2699 dist_udevconf_DATA = \
2700         src/udev/udev.conf
2701
2702 sharepkgconfigdir = $(datadir)/pkgconfig
2703 sharepkgconfig_DATA = \
2704         src/udev/udev.pc
2705
2706 EXTRA_DIST += \
2707         rules/99-systemd.rules.in \
2708         src/udev/udev.pc.in
2709
2710 CLEANFILES += \
2711         rules/99-systemd.rules \
2712         src/udev/udev.pc
2713
2714 EXTRA_DIST += \
2715         units/systemd-udevd.service.in \
2716         units/systemd-udev-trigger.service.in \
2717         units/systemd-udev-settle.service.in
2718
2719 CLEANFILES += \
2720         units/systemd-udevd.service \
2721         units/systemd-udev-trigger.service \
2722         units/systemd-udev-settle.service
2723
2724 SOCKETS_TARGET_WANTS += \
2725         systemd-udevd-control.socket \
2726         systemd-udevd-kernel.socket
2727 SYSINIT_TARGET_WANTS += \
2728         systemd-udevd.service \
2729         systemd-udev-trigger.service
2730
2731 rootbin_PROGRAMS += \
2732         udevadm
2733
2734 rootlibexec_PROGRAMS += \
2735         systemd-udevd
2736
2737 noinst_LTLIBRARIES += \
2738         libudev-core.la
2739
2740 src/udev/keyboard-keys.txt:
2741         $(AM_V_at)$(MKDIR_P) $(dir $@)
2742         $(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/' > $@
2743
2744 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt
2745         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
2746
2747 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
2748         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
2749
2750 src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt
2751         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
2752
2753 libudev_core_la_SOURCES = \
2754         src/udev/udev.h \
2755         src/udev/udev-event.c \
2756         src/udev/udev-watch.c \
2757         src/udev/udev-node.c \
2758         src/udev/udev-rules.c \
2759         src/udev/udev-ctrl.c \
2760         src/udev/udev-builtin.c \
2761         src/udev/udev-builtin-btrfs.c \
2762         src/udev/udev-builtin-hwdb.c \
2763         src/udev/udev-builtin-input_id.c \
2764         src/udev/udev-builtin-keyboard.c \
2765         src/udev/udev-builtin-net_id.c \
2766         src/udev/udev-builtin-net_setup_link.c \
2767         src/udev/udev-builtin-path_id.c \
2768         src/udev/udev-builtin-usb_id.c \
2769         src/udev/net/link-config.h \
2770         src/udev/net/link-config.c \
2771         src/udev/net/ethtool-util.h \
2772         src/udev/net/ethtool-util.c
2773
2774 nodist_libudev_core_la_SOURCES = \
2775         src/udev/keyboard-keys-from-name.h \
2776         src/udev/keyboard-keys-to-name.h \
2777         src/udev/net/link-config-gperf.c
2778
2779 BUILT_SOURCES += \
2780         $(nodist_libudev_core_la_SOURCES)
2781
2782 CLEANFILES += \
2783         src/udev/keyboard-keys-from-name.gperf \
2784         src/udev/keyboard-keys.txt \
2785         src/udev/net/link-config-gperf.c
2786
2787 EXTRA_DIST += \
2788         src/udev/net/link-config-gperf.gperf
2789
2790 libudev_core_la_CFLAGS = \
2791         $(AM_CFLAGS) \
2792         $(BLKID_CFLAGS) \
2793         $(KMOD_CFLAGS)
2794
2795 libudev_core_la_LIBADD = \
2796         libudev-internal.la \
2797         libsystemd-label.la \
2798         libsystemd-internal.la \
2799         libsystemd-network.la \
2800         libsystemd-shared.la \
2801         $(BLKID_LIBS) \
2802         $(KMOD_LIBS)
2803
2804 libudev_core_la_CPPFLAGS = \
2805         $(AM_CPPFLAGS) \
2806         -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
2807
2808 if ENABLE_FIRMWARE
2809 libudev_core_la_SOURCES += \
2810         src/udev/udev-builtin-firmware.c
2811
2812 dist_udevrules_DATA += \
2813         rules/50-firmware.rules
2814 endif
2815
2816 if HAVE_KMOD
2817 libudev_core_la_SOURCES += \
2818         src/udev/udev-builtin-kmod.c
2819
2820 dist_udevrules_DATA += \
2821         rules/80-drivers.rules
2822 endif
2823
2824 if HAVE_BLKID
2825 libudev_core_la_SOURCES += \
2826         src/udev/udev-builtin-blkid.c
2827 endif
2828
2829 if HAVE_ACL
2830 libudev_core_la_SOURCES += \
2831         src/udev/udev-builtin-uaccess.c \
2832         src/login/logind-acl.c \
2833         src/libsystemd/sd-login/sd-login.c \
2834         src/systemd/sd-login.h
2835
2836 libudev_core_la_LIBADD += \
2837         libsystemd-acl.la
2838 endif
2839
2840 systemd_udevd_SOURCES = \
2841         src/udev/udevd.c
2842
2843 systemd_udevd_LDADD = \
2844         libudev-core.la
2845
2846 udevadm_SOURCES = \
2847         src/udev/udevadm.c \
2848         src/udev/udevadm-info.c \
2849         src/udev/udevadm-control.c \
2850         src/udev/udevadm-monitor.c \
2851         src/udev/udevadm-hwdb.c \
2852         src/udev/udevadm-settle.c \
2853         src/udev/udevadm-trigger.c \
2854         src/udev/udevadm-test.c \
2855         src/udev/udevadm-test-builtin.c
2856
2857 udevadm_LDADD = \
2858         libudev-core.la
2859
2860 # Update hwdb on installation. Do not bother if installing
2861 # in DESTDIR, since this is likely for packaging purposes.
2862 hwdb-update-hook:
2863         -test -n "$(DESTDIR)" || $(rootbindir)/udevadm hwdb --update
2864
2865 INSTALL_DATA_HOOKS += \
2866         hwdb-update-hook
2867
2868 hwdb-remove-hook:
2869         -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
2870
2871 # ------------------------------------------------------------------------------
2872 TESTS += \
2873         test/udev-test.pl \
2874         test/rules-test.sh
2875
2876 manual_tests += \
2877         test-libudev \
2878         test-udev
2879
2880 test_libudev_SOURCES = \
2881         src/test/test-libudev.c
2882
2883 test_libudev_LDADD = \
2884         libsystemd-label.la \
2885         libudev-internal.la \
2886         libsystemd-shared.la
2887
2888 test_udev_SOURCES = \
2889         src/test/test-udev.c
2890
2891 test_udev_LDADD = \
2892         libudev-core.la \
2893         $(BLKID_LIBS) \
2894         $(KMOD_LIBS) \
2895         $(SELINUX_LIBS)
2896
2897 if HAVE_ACL
2898 test_udev_LDADD += \
2899         libsystemd-acl.la
2900 endif
2901
2902 check_DATA += \
2903         test/sys
2904
2905 # packed sysfs test tree
2906 test/sys:
2907         $(AM_V_at)$(MKDIR_P) $(dir $@)
2908         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
2909
2910 test-sys-distclean:
2911         -rm -rf test/sys
2912 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
2913
2914 EXTRA_DIST += \
2915         test/sys.tar.xz \
2916         test/udev-test.pl \
2917         test/rules-test.sh \
2918         test/rule-syntax-check.py
2919
2920 # ------------------------------------------------------------------------------
2921 ata_id_SOURCES = \
2922         src/udev/ata_id/ata_id.c
2923
2924 ata_id_LDADD = \
2925         libudev-internal.la \
2926         libsystemd-shared.la
2927
2928 udevlibexec_PROGRAMS += \
2929         ata_id
2930
2931 # ------------------------------------------------------------------------------
2932 cdrom_id_SOURCES = \
2933         src/udev/cdrom_id/cdrom_id.c
2934
2935 cdrom_id_LDADD = \
2936         libudev-internal.la \
2937         libsystemd-shared.la
2938
2939 udevlibexec_PROGRAMS += \
2940         cdrom_id
2941
2942 dist_udevrules_DATA += \
2943         rules/60-cdrom_id.rules
2944
2945 # ------------------------------------------------------------------------------
2946 collect_SOURCES = \
2947         src/udev/collect/collect.c
2948
2949 collect_LDADD = \
2950         libudev-internal.la \
2951         libsystemd-shared.la
2952
2953 udevlibexec_PROGRAMS += \
2954         collect
2955
2956 # ------------------------------------------------------------------------------
2957 scsi_id_SOURCES =\
2958         src/udev/scsi_id/scsi_id.c \
2959         src/udev/scsi_id/scsi_serial.c \
2960         src/udev/scsi_id/scsi.h \
2961         src/udev/scsi_id/scsi_id.h
2962
2963 scsi_id_LDADD = \
2964         libudev-internal.la \
2965         libsystemd-shared.la
2966
2967 udevlibexec_PROGRAMS += \
2968         scsi_id
2969
2970 EXTRA_DIST += \
2971         src/udev/scsi_id/README
2972
2973 # ------------------------------------------------------------------------------
2974 v4l_id_SOURCES = \
2975         src/udev/v4l_id/v4l_id.c
2976
2977 v4l_id_LDADD = \
2978         libudev-internal.la
2979
2980 udevlibexec_PROGRAMS += \
2981         v4l_id
2982
2983 dist_udevrules_DATA += \
2984         rules/60-persistent-v4l.rules
2985
2986 # ------------------------------------------------------------------------------
2987 accelerometer_SOURCES = \
2988         src/udev/accelerometer/accelerometer.c
2989
2990 accelerometer_LDADD = \
2991         libudev-internal.la -lm \
2992         libsystemd-shared.la
2993
2994 udevlibexec_PROGRAMS += \
2995         accelerometer
2996
2997 dist_udevrules_DATA += \
2998         rules/61-accelerometer.rules
2999
3000 # ------------------------------------------------------------------------------
3001 if ENABLE_GUDEV
3002 if ENABLE_GTK_DOC
3003 SUBDIRS += \
3004         docs/gudev
3005 endif
3006
3007 libgudev_includedir = \
3008         $(includedir)/gudev-1.0/gudev
3009
3010 libgudev_include_HEADERS = \
3011         src/gudev/gudev.h \
3012         src/gudev/gudevenums.h \
3013         src/gudev/gudevenumtypes.h \
3014         src/gudev/gudevtypes.h \
3015         src/gudev/gudevclient.h \
3016         src/gudev/gudevdevice.h \
3017         src/gudev/gudevenumerator.h
3018
3019 lib_LTLIBRARIES += libgudev-1.0.la
3020
3021 pkgconfiglib_DATA += \
3022         src/gudev/gudev-1.0.pc
3023
3024 CLEANFILES += \
3025         src/gudev/gudev-1.0.pc
3026
3027 libgudev_1_0_la_SOURCES = \
3028         src/gudev/gudevenums.h \
3029         src/gudev/gudevenumtypes.h \
3030         src/gudev/gudevenumtypes.h\
3031         src/gudev/gudevtypes.h \
3032         src/gudev/gudevclient.h \
3033         src/gudev/gudevclient.c \
3034         src/gudev/gudevdevice.h \
3035         src/gudev/gudevdevice.c \
3036         src/gudev/gudevenumerator.h \
3037         src/gudev/gudevenumerator.c \
3038         src/gudev/gudevprivate.h
3039
3040 nodist_libgudev_1_0_la_SOURCES = \
3041         src/gudev/gudevmarshal.h \
3042         src/gudev/gudevmarshal.c \
3043         src/gudev/gudevenumtypes.h \
3044         src/gudev/gudevenumtypes.c
3045
3046 BUILT_SOURCES += \
3047         $(nodist_libgudev_1_0_la_SOURCES)
3048
3049 libgudev_1_0_la_CPPFLAGS = \
3050         $(AM_CPPFLAGS) \
3051         -I$(top_builddir)/src\
3052         -I$(top_srcdir)/src\
3053         -I$(top_builddir)/src/gudev \
3054         -I$(top_srcdir)/src/gudev \
3055         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
3056         -D_GUDEV_COMPILATION \
3057         -DG_LOG_DOMAIN=\"GUdev\"
3058
3059 libgudev_1_0_la_CFLAGS = \
3060         $(AM_CFLAGS) \
3061         -fvisibility=default \
3062         $(GLIB_CFLAGS)
3063
3064 libgudev_1_0_la_LIBADD = \
3065         libudev.la \
3066         $(GLIB_LIBS)
3067
3068 libgudev_1_0_la_LDFLAGS = \
3069         $(AM_LDFLAGS) \
3070         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
3071         -export-dynamic -no-undefined \
3072         -export-symbols-regex '^g_udev_.*'
3073
3074 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
3075         $(AM_V_at)$(MKDIR_P) $(dir $@)
3076         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
3077
3078 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
3079         $(AM_V_at)$(MKDIR_P) $(dir $@)
3080         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
3081         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
3082
3083 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
3084         $(AM_V_at)$(MKDIR_P) $(dir $@)
3085         $(AM_V_GEN)glib-mkenums --template $^ > $@
3086
3087 if HAVE_INTROSPECTION
3088 -include $(INTROSPECTION_MAKEFILE)
3089
3090 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
3091
3092 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
3093
3094 src_gudev_GUdev_1_0_gir_CFLAGS = \
3095         $(AM_CFLAGS) \
3096         $(INCLUDES) \
3097         -D_GUDEV_COMPILATION \
3098         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
3099         -I$(top_srcdir)/src \
3100         -I$(top_builddir)/src \
3101         -I$(top_srcdir)/src/gudev \
3102         -I$(top_builddir)/src/gudev
3103
3104 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
3105
3106 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
3107         --pkg-export=gudev-1.0 \
3108         --warn-all
3109
3110 src_gudev_GUdev_1_0_gir_FILES = \
3111         src/gudev/gudev.h \
3112         src/gudev/gudevtypes.h \
3113         src/gudev/gudevenums.h \
3114         src/gudev/gudevenumtypes.h \
3115         src/gudev/gudevclient.h \
3116         src/gudev/gudevdevice.h \
3117         src/gudev/gudevenumerator.h \
3118         src/gudev/gudevclient.c \
3119         src/gudev/gudevdevice.c \
3120         src/gudev/gudevenumerator.c
3121
3122 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
3123 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
3124
3125 girdir = $(datadir)/gir-1.0
3126 gir_DATA = \
3127         src/gudev/GUdev-1.0.gir
3128
3129 typelibsdir = $(libdir)/girepository-1.0
3130 typelibs_DATA = \
3131         src/gudev/GUdev-1.0.typelib
3132
3133 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
3134 endif # HAVE_INTROSPECTION
3135
3136 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
3137 libgudev-install-hook:
3138         libname=libgudev-1.0.so && $(move-to-rootlibdir)
3139
3140 libgudev-uninstall-hook:
3141         rm -f $(DESTDIR)$(rootlibdir)/libgudev-1.0.so*
3142
3143 INSTALL_EXEC_HOOKS += libgudev-install-hook
3144 UNINSTALL_EXEC_HOOKS += libgudev-uninstall-hook
3145 endif
3146
3147 EXTRA_DIST += \
3148         src/gudev/gudev-1.0.pc.in \
3149         src/gudev/gudevmarshal.list \
3150         src/gudev/gudevenumtypes.h.template \
3151         src/gudev/gudevenumtypes.c.template \
3152         src/gudev/gjs-example.js \
3153         src/gudev/seed-example-enum.js \
3154         src/gudev/seed-example.js
3155
3156 # ------------------------------------------------------------------------------
3157 mtd_probe_SOURCES =  \
3158         src/udev/mtd_probe/mtd_probe.c \
3159         src/udev/mtd_probe/mtd_probe.h \
3160         src/udev/mtd_probe/probe_smartmedia.c
3161
3162 dist_udevrules_DATA += \
3163         rules/75-probe_mtd.rules
3164
3165 udevlibexec_PROGRAMS += \
3166         mtd_probe
3167
3168 # ------------------------------------------------------------------------------
3169 test_id128_SOURCES = \
3170         src/test/test-id128.c
3171
3172 test_id128_LDADD = \
3173         libsystemd-internal.la \
3174         libsystemd-shared.la
3175
3176 tests += \
3177         test-id128
3178
3179 # ------------------------------------------------------------------------------
3180
3181 rootlibexec_PROGRAMS += \
3182         systemd-activate
3183
3184 systemd_activate_SOURCES = \
3185         src/activate/activate.c
3186
3187 systemd_activate_LDADD = \
3188         libsystemd-label.la \
3189         libsystemd-internal.la \
3190         libsystemd-shared.la
3191
3192 # ------------------------------------------------------------------------------
3193 systemd_journald_SOURCES = \
3194         src/journal/journald.c \
3195         src/journal/journald-server.h
3196
3197 systemd_journald_LDADD = \
3198         libsystemd-journal-core.la \
3199         libsystemd-internal.la \
3200         libsystemd-shared.la
3201
3202 systemd_cat_SOURCES = \
3203         src/journal/cat.c
3204
3205 systemd_cat_LDADD = \
3206         libsystemd-journal-core.la
3207
3208 if HAVE_MICROHTTPD
3209 rootlibexec_PROGRAMS += \
3210         systemd-journal-remote
3211
3212 systemd_journal_remote_SOURCES = \
3213         src/journal/journal-remote-parse.h \
3214         src/journal/journal-remote-parse.c \
3215         src/journal/journal-remote-write.h \
3216         src/journal/journal-remote-write.c \
3217         src/journal/journal-remote.c
3218
3219 systemd_journal_remote_LDADD = \
3220         libsystemd-internal.la \
3221         libsystemd-journal-core.la
3222
3223 systemd_journal_remote_SOURCES += \
3224         src/journal/microhttpd-util.h \
3225         src/journal/microhttpd-util.c
3226
3227 systemd_journal_remote_CFLAGS = \
3228         $(AM_CFLAGS) \
3229         $(MICROHTTPD_CFLAGS)
3230
3231 systemd_journal_remote_LDADD += \
3232         $(MICROHTTPD_LIBS)
3233
3234 if HAVE_GNUTLS
3235 systemd_journal_remote_LDADD += \
3236         $(GNUTLS_LIBS)
3237 endif
3238 endif
3239
3240 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
3241 journalctl_CFLAGS = \
3242         $(AM_CFLAGS)
3243
3244 journalctl_SOURCES = \
3245         src/journal/journalctl.c
3246
3247 journalctl_LDADD = \
3248         libsystemd-journal-internal.la \
3249         libsystemd-internal.la \
3250         libsystemd-logs.la \
3251         libsystemd-shared.la
3252
3253 if HAVE_ACL
3254 journalctl_LDADD += \
3255         libsystemd-acl.la
3256 endif
3257
3258 if HAVE_QRENCODE
3259 journalctl_SOURCES += \
3260         src/journal/journal-qrcode.c \
3261         src/journal/journal-qrcode.h
3262
3263 journalctl_CFLAGS += \
3264         $(QRENCODE_CFLAGS)
3265
3266 journalctl_LDADD += \
3267         $(QRENCODE_LIBS)
3268 endif
3269
3270 test_journal_SOURCES = \
3271         src/journal/test-journal.c
3272
3273 test_journal_LDADD = \
3274         libsystemd-journal-core.la
3275
3276 test_journal_send_SOURCES = \
3277         src/journal/test-journal-send.c
3278
3279 test_journal_send_LDADD = \
3280         libsystemd-journal-core.la
3281
3282 test_journal_syslog_SOURCES = \
3283         src/journal/test-journal-syslog.c
3284
3285 test_journal_syslog_LDADD = \
3286         libsystemd-journal-core.la
3287
3288 test_journal_match_SOURCES = \
3289         src/journal/test-journal-match.c
3290
3291 test_journal_match_LDADD = \
3292         libsystemd-journal-core.la
3293
3294 test_journal_enum_SOURCES = \
3295         src/journal/test-journal-enum.c
3296
3297 test_journal_enum_LDADD = \
3298         libsystemd-journal-core.la
3299
3300 test_journal_stream_SOURCES = \
3301         src/journal/test-journal-stream.c
3302
3303 test_journal_stream_LDADD = \
3304         libsystemd-journal-core.la
3305
3306 test_journal_flush_SOURCES = \
3307         src/journal/test-journal-flush.c
3308
3309 test_journal_flush_LDADD = \
3310         libsystemd-journal-core.la
3311
3312 test_journal_init_SOURCES = \
3313         src/journal/test-journal-init.c
3314
3315 test_journal_init_LDADD = \
3316         libsystemd-journal-core.la
3317
3318 test_journal_verify_SOURCES = \
3319         src/journal/test-journal-verify.c
3320
3321 test_journal_verify_LDADD = \
3322         libsystemd-journal-core.la
3323
3324 test_journal_interleaving_SOURCES = \
3325         src/journal/test-journal-interleaving.c
3326
3327 test_journal_interleaving_LDADD = \
3328         libsystemd-journal-core.la
3329
3330 test_mmap_cache_SOURCES = \
3331         src/journal/test-mmap-cache.c
3332
3333 test_mmap_cache_LDADD = \
3334         libsystemd-journal-core.la
3335
3336 test_catalog_SOURCES = \
3337         src/journal/test-catalog.c
3338
3339 test_catalog_CPPFLAGS = \
3340         $(AM_CPPFLAGS) \
3341         -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
3342
3343 test_catalog_LDADD = \
3344         libsystemd-journal-core.la
3345
3346 libsystemd_journal_core_la_SOURCES = \
3347         src/journal/journald-kmsg.c \
3348         src/journal/journald-kmsg.h \
3349         src/journal/journald-syslog.c \
3350         src/journal/journald-syslog.h \
3351         src/journal/journald-stream.c \
3352         src/journal/journald-stream.h \
3353         src/journal/journald-server.c \
3354         src/journal/journald-server.h \
3355         src/journal/journald-console.c \
3356         src/journal/journald-console.h \
3357         src/journal/journald-wall.c \
3358         src/journal/journald-wall.h \
3359         src/journal/journald-native.c \
3360         src/journal/journald-native.h \
3361         src/journal/journald-rate-limit.c \
3362         src/journal/journald-rate-limit.h \
3363         src/journal/journal-internal.h
3364
3365 nodist_libsystemd_journal_core_la_SOURCES = \
3366         src/journal/journald-gperf.c
3367
3368 libsystemd_journal_core_la_LIBADD = \
3369         libsystemd-journal-internal.la \
3370         libudev-internal.la \
3371         libsystemd-capability.la \
3372         libsystemd-label.la \
3373         libsystemd-internal.la \
3374         libsystemd-shared.la
3375
3376 if HAVE_ACL
3377 libsystemd_journal_core_la_LIBADD += \
3378         libsystemd-acl.la
3379 endif
3380
3381 noinst_LTLIBRARIES += \
3382         libsystemd-journal-core.la
3383
3384 journal-install-hook:
3385         -$(MKDIR_P) $(DESTDIR)/var/log/journal
3386         -chown 0:0 $(DESTDIR)/var/log/journal
3387         -chmod 755 $(DESTDIR)/var/log/journal
3388         -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
3389         -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
3390
3391 journal-uninstall-hook:
3392         -rmdir $(DESTDIR)/var/log/journal/
3393
3394 INSTALL_EXEC_HOOKS += journal-install-hook
3395 UNINSTALL_EXEC_HOOKS += journal-uninstall-hook
3396
3397 # ------------------------------------------------------------------------------
3398 # Update catalog on installation. Do not bother if installing
3399 # in DESTDIR, since this is likely for packaging purposes.
3400 catalog-update-hook:
3401         -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
3402
3403 INSTALL_DATA_HOOKS += \
3404         catalog-update-hook
3405
3406 catalog-remove-hook:
3407         -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
3408
3409 UNINSTALL_DATA_HOOKS += \
3410         catalog-remove-hook
3411
3412 manual_tests += \
3413         test-journal-enum
3414
3415 tests += \
3416         test-journal \
3417         test-journal-send \
3418         test-journal-syslog \
3419         test-journal-match \
3420         test-journal-stream \
3421         test-journal-init \
3422         test-journal-verify \
3423         test-journal-interleaving \
3424         test-journal-flush \
3425         test-mmap-cache \
3426         test-catalog
3427
3428 pkginclude_HEADERS += \
3429         src/systemd/sd-journal.h \
3430         src/systemd/sd-messages.h \
3431         src/systemd/_sd-common.h
3432
3433 libsystemd_journal_internal_la_SOURCES = \
3434         src/journal/sd-journal.c \
3435         src/systemd/sd-journal.h \
3436         src/systemd/_sd-common.h \
3437         src/journal/journal-file.c \
3438         src/journal/journal-file.h \
3439         src/journal/journal-vacuum.c \
3440         src/journal/journal-vacuum.h \
3441         src/journal/journal-verify.c \
3442         src/journal/journal-verify.h \
3443         src/journal/lookup3.c \
3444         src/journal/lookup3.h \
3445         src/journal/journal-send.c \
3446         src/journal/journal-def.h \
3447         src/journal/compress.h \
3448         src/journal/catalog.c \
3449         src/journal/catalog.h \
3450         src/journal/mmap-cache.c \
3451         src/journal/mmap-cache.h
3452
3453 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
3454 libsystemd_journal_internal_la_CFLAGS =
3455         $(AM_CFLAGS)
3456
3457 libsystemd_journal_internal_la_LIBADD =
3458
3459 if HAVE_XZ
3460 libsystemd_journal_internal_la_SOURCES += \
3461         src/journal/compress.c
3462
3463 libsystemd_journal_internal_la_CFLAGS += \
3464         $(XZ_CFLAGS)
3465
3466 libsystemd_journal_internal_la_LIBADD += \
3467         $(XZ_LIBS)
3468 endif
3469
3470 if HAVE_GCRYPT
3471 libsystemd_journal_internal_la_SOURCES += \
3472         src/journal/journal-authenticate.c \
3473         src/journal/journal-authenticate.h \
3474         src/journal/fsprg.c \
3475         src/journal/fsprg.h
3476
3477 libsystemd_journal_internal_la_LIBADD += \
3478         $(GCRYPT_LIBS)
3479
3480 # fsprg.c is a drop-in file using void pointer arithmetic
3481 libsystemd_journal_internal_la_CFLAGS += \
3482         $(GCRYPT_CFLAGS) \
3483         -Wno-pointer-arith
3484 endif
3485
3486 noinst_LTLIBRARIES += \
3487         libsystemd-journal-internal.la
3488
3489 rootlibexec_PROGRAMS += \
3490         systemd-journald
3491
3492 rootbin_PROGRAMS += \
3493         journalctl
3494
3495 bin_PROGRAMS += \
3496         systemd-cat
3497
3498 dist_systemunit_DATA += \
3499         units/systemd-journald.socket \
3500         units/systemd-journald-dev-log.socket
3501
3502 nodist_systemunit_DATA += \
3503         units/systemd-journald.service \
3504         units/systemd-journal-flush.service
3505
3506 dist_pkgsysconf_DATA += \
3507         src/journal/journald.conf
3508
3509 dist_catalog_DATA = \
3510         catalog/systemd.fr.catalog \
3511         catalog/systemd.ru.catalog \
3512         catalog/systemd.it.catalog \
3513         catalog/systemd.catalog
3514
3515 SOCKETS_TARGET_WANTS += \
3516         systemd-journald.socket \
3517         systemd-journald-dev-log.socket
3518
3519 SYSINIT_TARGET_WANTS += \
3520         systemd-journald.service \
3521         systemd-journal-flush.service
3522
3523 EXTRA_DIST += \
3524         units/systemd-journald.service.in \
3525         units/systemd-journal-flush.service.in \
3526         src/journal/journald-gperf.gperf
3527
3528 CLEANFILES += \
3529         src/journal/journald-gperf.c
3530
3531 # ------------------------------------------------------------------------------
3532 if HAVE_MICROHTTPD
3533 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
3534
3535 rootlibexec_PROGRAMS += \
3536         systemd-journal-gatewayd
3537
3538 systemd_journal_gatewayd_SOURCES = \
3539         src/journal/journal-gatewayd.c \
3540         src/journal/microhttpd-util.h \
3541         src/journal/microhttpd-util.c
3542
3543 systemd_journal_gatewayd_LDADD = \
3544         libsystemd-logs.la \
3545         libsystemd-journal-internal.la \
3546         libsystemd-internal.la \
3547         libsystemd-shared.la \
3548         $(MICROHTTPD_LIBS)
3549
3550 if HAVE_GNUTLS
3551 systemd_journal_gatewayd_LDADD += \
3552         $(GNUTLS_LIBS)
3553 endif
3554
3555 systemd_journal_gatewayd_CFLAGS = \
3556         $(AM_CFLAGS) \
3557         $(MICROHTTPD_CFLAGS)
3558
3559 systemd_journal_gatewayd_CPPFLAGS = \
3560         $(AM_CPPFLAGS) \
3561         -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
3562
3563 dist_systemunit_DATA += \
3564         units/systemd-journal-gatewayd.socket
3565
3566 nodist_systemunit_DATA += \
3567         units/systemd-journal-gatewayd.service
3568
3569 dist_gatewayddocumentroot_DATA = \
3570         src/journal/browse.html
3571
3572 endif
3573
3574 EXTRA_DIST += \
3575         units/systemd-journal-gatewayd.service.in
3576
3577 # ------------------------------------------------------------------------------
3578
3579 systemd_socket_proxyd_SOURCES = \
3580         src/socket-proxy/socket-proxyd.c
3581
3582 systemd_socket_proxyd_LDADD = \
3583         libsystemd-logs.la \
3584         libsystemd-internal.la \
3585         libsystemd-journal-internal.la \
3586         libsystemd-shared.la \
3587         libsystemd-resolve.la
3588
3589 # ------------------------------------------------------------------------------
3590 if ENABLE_COREDUMP
3591 systemd_coredump_SOURCES = \
3592         src/journal/coredump.c
3593
3594 systemd_coredump_LDADD = \
3595         libsystemd-journal-internal.la \
3596         libsystemd-label.la \
3597         libsystemd-internal.la \
3598         libsystemd-shared.la
3599
3600 rootlibexec_PROGRAMS += \
3601         systemd-coredump
3602
3603 systemd_coredumpctl_SOURCES = \
3604         src/journal/coredumpctl.c
3605
3606 systemd_coredumpctl_LDADD = \
3607         libsystemd-journal-internal.la \
3608         libsystemd-internal.la \
3609         libsystemd-shared.la
3610
3611 bin_PROGRAMS += \
3612         systemd-coredumpctl
3613
3614 dist_bashcompletion_DATA += \
3615         shell-completion/bash/systemd-coredumpctl
3616
3617 dist_zshcompletion_DATA += \
3618         shell-completion/zsh/_systemd-coredumpctl
3619
3620 sysctl_DATA = \
3621         sysctl.d/50-coredump.conf
3622
3623 CLEANFILES += \
3624         sysctl.d/50-coredump.conf
3625 endif
3626
3627 EXTRA_DIST += \
3628         sysctl.d/50-coredump.conf.in
3629
3630 # ------------------------------------------------------------------------------
3631 if ENABLE_BINFMT
3632 systemd_binfmt_SOURCES = \
3633         src/binfmt/binfmt.c
3634
3635 systemd_binfmt_LDADD = \
3636         libsystemd-shared.la
3637
3638 rootlibexec_PROGRAMS += \
3639         systemd-binfmt
3640
3641 dist_systemunit_DATA += \
3642         units/proc-sys-fs-binfmt_misc.automount \
3643         units/proc-sys-fs-binfmt_misc.mount
3644
3645 nodist_systemunit_DATA += \
3646         units/systemd-binfmt.service
3647
3648 INSTALL_DIRS += \
3649         $(prefix)/lib/binfmt.d \
3650         $(sysconfdir)/binfmt.d
3651
3652 SYSINIT_TARGET_WANTS += \
3653         systemd-binfmt.service \
3654         proc-sys-fs-binfmt_misc.automount
3655
3656 endif
3657
3658 EXTRA_DIST += \
3659         units/systemd-binfmt.service.in
3660
3661 # ------------------------------------------------------------------------------
3662 if ENABLE_VCONSOLE
3663 systemd_vconsole_setup_SOURCES = \
3664         src/vconsole/vconsole-setup.c
3665
3666 systemd_vconsole_setup_LDADD = \
3667         libsystemd-shared.la
3668
3669 rootlibexec_PROGRAMS += \
3670         systemd-vconsole-setup
3671
3672 nodist_systemunit_DATA += \
3673         units/systemd-vconsole-setup.service
3674
3675 SYSINIT_TARGET_WANTS += \
3676         systemd-vconsole-setup.service
3677 endif
3678
3679 EXTRA_DIST += \
3680         units/systemd-vconsole-setup.service.in
3681
3682 # ------------------------------------------------------------------------------
3683 if ENABLE_READAHEAD
3684 systemd_readahead_SOURCES = \
3685         src/readahead/readahead.c \
3686         src/readahead/readahead-collect.c \
3687         src/readahead/readahead-replay.c \
3688         src/readahead/readahead-analyze.c \
3689         src/readahead/readahead-common.c \
3690         src/readahead/readahead-common.h
3691
3692 systemd_readahead_LDADD = \
3693         libsystemd-internal.la \
3694         libudev-internal.la \
3695         libsystemd-shared.la
3696
3697 dist_doc_DATA += \
3698         src/readahead/sd-readahead.c \
3699         src/systemd/sd-readahead.h
3700
3701 rootlibexec_PROGRAMS += \
3702         systemd-readahead
3703
3704 dist_systemunit_DATA += \
3705         units/systemd-readahead-drop.service \
3706         units/systemd-readahead-done.timer
3707
3708 nodist_systemunit_DATA += \
3709         units/systemd-readahead-collect.service \
3710         units/systemd-readahead-replay.service \
3711         units/systemd-readahead-done.service
3712
3713 manual_tests += \
3714         test-ssd
3715
3716 test_ssd_SOURCES = \
3717         src/readahead/test-ssd.c \
3718         src/readahead/readahead-common.c \
3719         src/readahead/readahead-common.h
3720
3721 test_ssd_LDADD = \
3722         libsystemd-internal.la \
3723         libudev-internal.la \
3724         libsystemd-shared.la
3725
3726 endif
3727
3728 EXTRA_DIST += \
3729         units/systemd-readahead-collect.service.in \
3730         units/systemd-readahead-replay.service.in \
3731         units/systemd-readahead-done.service.in
3732
3733 # ------------------------------------------------------------------------------
3734 if ENABLE_BOOTCHART
3735 systemd_bootchart_SOURCES = \
3736         src/bootchart/bootchart.c \
3737         src/bootchart/bootchart.h \
3738         src/bootchart/store.c \
3739         src/bootchart/store.h \
3740         src/bootchart/svg.c \
3741         src/bootchart/svg.h
3742
3743 systemd_bootchart_LDADD = \
3744         libsystemd-journal-internal.la \
3745         libsystemd-shared.la
3746
3747 rootlibexec_PROGRAMS += \
3748         systemd-bootchart
3749
3750 dist_pkgsysconf_DATA += \
3751         src/bootchart/bootchart.conf
3752 endif
3753
3754 # ------------------------------------------------------------------------------
3755 if ENABLE_QUOTACHECK
3756 rootlibexec_PROGRAMS += \
3757         systemd-quotacheck
3758
3759 nodist_systemunit_DATA += \
3760         units/systemd-quotacheck.service
3761
3762 systemd_quotacheck_SOURCES = \
3763         src/quotacheck/quotacheck.c
3764
3765 systemd_quotacheck_LDADD = \
3766         libsystemd-shared.la
3767 endif
3768
3769 EXTRA_DIST += \
3770         units/systemd-quotacheck.service.in
3771
3772 nodist_systemunit_DATA += \
3773         units/quotaon.service
3774
3775 # ------------------------------------------------------------------------------
3776 if ENABLE_RANDOMSEED
3777 rootlibexec_PROGRAMS += \
3778         systemd-random-seed
3779
3780 nodist_systemunit_DATA += \
3781         units/systemd-random-seed.service
3782
3783 systemd_random_seed_SOURCES = \
3784         src/random-seed/random-seed.c
3785
3786 systemd_random_seed_LDADD = \
3787         libsystemd-label.la \
3788         libsystemd-shared.la
3789
3790 SYSINIT_TARGET_WANTS += \
3791         systemd-random-seed.service
3792
3793 endif
3794
3795 EXTRA_DIST += \
3796         units/systemd-random-seed.service.in
3797
3798 # ------------------------------------------------------------------------------
3799 if ENABLE_BACKLIGHT
3800 rootlibexec_PROGRAMS += \
3801         systemd-backlight
3802
3803 nodist_systemunit_DATA += \
3804         units/systemd-backlight@.service
3805
3806 systemd_backlight_SOURCES = \
3807         src/backlight/backlight.c
3808
3809 systemd_backlight_LDADD = \
3810         libsystemd-label.la \
3811         libudev-internal.la \
3812         libsystemd-shared.la
3813 endif
3814
3815 EXTRA_DIST += \
3816         units/systemd-backlight@.service.in
3817
3818 # ------------------------------------------------------------------------------
3819 if ENABLE_RFKILL
3820 rootlibexec_PROGRAMS += \
3821         systemd-rfkill
3822
3823 nodist_systemunit_DATA += \
3824         units/systemd-rfkill@.service
3825
3826 systemd_rfkill_SOURCES = \
3827         src/rfkill/rfkill.c
3828
3829 systemd_rfkill_LDADD = \
3830         libsystemd-label.la \
3831         libudev-internal.la \
3832         libsystemd-shared.la
3833 endif
3834
3835 EXTRA_DIST += \
3836         units/systemd-rfkill@.service.in
3837
3838 # ------------------------------------------------------------------------------
3839 if HAVE_LIBCRYPTSETUP
3840 rootlibexec_PROGRAMS += \
3841         systemd-cryptsetup
3842
3843 systemgenerator_PROGRAMS += \
3844         systemd-cryptsetup-generator
3845
3846 dist_systemunit_DATA += \
3847         units/cryptsetup.target
3848
3849 systemd_cryptsetup_SOURCES = \
3850         src/cryptsetup/cryptsetup.c
3851
3852 systemd_cryptsetup_CFLAGS = \
3853         $(AM_CFLAGS) \
3854         $(LIBCRYPTSETUP_CFLAGS)
3855
3856 systemd_cryptsetup_LDADD = \
3857         libsystemd-label.la \
3858         libudev-internal.la \
3859         libsystemd-shared.la \
3860         $(LIBCRYPTSETUP_LIBS)
3861
3862 systemd_cryptsetup_generator_SOURCES = \
3863         src/cryptsetup/cryptsetup-generator.c
3864
3865 systemd_cryptsetup_generator_LDADD = \
3866         libsystemd-label.la \
3867         libsystemd-shared.la
3868
3869 SYSINIT_TARGET_WANTS += \
3870         cryptsetup.target
3871
3872 endif
3873
3874 # ------------------------------------------------------------------------------
3875 if ENABLE_HOSTNAMED
3876 systemd_hostnamed_SOURCES = \
3877         src/hostname/hostnamed.c
3878
3879 systemd_hostnamed_LDADD = \
3880         libsystemd-label.la \
3881         libsystemd-internal.la \
3882         libsystemd-shared.la
3883
3884 rootlibexec_PROGRAMS += \
3885         systemd-hostnamed
3886
3887 nodist_systemunit_DATA += \
3888         units/systemd-hostnamed.service
3889
3890 dist_systemunit_DATA += \
3891         units/org.freedesktop.hostname1.busname
3892
3893 dist_dbuspolicy_DATA += \
3894         src/hostname/org.freedesktop.hostname1.conf
3895
3896 dist_dbussystemservice_DATA += \
3897         src/hostname/org.freedesktop.hostname1.service
3898
3899 polkitpolicy_files += \
3900         src/hostname/org.freedesktop.hostname1.policy
3901
3902 SYSTEM_UNIT_ALIASES += \
3903         systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
3904
3905 BUSNAMES_TARGET_WANTS += \
3906         org.freedesktop.hostname1.busname
3907
3908 hostnamectl_SOURCES = \
3909         src/hostname/hostnamectl.c
3910
3911 hostnamectl_LDADD = \
3912         libsystemd-internal.la \
3913         libsystemd-shared.la
3914
3915 bin_PROGRAMS += \
3916         hostnamectl
3917
3918 dist_bashcompletion_DATA += \
3919         shell-completion/bash/hostnamectl
3920
3921 dist_zshcompletion_DATA += \
3922         shell-completion/zsh/_hostnamectl
3923
3924 endif
3925
3926 polkitpolicy_in_files += \
3927         src/hostname/org.freedesktop.hostname1.policy.in
3928
3929 EXTRA_DIST += \
3930         units/systemd-hostnamed.service.in
3931
3932 # ------------------------------------------------------------------------------
3933 if ENABLE_KDBUS
3934 dist_systemunit_DATA += \
3935         units/org.freedesktop.systemd1.busname
3936
3937 BUSNAMES_TARGET_WANTS += \
3938         org.freedesktop.systemd1.busname
3939 endif
3940
3941 # ------------------------------------------------------------------------------
3942 if ENABLE_LOCALED
3943 systemd_localed_SOURCES = \
3944         src/locale/localed.c
3945
3946 systemd_localed_LDADD = \
3947         libsystemd-label.la \
3948         libsystemd-internal.la \
3949         libsystemd-shared.la
3950
3951 nodist_systemunit_DATA += \
3952         units/systemd-localed.service
3953
3954 dist_systemunit_DATA += \
3955         units/org.freedesktop.locale1.busname
3956
3957 rootlibexec_PROGRAMS += \
3958         systemd-localed
3959
3960 dist_dbuspolicy_DATA += \
3961         src/locale/org.freedesktop.locale1.conf
3962
3963 dist_dbussystemservice_DATA += \
3964         src/locale/org.freedesktop.locale1.service
3965
3966 polkitpolicy_files += \
3967         src/locale/org.freedesktop.locale1.policy
3968
3969 SYSTEM_UNIT_ALIASES += \
3970         systemd-localed.service dbus-org.freedesktop.locale1.service
3971
3972 BUSNAMES_TARGET_WANTS += \
3973         org.freedesktop.locale1.busname
3974
3975 dist_pkgdata_DATA += \
3976         src/locale/kbd-model-map
3977
3978 dist_noinst_SCRIPT = \
3979         src/locale/generate-kbd-model-map
3980
3981 update-kbd-model-map: src/locale/generate-kbd-model-map
3982         $PYTHON $< >src/locale/kbd-model-map
3983
3984 localectl_SOURCES = \
3985         src/locale/localectl.c
3986
3987 localectl_LDADD = \
3988         libsystemd-internal.la \
3989         libsystemd-shared.la
3990
3991 bin_PROGRAMS += \
3992         localectl
3993
3994 dist_bashcompletion_DATA += \
3995         shell-completion/bash/localectl
3996
3997 dist_zshcompletion_DATA += \
3998         shell-completion/zsh/_localectl
3999
4000 endif
4001
4002 .PHONY: update-kbd-model-map
4003
4004 polkitpolicy_in_files += \
4005         src/locale/org.freedesktop.locale1.policy.in
4006
4007 EXTRA_DIST += \
4008         units/systemd-localed.service.in
4009
4010 # ------------------------------------------------------------------------------
4011 if ENABLE_TIMEDATED
4012 systemd_timedated_SOURCES = \
4013         src/timedate/timedated.c
4014
4015 systemd_timedated_LDADD = \
4016         libsystemd-label.la \
4017         libsystemd-internal.la \
4018         libsystemd-shared.la
4019
4020 rootlibexec_PROGRAMS += \
4021         systemd-timedated
4022
4023 dist_dbussystemservice_DATA += \
4024         src/timedate/org.freedesktop.timedate1.service
4025
4026 dist_dbuspolicy_DATA += \
4027         src/timedate/org.freedesktop.timedate1.conf
4028
4029 nodist_systemunit_DATA += \
4030         units/systemd-timedated.service
4031
4032 dist_systemunit_DATA += \
4033         units/org.freedesktop.timedate1.busname
4034
4035 polkitpolicy_files += \
4036         src/timedate/org.freedesktop.timedate1.policy
4037
4038 INSTALL_DIRS += \
4039         $(prefix)/lib/systemd/ntp-units.d \
4040         $(sysconfdir)/systemd/ntp-units.d
4041
4042 SYSTEM_UNIT_ALIASES += \
4043         systemd-timedated.service dbus-org.freedesktop.timedate1.service
4044
4045 BUSNAMES_TARGET_WANTS += \
4046         org.freedesktop.timedate1.busname
4047
4048 timedatectl_SOURCES = \
4049         src/timedate/timedatectl.c
4050
4051 timedatectl_LDADD = \
4052         libsystemd-internal.la \
4053         libsystemd-shared.la
4054
4055 bin_PROGRAMS += \
4056         timedatectl
4057
4058 dist_bashcompletion_DATA += \
4059         shell-completion/bash/timedatectl
4060
4061 dist_zshcompletion_DATA += \
4062         shell-completion/zsh/_timedatectl
4063 endif
4064
4065 polkitpolicy_in_files += \
4066         src/timedate/org.freedesktop.timedate1.policy.in
4067
4068 EXTRA_DIST += \
4069         units/systemd-timedated.service.in
4070
4071 # ------------------------------------------------------------------------------
4072 if ENABLE_TIMESYNCD
4073 systemd_timesyncd_SOURCES = \
4074         src/timesync/timesyncd.c \
4075         src/timesync/timesyncd.h
4076
4077 nodist_systemd_timesyncd_SOURCES = \
4078         src/timesync/timesyncd-gperf.c
4079
4080 EXTRA_DIST += \
4081         src/timesync/timesyncd-gperf.gperf
4082
4083 CLEANFILES += \
4084         src/timesync/timesyncd-gperf.c
4085
4086 systemd_timesyncd_LDADD = \
4087         libsystemd-resolve.la \
4088         libsystemd-network.la \
4089         libsystemd-label.la \
4090         libsystemd-capability.la \
4091         libsystemd-internal.la \
4092         libsystemd-shared.la \
4093         -lm
4094
4095 rootlibexec_PROGRAMS += \
4096         systemd-timesyncd
4097
4098 nodist_systemunit_DATA += \
4099         units/systemd-timesyncd.service
4100
4101 EXTRA_DIST += \
4102         units/systemd-timesyncd.service.in
4103
4104 nodist_pkgsysconf_DATA += \
4105         src/timesync/timesyncd.conf
4106
4107 EXTRA_DIST += \
4108         src/timesync/timesyncd.conf.in
4109
4110 CLEANFILES += \
4111         src/timesync/timesyncd.conf
4112
4113 dist_ntpunits_DATA = \
4114         src/timesync/90-systemd.list
4115
4116 endif
4117
4118 # ------------------------------------------------------------------------------
4119 if HAVE_MYHOSTNAME
4120 libnss_myhostname_la_SOURCES = \
4121         src/nss-myhostname/nss-myhostname.c \
4122         src/nss-myhostname/ifconf.h \
4123         src/nss-myhostname/netlink.c
4124
4125 libnss_myhostname_la_LDFLAGS = \
4126         $(AM_LDFLAGS) \
4127         -module \
4128         -export-dynamic \
4129         -avoid-version \
4130         -shared \
4131         -shrext .so.2
4132
4133 libnss_myhostname_la_LIBADD = \
4134         libsystemd-shared.la \
4135         libsystemd-internal.la
4136
4137 lib_LTLIBRARIES += \
4138         libnss_myhostname.la
4139 endif
4140
4141 # ------------------------------------------------------------------------------
4142 if ENABLE_MACHINED
4143 systemd_machined_SOURCES = \
4144         src/machine/machined.c \
4145         src/machine/machined.h
4146
4147 systemd_machined_LDADD = \
4148         libsystemd-machine-core.la
4149
4150 rootlibexec_PROGRAMS += \
4151         systemd-machined
4152
4153 libsystemd_machine_core_la_SOURCES = \
4154         src/machine/machined-dbus.c \
4155         src/machine/machine.c \
4156         src/machine/machine.h \
4157         src/machine/machine-dbus.c
4158
4159 libsystemd_machine_core_la_LIBADD = \
4160         libsystemd-label.la \
4161         libsystemd-internal.la \
4162         libudev-internal.la \
4163         libsystemd-shared.la
4164
4165 noinst_LTLIBRARIES += \
4166         libsystemd-machine-core.la
4167
4168 machinectl_SOURCES = \
4169         src/machine/machinectl.c
4170
4171 machinectl_LDADD = \
4172         libsystemd-internal.la \
4173         libsystemd-shared.la
4174
4175 rootbin_PROGRAMS += \
4176         machinectl
4177
4178 dist_bashcompletion_DATA += \
4179         shell-completion/bash/machinectl
4180
4181 test_machine_tables_SOURCES = \
4182         src/machine/test-machine-tables.c
4183
4184 test_machine_tables_LDADD = \
4185         libsystemd-machine-core.la
4186
4187 tests += \
4188         test-machine-tables
4189
4190 nodist_systemunit_DATA += \
4191         units/systemd-machined.service
4192
4193 dist_systemunit_DATA += \
4194         units/machine.slice \
4195         units/org.freedesktop.machine1.busname
4196
4197 dist_dbussystemservice_DATA += \
4198         src/machine/org.freedesktop.machine1.service
4199
4200 dist_dbuspolicy_DATA += \
4201         src/machine/org.freedesktop.machine1.conf
4202
4203 dist_zshcompletion_DATA += \
4204         shell-completion/zsh/_machinectl \
4205         shell-completion/zsh/_sd_machines
4206
4207 SYSTEM_UNIT_ALIASES += \
4208         systemd-machined.service dbus-org.freedesktop.machine1.service
4209
4210 BUSNAMES_TARGET_WANTS += \
4211         org.freedesktop.machine1.busname
4212
4213 EXTRA_DIST += \
4214         units/systemd-machined.service.in
4215
4216 endif
4217
4218 # ------------------------------------------------------------------------------
4219 if ENABLE_RESOLVED
4220 systemd_resolved_SOURCES = \
4221         src/resolve/resolved.h \
4222         src/resolve/resolved.c \
4223         src/resolve/resolved-manager.c
4224
4225 systemd_resolved_CFLAGS = \
4226         $(AM_CFLAGS) \
4227         $(KMOD_CFLAGS)
4228
4229 nodist_systemd_resolved_SOURCES = \
4230         src/resolve/resolved-gperf.c
4231
4232 EXTRA_DIST += \
4233         src/resolve/resolved-gperf.gperf
4234
4235 CLEANFILES += \
4236         src/resolve/resolved-gperf.c
4237
4238 systemd_resolved_LDADD = \
4239         libsystemd-capability.la \
4240         libsystemd-network.la \
4241         libsystemd-label.la \
4242         libsystemd-internal.la \
4243         libsystemd-shared.la
4244
4245 rootlibexec_PROGRAMS += \
4246         systemd-resolved
4247
4248 nodist_systemunit_DATA += \
4249         units/systemd-resolved.service
4250
4251 EXTRA_DIST += \
4252         units/systemd-resolved.service.in
4253
4254 GENERAL_ALIASES += \
4255         $(systemunitdir)/systemd-resolved.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-resolved.service
4256
4257 nodist_pkgsysconf_DATA += \
4258         src/resolve/resolved.conf
4259
4260 EXTRA_DIST += \
4261         src/resolve/resolved.conf.in
4262
4263 CLEANFILES += \
4264         src/resolve/resolved.conf
4265
4266 endif
4267
4268 # ------------------------------------------------------------------------------
4269 if ENABLE_NETWORKD
4270 rootlibexec_PROGRAMS += \
4271         systemd-networkd
4272
4273 systemd_networkd_SOURCES = \
4274         src/network/networkd.c
4275
4276 systemd_networkd_LDADD = \
4277         libsystemd-networkd-core.la \
4278         libsystemd-capability.la
4279
4280 noinst_LTLIBRARIES += \
4281         libsystemd-networkd-core.la
4282
4283 libsystemd_networkd_core_la_CFLAGS = \
4284         $(AM_CFLAGS)
4285
4286 libsystemd_networkd_core_la_SOURCES = \
4287         src/libsystemd-network/network-internal.h \
4288         src/network/networkd.h \
4289         src/network/networkd-link.c \
4290         src/network/networkd-netdev.c \
4291         src/network/networkd-tunnel.c \
4292         src/network/networkd-veth.c \
4293         src/network/networkd-network.c \
4294         src/network/networkd-address.c \
4295         src/network/networkd-route.c \
4296         src/network/networkd-manager.c
4297
4298 nodist_libsystemd_networkd_core_la_SOURCES = \
4299         src/network/networkd-network-gperf.c \
4300         src/network/networkd-netdev-gperf.c
4301
4302 libsystemd_networkd_core_la_LIBADD = \
4303         libudev-internal.la \
4304         libsystemd-internal.la \
4305         libsystemd-network.la \
4306         libsystemd-label.la \
4307         libsystemd-shared.la
4308
4309 rootlibexec_PROGRAMS += \
4310         systemd-networkd-wait-online
4311
4312 systemd_networkd_wait_online_CFLAGS = \
4313         $(AM_CFLAGS)
4314
4315 systemd_networkd_wait_online_SOURCES = \
4316         src/libsystemd-network/network-internal.h \
4317         src/network/networkd-wait-online.c \
4318         src/network/networkd-wait-online.h
4319
4320 systemd_networkd_wait_online_LDADD = \
4321         libsystemd-network.la \
4322         libudev-internal.la \
4323         libsystemd-internal.la \
4324         libsystemd-shared.la
4325
4326 test_network_SOURCES = \
4327         src/network/test-network.c
4328
4329 test_network_CFLAGS = \
4330         $(AM_CFLAGS)
4331
4332 test_network_LDADD = \
4333         libsystemd-networkd-core.la
4334
4335 tests += \
4336         test-network
4337
4338 nodist_systemunit_DATA += \
4339         units/systemd-networkd.service \
4340         units/systemd-networkd-wait-online.service
4341
4342 GENERAL_ALIASES += \
4343         $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \
4344         $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service
4345
4346 EXTRA_DIST += \
4347         src/network/networkd-network-gperf.gperf \
4348         src/network/networkd-netdev-gperf.gperf \
4349         units/systemd-networkd.service.in \
4350         units/systemd-networkd-wait-online.service.in
4351
4352 CLEANFILES += \
4353         src/network/networkd-network-gperf.c \
4354         src/network/networkd-netdev-gperf.c
4355 endif
4356
4357 # ------------------------------------------------------------------------------
4358 if ENABLE_LOGIND
4359 systemd_logind_SOURCES = \
4360         src/login/logind.c \
4361         src/login/logind.h
4362
4363 nodist_systemd_logind_SOURCES = \
4364         src/login/logind-gperf.c
4365
4366 systemd_logind_LDADD = \
4367         libsystemd-logind-core.la
4368
4369 libsystemd_logind_core_la_SOURCES = \
4370         src/login/logind-core.c \
4371         src/login/logind-device.c \
4372         src/login/logind-device.h \
4373         src/login/logind-button.c \
4374         src/login/logind-button.h \
4375         src/login/logind-action.c \
4376         src/login/logind-action.h \
4377         src/login/logind-seat.c \
4378         src/login/logind-seat.h \
4379         src/login/logind-session.c \
4380         src/login/logind-session.h \
4381         src/login/logind-session-device.c \
4382         src/login/logind-session-device.h \
4383         src/login/logind-user.c \
4384         src/login/logind-user.h \
4385         src/login/logind-inhibit.c \
4386         src/login/logind-inhibit.h \
4387         src/login/logind-dbus.c \
4388         src/login/logind-session-dbus.c \
4389         src/login/logind-seat-dbus.c \
4390         src/login/logind-user-dbus.c \
4391         src/login/logind-acl.h
4392
4393 libsystemd_logind_core_la_LIBADD = \
4394         libsystemd-label.la \
4395         libsystemd-capability.la \
4396         libsystemd-internal.la \
4397         libudev-internal.la \
4398         libsystemd-shared.la
4399
4400 if HAVE_ACL
4401 libsystemd_logind_core_la_SOURCES += \
4402         src/login/logind-acl.c
4403
4404 libsystemd_logind_core_la_LIBADD += \
4405         libsystemd-acl.la
4406 endif
4407
4408 noinst_LTLIBRARIES += \
4409         libsystemd-logind-core.la
4410
4411 systemd_user_sessions_SOURCES = \
4412         src/login/user-sessions.c
4413
4414 systemd_user_sessions_LDADD = \
4415         libsystemd-shared.la
4416
4417 rootlibexec_PROGRAMS += \
4418         systemd-logind \
4419         systemd-user-sessions
4420
4421 loginctl_SOURCES = \
4422         src/login/loginctl.c \
4423         src/login/sysfs-show.c
4424
4425 loginctl_LDADD = \
4426         libsystemd-internal.la \
4427         libudev-internal.la \
4428         libsystemd-shared.la
4429
4430 rootbin_PROGRAMS += \
4431         loginctl
4432
4433 dist_bashcompletion_DATA += \
4434         shell-completion/bash/loginctl
4435
4436 dist_zshcompletion_DATA += \
4437         shell-completion/zsh/_loginctl \
4438         shell-completion/zsh/_systemd-inhibit
4439
4440 systemd_inhibit_SOURCES = \
4441         src/login/inhibit.c
4442
4443 systemd_inhibit_LDADD = \
4444         libsystemd-internal.la \
4445         libsystemd-shared.la
4446
4447 rootbin_PROGRAMS += \
4448         systemd-inhibit
4449
4450 test_login_SOURCES = \
4451         src/libsystemd/sd-login/test-login.c
4452
4453 test_login_LDADD = \
4454         libsystemd-internal.la \
4455         libsystemd-shared.la
4456
4457 test_login_shared_SOURCES = \
4458         src/login/test-login-shared.c
4459
4460 test_login_shared_LDADD = \
4461         libsystemd-internal.la \
4462         libsystemd-shared.la
4463
4464 test_inhibit_SOURCES = \
4465         src/login/test-inhibit.c
4466
4467 test_inhibit_LDADD = \
4468         libsystemd-internal.la \
4469         libsystemd-shared.la
4470
4471 test_login_tables_SOURCES = \
4472         src/login/test-login-tables.c
4473
4474 test_login_tables_LDADD = \
4475         libsystemd-logind-core.la
4476
4477 manual_tests += \
4478         test-login \
4479         test-inhibit
4480
4481 tests += \
4482         test-login-tables \
4483         test-login-shared
4484
4485 if HAVE_PAM
4486 pam_systemd_la_SOURCES = \
4487         src/login/pam-module.c
4488
4489 pam_systemd_la_CFLAGS = \
4490         $(AM_CFLAGS) \
4491         $(PAM_CFLAGS) \
4492         -fvisibility=hidden
4493
4494 pam_systemd_la_LDFLAGS = \
4495         $(AM_LDFLAGS) \
4496         -module \
4497         -export-dynamic \
4498         -avoid-version \
4499         -shared \
4500         -export-symbols-regex '^pam_sm_.*'
4501
4502 pam_systemd_la_LIBADD = \
4503         libsystemd-capability.la \
4504         libsystemd-internal.la \
4505         libsystemd-shared.la \
4506         $(PAM_LIBS)
4507
4508 pamlib_LTLIBRARIES = \
4509         pam_systemd.la
4510
4511 dist_pamconf_DATA = \
4512         src/login/systemd-user
4513 endif
4514
4515 nodist_systemunit_DATA += \
4516         units/systemd-logind.service \
4517         units/systemd-user-sessions.service
4518
4519 dist_systemunit_DATA += \
4520         units/user.slice \
4521         units/org.freedesktop.login1.busname
4522
4523 dist_dbussystemservice_DATA += \
4524         src/login/org.freedesktop.login1.service
4525
4526 dist_dbuspolicy_DATA += \
4527         src/login/org.freedesktop.login1.conf
4528
4529 dist_pkgsysconf_DATA += \
4530         src/login/logind.conf
4531
4532 polkitpolicy_files += \
4533         src/login/org.freedesktop.login1.policy
4534
4535 INSTALL_DIRS += \
4536         $(systemdstatedir)
4537
4538 MULTI_USER_TARGET_WANTS += \
4539         systemd-logind.service \
4540         systemd-user-sessions.service
4541
4542 SYSTEM_UNIT_ALIASES += \
4543         systemd-logind.service dbus-org.freedesktop.login1.service
4544
4545 BUSNAMES_TARGET_WANTS += \
4546         org.freedesktop.login1.busname
4547
4548 if ENABLE_MULTI_SEAT_X
4549
4550 systemd_multi_seat_x_SOURCES = \
4551         src/login/multi-seat-x.c
4552
4553 systemd_multi_seat_x_LDADD = \
4554         libsystemd-label.la \
4555         libsystemd-shared.la
4556
4557 rootlibexec_PROGRAMS += \
4558         systemd-multi-seat-x
4559
4560 endif
4561
4562 dist_udevrules_DATA += \
4563         src/login/70-uaccess.rules \
4564         src/login/70-power-switch.rules
4565
4566 nodist_udevrules_DATA += \
4567         src/login/71-seat.rules \
4568         src/login/73-seat-late.rules
4569
4570 CLEANFILES += \
4571         src/login/logind-gperf.c \
4572         src/login/71-seat.rules \
4573         src/login/73-seat-late.rules
4574 endif
4575
4576 polkitpolicy_in_files += \
4577         src/login/org.freedesktop.login1.policy.in
4578
4579 EXTRA_DIST += \
4580         src/login/logind-gperf.gperf \
4581         src/login/71-seat.rules.in \
4582         src/login/73-seat-late.rules.in \
4583         units/systemd-logind.service.in \
4584         units/systemd-user-sessions.service.in
4585
4586 # ------------------------------------------------------------------------------
4587 if HAVE_PYTHON_DEVEL
4588 pkgpyexec_LTLIBRARIES = \
4589         _journal.la \
4590         id128.la \
4591         _daemon.la \
4592         _reader.la \
4593         login.la
4594
4595 _journal_la_SOURCES = \
4596         src/python-systemd/_journal.c
4597
4598 _journal_la_CFLAGS = \
4599         $(AM_CFLAGS) \
4600         -fvisibility=default \
4601         $(PYTHON_DEVEL_CFLAGS)
4602
4603 _journal_la_LDFLAGS = \
4604         $(AM_LDFLAGS) \
4605         -shared \
4606         -module \
4607         -avoid-version
4608
4609 _journal_la_LIBADD = \
4610         $(PYTHON_DEVEL_LIBS) \
4611         libsystemd.la
4612
4613 id128_la_SOURCES = \
4614         src/python-systemd/id128.c \
4615         src/python-systemd/id128-constants.h \
4616         src/python-systemd/pyutil.c \
4617         src/python-systemd/pyutil.h
4618
4619 id128_la_CFLAGS = \
4620         $(AM_CFLAGS) \
4621         -fvisibility=default \
4622         $(PYTHON_DEVEL_CFLAGS) \
4623         -I$(top_builddir)/src/python-systemd
4624
4625 id128_la_LDFLAGS = \
4626         $(AM_LDFLAGS) \
4627         -shared \
4628         -module \
4629         -avoid-version
4630
4631 id128_la_LIBADD = \
4632         $(PYTHON_DEVEL_LIBS) \
4633         libsystemd-shared.la \
4634         libsystemd.la
4635
4636 _daemon_la_SOURCES = \
4637         src/python-systemd/_daemon.c \
4638         src/python-systemd/pyutil.c \
4639         src/python-systemd/pyutil.h
4640
4641 _daemon_la_CFLAGS = \
4642         $(AM_CFLAGS) \
4643         -fvisibility=default \
4644         $(PYTHON_DEVEL_CFLAGS) \
4645         -I$(top_builddir)/src/python-systemd
4646
4647 _daemon_la_LDFLAGS = \
4648         $(AM_LDFLAGS) \
4649         -shared \
4650         -module \
4651         -avoid-version
4652
4653 _daemon_la_LIBADD = \
4654         $(PYTHON_DEVEL_LIBS) \
4655         libsystemd-shared.la \
4656         libsystemd.la
4657
4658 _reader_la_SOURCES = \
4659         src/python-systemd/_reader.c \
4660         src/python-systemd/pyutil.c \
4661         src/python-systemd/pyutil.h
4662
4663 _reader_la_CFLAGS = \
4664         $(AM_CFLAGS) \
4665         -fvisibility=default \
4666         $(PYTHON_DEVEL_CFLAGS)
4667
4668 _reader_la_LDFLAGS = \
4669         $(AM_LDFLAGS) \
4670         -shared \
4671         -module \
4672         -avoid-version
4673
4674 _reader_la_LIBADD = \
4675         $(PYTHON_DEVEL_LIBS) \
4676         libsystemd-shared.la \
4677         libsystemd.la
4678
4679 login_la_SOURCES = \
4680         src/python-systemd/login.c \
4681         src/python-systemd/pyutil.c \
4682         src/python-systemd/pyutil.h
4683
4684 login_la_CFLAGS = \
4685         $(AM_CFLAGS) \
4686         -fvisibility=default \
4687         $(PYTHON_DEVEL_CFLAGS)
4688
4689 login_la_LDFLAGS = \
4690         $(AM_LDFLAGS) \
4691         -shared \
4692         -module \
4693         -avoid-version
4694
4695 login_la_LIBADD = \
4696         $(PYTHON_DEVEL_LIBS) \
4697         libsystemd-shared.la \
4698         libsystemd.la
4699
4700 dist_pkgpyexec_PYTHON = \
4701         src/python-systemd/journal.py \
4702         src/python-systemd/daemon.py \
4703         src/python-systemd/__init__.py
4704
4705 src/python-systemd/id128-constants.h: src/systemd/sd-messages.h
4706         $(AM_V_at)$(MKDIR_P) $(dir $@)
4707         $(AM_V_GEN)$(SED) -n -r 's/,//g; s/#define (SD_MESSAGE_[A-Z0-9_]+)\s.*/add_id(m, "\1", \1) JOINER/p' <$< >$@
4708
4709 BUILT_SOURCES += \
4710         src/python-systemd/id128-constants.h
4711
4712 SPHINXOPTS = -D version=$(VERSION) -D release=$(VERSION)
4713 sphinx-%:
4714         $(AM_V_at)test -n "$(SPHINX_BUILD)" || { echo " *** sphinx-build is not available"; exit 1; }
4715         $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/docs/html/python-systemd/
4716         $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/docs/html/python-systemd/
4717
4718 python-shell:
4719         $(AM_V_at)echo "Starting python with $(DESTDIR)$(pyexecdir)"
4720         $(AM_V_at)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(PYTHON)
4721
4722 destdir-sphinx: all
4723         dir="$$(mktemp -d /tmp/systemd-install.XXXXXX)" && \
4724                 $(MAKE) DESTDIR="$$dir" install && \
4725                 $(MAKE) DESTDIR="$$dir" sphinx-html && \
4726                 rm -rf "$$dir"
4727
4728 endif
4729
4730 CLEAN_LOCAL_HOOKS += clean-sphinx
4731
4732 .PHONY: python-shell destdir-sphinx clean-sphinx clean-python
4733
4734 clean-sphinx:
4735         -rm -rf docs/html/python-systemd/
4736
4737 # Remove Python stuff, e.g. to force rebuilding for a different Python version.
4738 clean-python:
4739         -rm -rf src/python-systemd/.libs src/python-systemd/*.l[ao]
4740         -rm -f _daemon.la id128.la _journal.la login.la _reader.la
4741
4742 # ------------------------------------------------------------------------------
4743 if ENABLE_COMPAT_LIBS
4744 EXTRA_DIST += \
4745         src/compat-libs/linkwarning.h
4746
4747 libsystemd-%.c: src/compat-libs/libsystemd-%.sym
4748         $(AM_V_at)$(MKDIR_P) $(dir $@)
4749         $(AM_V_GEN)sed -r -n 's/^ +(sd_.*);/obsolete_lib(\1,$(notdir $(basename $<)));/p' <$< >$@
4750
4751 BUILT_SOURCES += \
4752         libsystemd-journal.c \
4753         libsystemd-login.c \
4754         libsystemd-id128.c \
4755         libsystemd-daemon.c
4756
4757 libsystemd_journal_la_SOURCES = \
4758         libsystemd-journal.c \
4759         src/compat-libs/libsystemd-journal.sym
4760
4761 libsystemd_journal_la_CPPFLAGS = \
4762         $(AM_CFLAGS) \
4763         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
4764
4765 libsystemd_journal_la_LDFLAGS = \
4766         $(AM_LDFLAGS) \
4767         -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
4768         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-journal.sym
4769
4770 libsystemd_journal_la_LIBADD = \
4771         libsystemd-journal-internal.la \
4772         libsystemd-internal.la \
4773         libsystemd-shared.la
4774
4775 libsystemd_login_la_SOURCES = \
4776         libsystemd-login.c \
4777         src/compat-libs/libsystemd-login.sym
4778
4779 libsystemd_login_la_CPPFLAGS = \
4780         $(AM_CFLAGS) \
4781         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
4782
4783 libsystemd_login_la_LDFLAGS = \
4784         $(AM_LDFLAGS) \
4785         -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
4786         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-login.sym
4787
4788 libsystemd_login_la_LIBADD = \
4789         libsystemd-internal.la \
4790         libsystemd-shared.la
4791
4792 libsystemd_id128_la_SOURCES = \
4793         libsystemd-id128.c \
4794         src/compat-libs/libsystemd-id128.sym
4795
4796 libsystemd_id128_la_CPPFLAGS = \
4797         $(AM_CFLAGS) \
4798         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
4799
4800 libsystemd_id128_la_LDFLAGS = \
4801         $(AM_LDFLAGS) \
4802         -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
4803         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-id128.sym
4804
4805 libsystemd_id128_la_LIBADD = \
4806         libsystemd-internal.la \
4807         libsystemd-shared.la
4808
4809 libsystemd_daemon_la_SOURCES = \
4810         libsystemd-daemon.c \
4811         src/compat-libs/libsystemd-daemon.sym
4812
4813 libsystemd_daemon_la_CPPFLAGS = \
4814         $(AM_CFLAGS) \
4815         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
4816
4817 libsystemd_daemon_la_LDFLAGS = \
4818         $(AM_LDFLAGS) \
4819         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
4820         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-daemon.sym
4821
4822 libsystemd_daemon_la_LIBADD = \
4823         libsystemd-internal.la \
4824         libsystemd-shared.la
4825
4826 lib_LTLIBRARIES += \
4827         libsystemd-journal.la \
4828         libsystemd-login.la \
4829         libsystemd-id128.la \
4830         libsystemd-daemon.la
4831
4832 pkgconfiglib_DATA += \
4833         src/compat-libs/libsystemd-journal.pc \
4834         src/compat-libs/libsystemd-login.pc \
4835         src/compat-libs/libsystemd-id128.pc \
4836         src/compat-libs/libsystemd-daemon.pc
4837
4838 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
4839 compat-lib-install-hook:
4840         libname=libsystemd-login.so && $(move-to-rootlibdir)
4841         libname=libsystemd-journal.so && $(move-to-rootlibdir)
4842         libname=libsystemd-id128.so && $(move-to-rootlibdir)
4843         libname=libsystemd-daemon.so && $(move-to-rootlibdir)
4844
4845 compat-lib-uninstall-hook:
4846         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
4847         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
4848         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
4849         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
4850
4851 INSTALL_EXEC_HOOKS += compat-lib-install-hook
4852 UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook
4853 endif
4854
4855 EXTRA_DIST += \
4856         src/compat-libs/libsystemd-journal.pc.in \
4857         src/compat-libs/libsystemd-login.pc.in \
4858         src/compat-libs/libsystemd-id128.pc.in \
4859         src/compat-libs/libsystemd-daemon.pc.in
4860
4861 # ------------------------------------------------------------------------------
4862 substitutions = \
4863        '|rootlibexecdir=$(rootlibexecdir)|' \
4864        '|rootbindir=$(rootbindir)|' \
4865        '|bindir=$(bindir)|' \
4866        '|SYSTEMCTL=$(rootbindir)/systemctl|' \
4867        '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
4868        '|pkgsysconfdir=$(pkgsysconfdir)|' \
4869        '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
4870        '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
4871        '|pkgdatadir=$(pkgdatadir)|' \
4872        '|systemunitdir=$(systemunitdir)|' \
4873        '|userunitdir=$(userunitdir)|' \
4874        '|systempresetdir=$(systempresetdir)|' \
4875        '|userpresetdir=$(userpresetdir)|' \
4876        '|udevhwdbdir=$(udevhwdbdir)|' \
4877        '|udevrulesdir=$(udevrulesdir)|' \
4878        '|catalogdir=$(catalogdir)|' \
4879        '|tmpfilesdir=$(tmpfilesdir)|' \
4880        '|sysctldir=$(sysctldir)|' \
4881        '|systemgeneratordir=$(systemgeneratordir)|' \
4882        '|usergeneratordir=$(usergeneratordir)|' \
4883        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
4884        '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
4885        '|PACKAGE_URL=$(PACKAGE_URL)|' \
4886        '|RANDOM_SEED_DIR=$(localstatedir)/lib/systemd/|' \
4887        '|RANDOM_SEED=$(localstatedir)/lib/systemd/random-seed|' \
4888        '|prefix=$(prefix)|' \
4889        '|exec_prefix=$(exec_prefix)|' \
4890        '|libdir=$(libdir)|' \
4891        '|includedir=$(includedir)|' \
4892        '|VERSION=$(VERSION)|' \
4893        '|rootprefix=$(rootprefix)|' \
4894        '|udevlibexecdir=$(udevlibexecdir)|' \
4895        '|SUSHELL=$(SUSHELL)|' \
4896        '|DEBUGTTY=$(DEBUGTTY)|' \
4897        '|KILL=$(KILL)|' \
4898        '|KMOD=$(KMOD)|' \
4899        '|MKDIR_P=$(MKDIR_P)|' \
4900        '|QUOTAON=$(QUOTAON)|' \
4901        '|QUOTACHECK=$(QUOTACHECK)|' \
4902        '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
4903        '|VARLOGDIR=$(varlogdir)|' \
4904        '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
4905        '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
4906        '|PYTHON=$(PYTHON)|' \
4907        '|PYTHON_BINARY=$(PYTHON_BINARY)|' \
4908        '|NTP_SERVERS=$(NTP_SERVERS)|' \
4909        '|DNS_SERVERS=$(DNS_SERVERS)|' \
4910        '|systemuidmax=$(SYSTEM_UID_MAX)|' \
4911        '|systemgidmax=$(SYSTEM_GID_MAX)|'
4912
4913 SED_PROCESS = \
4914         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
4915         $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
4916                 < $< > $@
4917
4918 units/%: units/%.in
4919         $(SED_PROCESS)
4920
4921 man/%: man/%.in
4922         $(SED_PROCESS)
4923
4924 sysctl.d/%: sysctl.d/%.in
4925         $(SED_PROCESS)
4926
4927 %.pc: %.pc.in
4928         $(SED_PROCESS)
4929
4930 src/core/macros.%: src/core/macros.%.in
4931         $(SED_PROCESS)
4932
4933 src/%.policy.in: src/%.policy.in.in
4934         $(SED_PROCESS)
4935
4936 %.rules: %.rules.in
4937         $(SED_PROCESS)
4938
4939 %.conf: %.conf.in
4940         $(SED_PROCESS)
4941
4942 %.sh: %.sh.in
4943         $(SED_PROCESS)
4944         $(AM_V_GEN)chmod +x $@
4945
4946 src/%.c: src/%.gperf
4947         $(AM_V_at)$(MKDIR_P) $(dir $@)
4948         $(AM_V_GPERF)$(GPERF) < $< > $@
4949
4950 src/%: src/%.m4
4951         $(AM_V_at)$(MKDIR_P) $(dir $@)
4952         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
4953
4954 units/%: units/%.m4
4955         $(AM_V_at)$(MKDIR_P) $(dir $@)
4956         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
4957
4958 units/user/%: units/%.m4
4959         $(AM_V_at)$(MKDIR_P) $(dir $@)
4960         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
4961
4962 if ENABLE_POLKIT
4963 nodist_polkitpolicy_DATA = \
4964         $(polkitpolicy_files) \
4965         $(polkitpolicy_in_in_files:.policy.in.in=.policy)
4966 endif
4967
4968 EXTRA_DIST += \
4969         $(polkitpolicy_in_files) \
4970         $(polkitpolicy_in_in_files)
4971
4972 CLEANFILES += \
4973         $(nodist_systemunit_DATA) \
4974         $(nodist_userunit_DATA) \
4975         $(pkgconfigdata_DATA) \
4976         $(pkgconfiglib_DATA) \
4977         $(nodist_polkitpolicy_DATA)
4978
4979 # ------------------------------------------------------------------------------
4980 if ENABLE_MANPAGES
4981 man/custom-entities.ent: configure.ac
4982         $(AM_V_GEN)$(MKDIR_P) $(dir $@)
4983         $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
4984          printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
4985          > $@ # '
4986
4987 DISTCLEANFILES += \
4988         man/custom-entities.ent
4989
4990 XSLTPROC_FLAGS = \
4991         --nonet \
4992         --xinclude \
4993         --stringparam man.output.quietly 1 \
4994         --stringparam funcsynopsis.style ansi \
4995         --stringparam man.authors.section.enabled 0 \
4996         --stringparam man.copyright.section.enabled 0 \
4997         --stringparam systemd.version $(VERSION) \
4998         --path '$(builddir)/man:$(srcdir)/man'
4999
5000 XSLTPROC_PROCESS_MAN = \
5001         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
5002
5003 XSLTPROC_PROCESS_HTML = \
5004         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
5005
5006 man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
5007         $(XSLTPROC_PROCESS_MAN)
5008
5009 man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
5010         $(XSLTPROC_PROCESS_MAN)
5011
5012 man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
5013         $(XSLTPROC_PROCESS_MAN)
5014
5015 man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
5016         $(XSLTPROC_PROCESS_MAN)
5017
5018 man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
5019         $(XSLTPROC_PROCESS_MAN)
5020
5021 man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
5022         $(XSLTPROC_PROCESS_HTML)
5023
5024 define html-alias
5025         $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
5026 endef
5027
5028 endif
5029
5030 EXTRA_DIST += \
5031         man/custom-html.xsl \
5032         man/custom-man.xsl
5033
5034 # ------------------------------------------------------------------------------
5035 if HAVE_SYSV_COMPAT
5036 sysvinit_DATA = \
5037         docs/sysvinit/README
5038
5039 varlog_DATA = \
5040         docs/var-log/README
5041
5042 docs/sysvinit/README: docs/sysvinit/README.in
5043         $(SED_PROCESS)
5044
5045 docs/var-log/README: docs/var-log/README.in
5046         $(SED_PROCESS)
5047
5048 CLEANFILES += \
5049         docs/sysvinit/README \
5050         docs/var-log/README
5051 endif
5052
5053 EXTRA_DIST += \
5054         docs/sysvinit/README.in \
5055         docs/var-log/README.in
5056
5057 SOCKETS_TARGET_WANTS += \
5058         systemd-initctl.socket \
5059         systemd-shutdownd.socket
5060
5061 if HAVE_SYSV_COMPAT
5062 RUNLEVEL1_TARGET_WANTS += \
5063         systemd-update-utmp-runlevel.service
5064 RUNLEVEL2_TARGET_WANTS += \
5065         systemd-update-utmp-runlevel.service
5066 RUNLEVEL3_TARGET_WANTS += \
5067         systemd-update-utmp-runlevel.service
5068 RUNLEVEL4_TARGET_WANTS += \
5069         systemd-update-utmp-runlevel.service
5070 RUNLEVEL5_TARGET_WANTS += \
5071         systemd-update-utmp-runlevel.service
5072 endif
5073 SYSINIT_TARGET_WANTS += \
5074         systemd-update-utmp.service
5075 LOCAL_FS_TARGET_WANTS += \
5076         systemd-remount-fs.service \
5077         tmp.mount
5078 MULTI_USER_TARGET_WANTS += \
5079         getty.target \
5080         systemd-ask-password-wall.path
5081 SYSINIT_TARGET_WANTS += \
5082         dev-hugepages.mount \
5083         dev-mqueue.mount \
5084         sys-kernel-config.mount \
5085         sys-kernel-debug.mount \
5086         sys-fs-fuse-connections.mount \
5087         systemd-sysctl.service \
5088         systemd-ask-password-console.path
5089
5090 if HAVE_SYSV_COMPAT
5091 SYSTEM_UNIT_ALIASES += \
5092         poweroff.target runlevel0.target \
5093         rescue.target runlevel1.target \
5094         multi-user.target runlevel2.target \
5095         multi-user.target runlevel3.target \
5096         multi-user.target runlevel4.target \
5097         graphical.target runlevel5.target \
5098         reboot.target runlevel6.target
5099 endif
5100
5101 SYSTEM_UNIT_ALIASES += \
5102         graphical.target default.target \
5103         reboot.target ctrl-alt-del.target \
5104         getty@.service autovt@.service
5105
5106 USER_UNIT_ALIASES += \
5107         $(systemunitdir)/shutdown.target shutdown.target \
5108         $(systemunitdir)/sockets.target sockets.target \
5109         $(systemunitdir)/busnames.target busnames.target \
5110         $(systemunitdir)/timers.target timers.target \
5111         $(systemunitdir)/paths.target paths.target \
5112         $(systemunitdir)/bluetooth.target bluetooth.target \
5113         $(systemunitdir)/printer.target printer.target \
5114         $(systemunitdir)/sound.target sound.target \
5115         $(systemunitdir)/smartcard.target smartcard.target
5116
5117 GENERAL_ALIASES += \
5118         $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
5119         $(systemunitdir)/getty@.service $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \
5120         $(pkgsysconfdir)/user $(sysconfdir)/xdg/systemd/user \
5121         $(dbussystemservicedir)/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service
5122
5123 if HAVE_SYSV_COMPAT
5124 INSTALL_DIRS += \
5125         $(systemunitdir)/runlevel1.target.wants \
5126         $(systemunitdir)/runlevel2.target.wants \
5127         $(systemunitdir)/runlevel3.target.wants \
5128         $(systemunitdir)/runlevel4.target.wants \
5129         $(systemunitdir)/runlevel5.target.wants
5130 endif
5131
5132 INSTALL_DIRS += \
5133         $(prefix)/lib/modules-load.d \
5134         $(sysconfdir)/modules-load.d \
5135         $(prefix)/lib/systemd/network \
5136         $(sysconfdir)/systemd/network \
5137         $(prefix)/lib/sysctl.d \
5138         $(sysconfdir)/sysctl.d \
5139         $(prefix)/lib/kernel/install.d \
5140         $(sysconfdir)/kernel/install.d \
5141         $(systemshutdowndir) \
5142         $(systemsleepdir) \
5143         $(systemgeneratordir) \
5144         $(usergeneratordir) \
5145         \
5146         $(userunitdir) \
5147         $(pkgsysconfdir)/system \
5148         $(pkgsysconfdir)/system/multi-user.target.wants \
5149         $(pkgsysconfdir)/system/getty.target.wants \
5150         $(pkgsysconfdir)/user \
5151         $(dbussessionservicedir) \
5152         $(sysconfdir)/xdg/systemd
5153
5154 install-exec-hook: $(INSTALL_EXEC_HOOKS)
5155
5156 uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
5157
5158 install-data-hook: $(INSTALL_DATA_HOOKS)
5159
5160 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
5161
5162 clean-local: $(CLEAN_LOCAL_HOOKS)
5163         rm -rf $(abs_srcdir)/install-tree
5164         rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
5165               $(abs_srcdir)/hwdb/iab.txt
5166
5167 DISTCHECK_CONFIGURE_FLAGS = \
5168         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
5169         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
5170         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
5171         --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
5172         --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
5173         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
5174         --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
5175         --with-rootprefix=$$dc_install_base \
5176         --disable-split-usr \
5177         --enable-kdbus \
5178         --enable-compat-libs
5179
5180 if HAVE_SYSV_COMPAT
5181 DISTCHECK_CONFIGURE_FLAGS += \
5182         --with-sysvinit-path=$$dc_install_base/$(sysvinitdir) \
5183         --with-sysvrcnd-path=$$dc_install_base/$(sysvrcnddir)
5184 else
5185 DISTCHECK_CONFIGURE_FLAGS += \
5186         --with-sysvinit-path= \
5187         --with-sysvrcnd-path=
5188 endif
5189
5190 if ENABLE_GTK_DOC
5191 DISTCHECK_CONFIGURE_FLAGS += \
5192         --enable-gtk-doc
5193 endif
5194
5195 # check "broken" platforms limited toolchains for link breakage before we release
5196 .PHONY: linkcheck
5197 linkcheck:
5198         $(MAKE) CFLAGS='-fno-lto' LDFLAGS='-Wl,-fuse-ld=gold -Wl,--as-needed -Wl,--no-gc-sections' distcheck
5199
5200 .PHONY: hwdb-update
5201 hwdb-update:
5202         ( cd $(top_srcdir)/hwdb && \
5203         wget -N http://www.linux-usb.org/usb.ids \
5204                 http://pci-ids.ucw.cz/v2.2/pci.ids \
5205                 http://standards.ieee.org/develop/regauth/oui/oui.txt \
5206                 http://standards.ieee.org/develop/regauth/iab/iab.txt && \
5207         ./ids-update.pl )
5208
5209 .PHONY: kdbus-update
5210 kdbus-update:
5211         ( cd $(top_srcdir)/src/libsystemd/sd-bus/ && \
5212         wget -N https://d-bus.googlecode.com/git/kdbus.h )
5213
5214 .PHONY: git-tag
5215 git-tag:
5216         git tag -s "v$(VERSION)" -m "systemd $(VERSION)"
5217
5218 www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
5219 .PHONY: upload
5220 upload: all check dist
5221         scp systemd-$(VERSION).tar.xz $(www_target)
5222
5223 .PHONY: doc-sync
5224 doc-sync: all destdir-sphinx
5225         gtkdoc-rebase --html-dir=docs/libudev/html --online
5226         rsync -rlv --delete docs/libudev/html/ --omit-dir-times $(www_target)/libudev/
5227         gtkdoc-rebase --html-dir=docs/gudev/html --online
5228         rsync -rlv --delete docs/gudev/html/ --omit-dir-times $(www_target)/gudev/
5229         rsync -rlv --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
5230         rsync -rlv --delete --omit-dir-times docs/html/python-systemd/ $(www_target)/python-systemd/
5231
5232 .PHONY: tango
5233 tango: upload
5234         cp -v systemd-$(VERSION).tar.xz /home/lennart/git.fedora/systemd/
5235         scp man/*.html tango:public/systemd-man/
5236
5237 .PHONY: install-tree
5238 install-tree: all
5239         rm -rf $(abs_srcdir)/install-tree
5240         $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
5241         tree $(abs_srcdir)/install-tree
5242
5243 # Let's run all tests of the test suite, but under valgrind. Let's
5244 # exclude the one perl script we have in there
5245 .PHONY: valgrind-tests
5246 valgrind-tests: $(TESTS)
5247         $(AM_V_GEN)for f in $(filter-out %.pl, $^); do \
5248                 if file $$f | grep -q shell; then \
5249                 echo -e "$${x}Skipping non-binary $$f"; else \
5250                 echo -e "$${x}Running $$f"; \
5251                 libtool --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
5252                 x="\n\n"; \
5253         done
5254
5255 exported-%: %
5256         $(AM_V_GEN)nm -g --defined-only $(builddir)/.libs/$(<:.la=.so) 2>&1 /dev/null | grep " T " | cut -d" " -f3 > $@
5257
5258 exported: $(addprefix exported-, $(lib_LTLIBRARIES))
5259         $(AM_V_GEN)cat $^ > $@
5260
5261 .PHONY: check-api-docs
5262 check-api-docs: exported man
5263         $(AM_V_GEN)for symbol in `cat exported` ; do \
5264                 if test -f $(builddir)/man/$$symbol.html ; then \
5265                         echo "  Symbol $$symbol() is documented." ; \
5266                 else \
5267                         echo "‣ Symbol $$symbol() lacks documentation." ; \
5268                 fi ; \
5269         done
5270
5271 OBJECT_VARIABLES:=$(filter %_OBJECTS,$(.VARIABLES))
5272 ALL_OBJECTS:=$(foreach v,$(OBJECT_VARIABLES),$($(v)))
5273
5274 undefined defined: $(ALL_OBJECTS)
5275         $(AM_V_GEN)for f in $(ALL_OBJECTS) ; do \
5276                 nm -g --$@-only `echo $(builddir)/"$$f" | sed -e 's,\([^/]*\).lo$$,.libs/\1.o,'` ; \
5277         done | cut -c 20- | cut -d @ -f 1 | sort -u > $@
5278
5279 CLEANFILES += \
5280         defined \
5281         undefined
5282
5283 .PHONY: check-api-unused
5284 check-api-unused: defined undefined exported
5285         ( cat exported undefined ) | sort -u  | diff -u - defined | grep ^+ | grep -v ^+++ | cut -c2-
5286
5287 .PHONY: check-includes
5288 check-includes: $(top_srcdir)/tools/check-includes.pl
5289         $(AM_V_GEN) find * -name '*.[hcS]' -type f -print | sort -u \
5290                 | xargs $(top_srcdir)/tools/check-includes.pl
5291
5292 EXTRA_DIST += \
5293         $(top_srcdir)/tools/check-includes.pl
5294
5295 # Stupid test that everything purported to be exported really is
5296 define generate-sym-test
5297         $(AM_V_at)$(MKDIR_P) $(dir $@)
5298         $(AM_V_at)printf '#include <stdio.h>\n' > $@
5299         $(AM_V_at)printf '#include "%s"\n' $(notdir $(filter %.h, $^)) >> $@
5300         $(AM_V_at)printf 'void* functions[] = {\n' >> $@
5301         $(AM_V_GEN)sed -r -n 's/^ +([a-zA-Z0-9_]+);/\1,/p' $< >> $@
5302         $(AM_V_at)printf '};\nint main(void) {\n' >> $@
5303         $(AM_V_at)printf 'unsigned i; for (i=0;i<sizeof(functions)/sizeof(void*);i++) printf("%%p\\n", functions[i]);\n' >> $@
5304         $(AM_V_at)printf 'return 0; }\n' >> $@
5305 endef
5306
5307 test-libsystemd-sym.c: \
5308                 $(top_builddir)/src/libsystemd/libsystemd.sym \
5309                 src/systemd/sd-journal.h \
5310                 src/systemd/sd-daemon.h \
5311                 src/systemd/sd-login.h \
5312                 src/systemd/sd-bus.h \
5313                 src/systemd/sd-utf8.h \
5314                 src/systemd/sd-resolve.h
5315         $(generate-sym-test)
5316
5317 test-libudev-sym.c: \
5318                 src/libudev/libudev.sym \
5319                 src/udev/udev.h
5320         $(generate-sym-test)
5321
5322 test_libsystemd_sym_SOURCES = \
5323         test-libsystemd-sym.c
5324 test_libsystemd_sym_LDADD = \
5325         libsystemd.la
5326
5327 test_libudev_sym_SOURCES = \
5328         test-libudev-sym.c
5329 test_libudev_sym_CFLAGS = \
5330         $(AM_CFLAGS) \
5331         -Wno-deprecated-declarations
5332 test_libudev_sym_LDADD = \
5333         libudev.la
5334
5335 BUILT_SOURCES += \
5336         $(test_libsystemd_sym_SOURCES) \
5337         $(test_libudev_sym_SOURCES)
5338
5339 tests += \
5340         test-libsystemd-sym \
5341         test-libudev-sym
5342
5343 .PHONY: cppcheck
5344 cppcheck:
5345         cppcheck --enable=all -q $(top_srcdir)
5346
5347 # Used to extract compile flags for YCM.
5348 print-%:
5349         @echo $($*)
5350
5351 git-contrib:
5352         @git shortlog -s `git describe --abbrev=0`.. | cut -c8- | awk '{ print $$0 "," }' | sort -u