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