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