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