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