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