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