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