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