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