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