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