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