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