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