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