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