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