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