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