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