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