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