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