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