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