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