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