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