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