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