chiark / gitweb /
build-sys: "link" libsystemd-id128 against libsd-daemon-internal
[elogind.git] / Makefile.am
1 #  -*- Mode: makefile; indent-tabs-mode: t -*-
2 #
3 #  This file is part of systemd.
4 #
5 #  Copyright 2010-2012 Lennart Poettering
6 #  Copyright 2010-2012 Kay Sievers
7 #  Copyright 2013 Zbigniew JÄ™drzejewski-Szmek
8 #
9 #  systemd is free software; you can redistribute it and/or modify it
10 #  under the terms of the GNU Lesser General Public License as published by
11 #  the Free Software Foundation; either version 2.1 of the License, or
12 #  (at your option) any later version.
13 #
14 #  systemd is distributed in the hope that it will be useful, but
15 #  WITHOUT ANY WARRANTY; without even the implied warranty of
16 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 #  Lesser General Public License for more details.
18 #
19 #  You should have received a copy of the GNU Lesser General Public License
20 #  along with systemd; If not, see <http://www.gnu.org/licenses/>.
21
22 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
23 AM_MAKEFLAGS = --no-print-directory
24 AUTOMAKE_OPTIONS = color-tests parallel-tests
25
26 SUBDIRS = . po
27
28 # remove targets if the command fails
29 .DELETE_ON_ERROR:
30
31 # keep intermediate files
32 .SECONDARY:
33
34 LIBUDEV_CURRENT=4
35 LIBUDEV_REVISION=1
36 LIBUDEV_AGE=3
37
38 LIBGUDEV_CURRENT=1
39 LIBGUDEV_REVISION=3
40 LIBGUDEV_AGE=1
41
42 LIBSYSTEMD_LOGIN_CURRENT=4
43 LIBSYSTEMD_LOGIN_REVISION=2
44 LIBSYSTEMD_LOGIN_AGE=4
45
46 LIBSYSTEMD_DAEMON_CURRENT=0
47 LIBSYSTEMD_DAEMON_REVISION=8
48 LIBSYSTEMD_DAEMON_AGE=0
49
50 LIBSYSTEMD_ID128_CURRENT=0
51 LIBSYSTEMD_ID128_REVISION=19
52 LIBSYSTEMD_ID128_AGE=0
53
54 LIBSYSTEMD_JOURNAL_CURRENT=8
55 LIBSYSTEMD_JOURNAL_REVISION=2
56 LIBSYSTEMD_JOURNAL_AGE=8
57
58 # Dirs of external packages
59 dbuspolicydir=@dbuspolicydir@
60 dbussessionservicedir=@dbussessionservicedir@
61 dbussystemservicedir=@dbussystemservicedir@
62 dbusinterfacedir=@dbusinterfacedir@
63 pamlibdir=@pamlibdir@
64 pkgconfigdatadir=$(datadir)/pkgconfig
65 pkgconfiglibdir=$(libdir)/pkgconfig
66 polkitpolicydir=$(datadir)/polkit-1/actions
67 bashcompletiondir=@bashcompletiondir@
68 rpmmacrosdir=$(sysconfdir)/rpm
69 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
70 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
71 varlogdir=$(localstatedir)/log
72 systemdstatedir=$(localstatedir)/lib/systemd
73 catalogstatedir=$(systemdstatedir)/catalog
74
75 # Our own, non-special dirs
76 pkgsysconfdir=$(sysconfdir)/systemd
77 userunitdir=$(prefix)/lib/systemd/user
78 userpresetdir=$(prefix)/lib/systemd/user-preset
79 tmpfilesdir=$(prefix)/lib/tmpfiles.d
80 sysctldir=$(prefix)/lib/sysctl.d
81 usergeneratordir=$(prefix)/lib/systemd/user-generators
82 pkgincludedir=$(includedir)/systemd
83 systemgeneratordir=$(rootlibexecdir)/system-generators
84 systemshutdowndir=$(rootlibexecdir)/system-shutdown
85 systemsleepdir=$(rootlibexecdir)/system-sleep
86 systemunitdir=$(rootprefix)/lib/systemd/system
87 systempresetdir=$(rootprefix)/lib/systemd/system-preset
88 udevlibexecdir=$(rootprefix)/lib/udev
89 udevhomedir=$(udevlibexecdir)
90 udevrulesdir=$(udevlibexecdir)/rules.d
91 udevhwdbdir=$(udevlibexecdir)/hwdb.d
92 catalogdir=$(prefix)/lib/systemd/catalog
93
94 # And these are the special ones for /
95 rootprefix=@rootprefix@
96 rootbindir=$(rootprefix)/bin
97 rootlibexecdir=$(rootprefix)/lib/systemd
98
99 CLEANFILES = $(BUILT_SOURCES)
100 DISTCLEANFILES =
101 EXTRA_DIST =
102 BUILT_SOURCES =
103 INSTALL_EXEC_HOOKS =
104 UNINSTALL_EXEC_HOOKS =
105 INSTALL_DATA_HOOKS =
106 UNINSTALL_DATA_HOOKS =
107 DISTCLEAN_LOCAL_HOOKS =
108 CLEAN_LOCAL_HOOKS =
109 pkginclude_HEADERS =
110 noinst_LTLIBRARIES =
111 lib_LTLIBRARIES =
112 include_HEADERS =
113 noinst_DATA =
114 pkgconfiglib_DATA =
115 polkitpolicy_in_in_files =
116 polkitpolicy_in_files =
117 polkitpolicy_files =
118 dist_udevrules_DATA =
119 nodist_udevrules_DATA =
120 dist_pkgsysconf_DATA =
121 dist_pkgdata_DATA =
122 dist_dbuspolicy_DATA =
123 dbusinterface_DATA =
124 dist_dbussystemservice_DATA =
125 check_PROGRAMS =
126 check_DATA =
127 noinst_tests=
128 noinst_PROGRAMS = $(noinst_tests)
129 TESTS = $(noinst_tests)
130 udevlibexec_PROGRAMS =
131
132 AM_CPPFLAGS = \
133         -include $(top_builddir)/config.h \
134         -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \
135         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
136         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
137         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
138         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
139         -DUSER_CONFIG_FILE=\"$(pkgsysconfdir)/user.conf\" \
140         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
141         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
142         -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
143         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
144         -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
145         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
146         -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
147         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
148         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
149         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
150         -DROOTPREFIX=\"$(rootprefix)\" \
151         -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
152         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
153         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
154         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
155         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
156         -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
157         -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
158         -DX_SERVER=\"$(bindir)/X\" \
159         -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
160         -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
161         -I $(top_srcdir)/src \
162         -I $(top_srcdir)/src/shared \
163         -I $(top_srcdir)/src/login \
164         -I $(top_srcdir)/src/journal \
165         -I $(top_srcdir)/src/systemd \
166         -I $(top_builddir)/src/core \
167         -I $(top_srcdir)/src/core \
168         -I $(top_srcdir)/src/libudev \
169         -I $(top_srcdir)/src/udev \
170         -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
1093 EXTRA_DIST += \
1094         test/sched_idle_bad.service \
1095         test/sched_idle_ok.service \
1096         test/sched_rr_bad.service \
1097         test/sched_rr_ok.service \
1098         test/sched_rr_change.service
1099
1100 test_engine_SOURCES = \
1101         src/test/test-engine.c
1102
1103 test_engine_CFLAGS = \
1104         $(AM_CFLAGS) \
1105         $(DBUS_CFLAGS)
1106
1107 test_engine_LDADD = \
1108         libsystemd-core.la \
1109         libsystemd-daemon.la \
1110         libsystemd-dbus.la
1111
1112 test_job_type_SOURCES = \
1113         src/test/test-job-type.c
1114
1115 test_job_type_CFLAGS = \
1116         $(AM_CFLAGS) \
1117         $(DBUS_CFLAGS)
1118
1119 test_job_type_LDADD = \
1120         libsystemd-core.la \
1121         libsystemd-daemon.la
1122
1123 test_ns_SOURCES = \
1124         src/test/test-ns.c
1125
1126 test_ns_LDADD = \
1127         libsystemd-core.la
1128
1129 test_loopback_SOURCES = \
1130         src/test/test-loopback.c
1131
1132 test_loopback_LDADD = \
1133         libsystemd-shared.la \
1134         libsystemd-core.la
1135
1136 test_hostname_SOURCES = \
1137         src/test/test-hostname.c
1138
1139 test_hostname_LDADD = \
1140         libsystemd-core.la
1141
1142 if ENABLE_EFI
1143 noinst_PROGRAMS += \
1144         test-efivars
1145
1146 test_efivars_SOURCES = \
1147         src/test/test-efivars.c
1148
1149 test_efivars_LDADD = \
1150         libsystemd-shared.la
1151 endif
1152
1153 test_unit_name_SOURCES = \
1154         src/test/test-unit-name.c
1155
1156 test_unit_name_CFLAGS = \
1157         $(AM_CFLAGS) \
1158         $(DBUS_CFLAGS)
1159
1160 test_unit_name_LDADD = \
1161         libsystemd-core.la
1162
1163 test_unit_file_SOURCES = \
1164         src/test/test-unit-file.c
1165
1166 test_unit_file_CFLAGS = \
1167         $(AM_CFLAGS) \
1168         $(DBUS_CFLAGS)
1169
1170 test_unit_file_LDADD = \
1171         libsystemd-core.la
1172
1173 test_util_SOURCES = \
1174         src/test/test-util.c
1175
1176 test_util_CFLAGS = \
1177         $(AM_CFLAGS)
1178
1179 test_util_LDADD = \
1180         libsystemd-core.la
1181
1182 test_prioq_SOURCES = \
1183         src/test/test-prioq.c
1184
1185 test_prioq_CFLAGS = \
1186         $(AM_CFLAGS)
1187
1188 test_prioq_LDADD = \
1189         libsystemd-core.la
1190
1191 test_fileio_SOURCES = \
1192         src/test/test-fileio.c
1193
1194 test_fileio_CFLAGS = \
1195         $(AM_CFLAGS)
1196
1197 test_fileio_LDADD = \
1198         libsystemd-core.la
1199
1200 test_log_SOURCES = \
1201         src/test/test-log.c
1202
1203 test_log_LDADD = \
1204         libsystemd-core.la
1205
1206 test_date_SOURCES = \
1207         src/test/test-date.c
1208
1209 test_date_LDADD = \
1210         libsystemd-core.la
1211
1212 test_sleep_SOURCES = \
1213         src/test/test-sleep.c
1214
1215 test_sleep_LDADD = \
1216         libsystemd-core.la
1217
1218 test_replace_var_SOURCES = \
1219         src/test/test-replace-var.c
1220
1221 test_replace_var_LDADD = \
1222         libsystemd-shared.la
1223
1224 test_calendarspec_SOURCES = \
1225         src/test/test-calendarspec.c
1226
1227 test_calendarspec_LDADD = \
1228         libsystemd-shared.la
1229
1230 test_strip_tab_ansi_SOURCES = \
1231         src/test/test-strip-tab-ansi.c
1232
1233 test_strip_tab_ansi_LDADD = \
1234         libsystemd-shared.la
1235
1236 test_daemon_SOURCES = \
1237         src/test/test-daemon.c
1238
1239 test_daemon_LDADD = \
1240         libsystemd-shared.la \
1241         libsystemd-daemon.la
1242
1243 test_cgroup_SOURCES = \
1244         src/test/test-cgroup.c
1245
1246 test_cgroup_LDADD = \
1247         libsystemd-label.la \
1248         libsystemd-shared.la
1249
1250 test_cgroup_util_SOURCES = \
1251         src/test/test-cgroup-util.c
1252
1253 test_cgroup_util_LDADD = \
1254         libsystemd-label.la \
1255         libsystemd-shared.la
1256
1257 test_env_replace_SOURCES = \
1258         src/test/test-env-replace.c
1259
1260 test_env_replace_LDADD = \
1261         libsystemd-shared.la
1262
1263 test_strbuf_SOURCES = \
1264         src/test/test-strbuf.c
1265
1266 test_strbuf_LDADD = \
1267         libsystemd-shared.la
1268
1269 test_strv_SOURCES = \
1270         src/test/test-strv.c
1271
1272 test_strv_LDADD = \
1273         libsystemd-shared.la \
1274         libsystemd-units.la \
1275         libsystemd-id128-internal.la
1276
1277 test_path_util_SOURCES = \
1278         src/test/test-path-util.c
1279
1280 test_path_util_LDADD = \
1281         libsystemd-shared.la
1282
1283 test_strxcpyx_SOURCES = \
1284         src/test/test-strxcpyx.c
1285
1286 test_strxcpyx_LDADD = \
1287         libsystemd-shared.la
1288
1289 test_install_SOURCES = \
1290         src/test/test-install.c
1291
1292 test_install_CFLAGS = \
1293         $(AM_CFLAGS) \
1294         $(DBUS_CFLAGS)
1295
1296 test_install_LDADD = \
1297         libsystemd-units.la \
1298         libsystemd-label.la \
1299         libsystemd-shared.la \
1300         libsystemd-id128-internal.la
1301
1302 test_watchdog_SOURCES = \
1303         src/test/test-watchdog.c
1304
1305 test_watchdog_LDADD = \
1306         libsystemd-shared.la
1307
1308 test_sched_prio_SOURCES = \
1309         src/test/test-sched-prio.c
1310
1311 test_sched_prio_CFLAGS = \
1312         $(AM_CFLAGS) \
1313         $(DBUS_CFLAGS) \
1314         -D"STR(s)=\#s" -D"TEST_DIR=STR($(abs_top_srcdir)/test/)"
1315
1316 test_sched_prio_LDADD = \
1317         libsystemd-core.la \
1318         libsystemd-daemon.la
1319
1320 # ------------------------------------------------------------------------------
1321 systemd_initctl_SOURCES = \
1322         src/initctl/initctl.c
1323
1324 systemd_initctl_CFLAGS = \
1325         $(AM_CFLAGS) \
1326         $(DBUS_CFLAGS)
1327
1328 systemd_initctl_LDADD = \
1329         libsystemd-shared.la \
1330         libsystemd-daemon.la \
1331         libsystemd-dbus.la
1332
1333 # ------------------------------------------------------------------------------
1334 systemd_update_utmp_SOURCES = \
1335         src/update-utmp/update-utmp.c
1336
1337 systemd_update_utmp_CFLAGS = \
1338         $(AM_CFLAGS) \
1339         $(DBUS_CFLAGS) \
1340         $(AUDIT_CFLAGS)
1341
1342 systemd_update_utmp_LDADD = \
1343         libsystemd-shared.la \
1344         libsystemd-dbus.la \
1345         $(AUDIT_LIBS)
1346
1347 # ------------------------------------------------------------------------------
1348 systemd_shutdownd_SOURCES = \
1349         src/shutdownd/shutdownd.c
1350
1351 systemd_shutdownd_LDADD = \
1352         libsystemd-label.la \
1353         libsystemd-shared.la \
1354         libsystemd-daemon.la
1355
1356 pkginclude_HEADERS += \
1357         src/systemd/sd-shutdown.h
1358
1359 # ------------------------------------------------------------------------------
1360 systemd_shutdown_SOURCES = \
1361         src/core/umount.c \
1362         src/core/umount.h \
1363         src/core/shutdown.c \
1364         src/core/mount-setup.c \
1365         src/core/mount-setup.h \
1366         src/core/killall.h \
1367         src/core/killall.c
1368
1369 systemd_shutdown_LDADD = \
1370         libsystemd-label.la \
1371         libsystemd-shared.la \
1372         libudev.la
1373
1374 # ------------------------------------------------------------------------------
1375 if HAVE_KMOD
1376 systemd_modules_load_SOURCES = \
1377         src/modules-load/modules-load.c
1378
1379 systemd_modules_load_CFLAGS = \
1380         $(AM_CFLAGS) \
1381         $(KMOD_CFLAGS)
1382
1383 systemd_modules_load_LDADD = \
1384         libsystemd-shared.la \
1385         $(KMOD_LIBS)
1386
1387 rootlibexec_PROGRAMS += \
1388         systemd-modules-load
1389
1390 nodist_systemunit_DATA += \
1391         units/systemd-modules-load.service
1392
1393 SYSINIT_TARGET_WANTS += \
1394         systemd-modules-load.service
1395
1396 endif
1397
1398 EXTRA_DIST += \
1399         units/systemd-modules-load.service.in
1400
1401 # ------------------------------------------------------------------------------
1402 systemd_tmpfiles_SOURCES = \
1403         src/tmpfiles/tmpfiles.c
1404
1405 systemd_tmpfiles_LDADD = \
1406         libsystemd-label.la \
1407         libsystemd-shared.la \
1408         libsystemd-capability.la
1409
1410 # ------------------------------------------------------------------------------
1411 systemd_machine_id_setup_SOURCES = \
1412         src/machine-id-setup/machine-id-setup-main.c \
1413         src/core/machine-id-setup.c \
1414         src/core/machine-id-setup.h
1415
1416 systemd_machine_id_setup_LDADD = \
1417         libsystemd-label.la \
1418         libsystemd-shared.la \
1419         libsystemd-id128-internal.la
1420
1421 # ------------------------------------------------------------------------------
1422 systemd_sysctl_SOURCES = \
1423         src/sysctl/sysctl.c
1424
1425 systemd_sysctl_LDADD = \
1426         libsystemd-shared.la
1427
1428 # ------------------------------------------------------------------------------
1429 systemd_sleep_SOURCES = \
1430         src/sleep/sleep.c
1431
1432 systemd_sleep_LDADD = \
1433         libsystemd-shared.la
1434
1435 # ------------------------------------------------------------------------------
1436 systemd_fsck_SOURCES = \
1437         src/fsck/fsck.c
1438
1439 systemd_fsck_CFLAGS = \
1440         $(AM_CFLAGS) \
1441         $(DBUS_CFLAGS)
1442
1443 systemd_fsck_LDADD = \
1444         libsystemd-shared.la \
1445         libsystemd-dbus.la \
1446         libudev.la
1447
1448 # ------------------------------------------------------------------------------
1449 systemd_timestamp_SOURCES = \
1450         src/timestamp/timestamp.c
1451
1452 systemd_timestamp_LDADD = \
1453         libsystemd-shared.la
1454
1455 # ------------------------------------------------------------------------------
1456 systemd_ac_power_SOURCES = \
1457         src/ac-power/ac-power.c
1458
1459 systemd_ac_power_LDADD = \
1460         libsystemd-shared.la \
1461         libudev.la
1462
1463 # ------------------------------------------------------------------------------
1464 systemd_detect_virt_SOURCES = \
1465         src/detect-virt/detect-virt.c
1466
1467 systemd_detect_virt_LDADD = \
1468         libsystemd-shared.la
1469
1470 systemd-detect-virt-install-hook:
1471         -$(SETCAP) cap_dac_override,cap_sys_ptrace=ep $(DESTDIR)$(bindir)/systemd-detect-virt
1472
1473 INSTALL_EXEC_HOOKS += \
1474         systemd-detect-virt-install-hook
1475
1476 # ------------------------------------------------------------------------------
1477 systemd_delta_SOURCES = \
1478         src/delta/delta.c
1479
1480 systemd_delta_LDADD = \
1481         libsystemd-shared.la
1482
1483 # ------------------------------------------------------------------------------
1484 systemd_getty_generator_SOURCES = \
1485         src/getty-generator/getty-generator.c
1486
1487 systemd_getty_generator_LDADD = \
1488         libsystemd-label.la \
1489         libsystemd-shared.la
1490
1491 # ------------------------------------------------------------------------------
1492 systemd_fstab_generator_SOURCES = \
1493         src/fstab-generator/fstab-generator.c \
1494         src/core/mount-setup.c
1495
1496 systemd_fstab_generator_LDADD = \
1497         libsystemd-label.la \
1498         libsystemd-shared.la
1499
1500 # ------------------------------------------------------------------------------
1501 systemd_system_update_generator_SOURCES = \
1502         src/system-update-generator/system-update-generator.c
1503
1504 systemd_system_update_generator_LDADD = \
1505         libsystemd-label.la \
1506         libsystemd-shared.la
1507
1508 # ------------------------------------------------------------------------------
1509 if ENABLE_EFI
1510 systemgenerator_PROGRAMS +=  \
1511         systemd-efi-boot-generator
1512
1513 systemd_efi_boot_generator_SOURCES = \
1514         src/efi-boot-generator/efi-boot-generator.c
1515
1516 systemd_efi_boot_generator_LDADD = \
1517         libsystemd-label.la \
1518         libsystemd-shared.la
1519 endif
1520
1521 # ------------------------------------------------------------------------------
1522 systemd_rc_local_generator_SOURCES = \
1523         src/rc-local-generator/rc-local-generator.c
1524
1525 systemd_rc_local_generator_LDADD = \
1526         libsystemd-label.la \
1527         libsystemd-shared.la
1528
1529 # ------------------------------------------------------------------------------
1530 systemd_remount_fs_SOURCES = \
1531         src/remount-fs/remount-fs.c \
1532         src/core/mount-setup.c \
1533         src/core/mount-setup.h
1534
1535 systemd_remount_fs_LDADD = \
1536         libsystemd-label.la \
1537         libsystemd-shared.la
1538
1539 # ------------------------------------------------------------------------------
1540 systemd_cgroups_agent_SOURCES = \
1541         src/cgroups-agent/cgroups-agent.c
1542
1543 systemd_cgroups_agent_CFLAGS = \
1544         $(AM_CFLAGS) \
1545         $(DBUS_CFLAGS)
1546
1547 systemd_cgroups_agent_LDADD = \
1548         libsystemd-shared.la \
1549         libsystemd-dbus.la
1550
1551 # ------------------------------------------------------------------------------
1552 systemctl_SOURCES = \
1553         src/systemctl/systemctl.c
1554
1555 systemctl_CFLAGS = \
1556         $(AM_CFLAGS) \
1557         $(DBUS_CFLAGS)
1558
1559 systemctl_LDADD = \
1560         libsystemd-units.la \
1561         libsystemd-label.la \
1562         libsystemd-shared.la \
1563         libsystemd-daemon.la \
1564         libsystemd-dbus.la \
1565         libsystemd-logs.la
1566
1567 # ------------------------------------------------------------------------------
1568 systemd_notify_SOURCES = \
1569         src/notify/notify.c \
1570         src/readahead/sd-readahead.c
1571
1572 systemd_notify_LDADD = \
1573         libsystemd-shared.la \
1574         libsystemd-daemon.la
1575
1576 # ------------------------------------------------------------------------------
1577 systemd_ask_password_SOURCES = \
1578         src/ask-password/ask-password.c
1579
1580 systemd_ask_password_LDADD = \
1581         libsystemd-label.la \
1582         libsystemd-shared.la
1583
1584 # ------------------------------------------------------------------------------
1585 systemd_reply_password_SOURCES = \
1586         src/reply-password/reply-password.c
1587
1588 systemd_reply_password_LDADD = \
1589         libsystemd-shared.la
1590
1591 # ------------------------------------------------------------------------------
1592 systemd_cgls_SOURCES = \
1593         src/cgls/cgls.c
1594
1595 systemd_cgls_LDADD = \
1596         libsystemd-shared.la
1597
1598 # ------------------------------------------------------------------------------
1599 systemd_cgtop_SOURCES = \
1600         src/cgtop/cgtop.c
1601
1602 systemd_cgtop_LDADD = \
1603         libsystemd-shared.la
1604
1605 # ------------------------------------------------------------------------------
1606 systemd_nspawn_SOURCES = \
1607         src/nspawn/nspawn.c \
1608         src/core/mount-setup.c \
1609         src/core/mount-setup.h \
1610         src/core/loopback-setup.c \
1611         src/core/loopback-setup.h
1612
1613 systemd_nspawn_LDADD = \
1614         libsystemd-label.la \
1615         libsystemd-capability.la \
1616         libsystemd-shared.la \
1617         libsystemd-daemon.la \
1618         libsystemd-id128-internal.la
1619
1620 # ------------------------------------------------------------------------------
1621 systemd_stdio_bridge_SOURCES = \
1622         src/stdio-bridge/stdio-bridge.c
1623
1624 systemd_stdio_bridge_LDADD = \
1625         libsystemd-shared.la \
1626         libsystemd-bus.la \
1627         libsystemd-daemon.la
1628
1629 # ------------------------------------------------------------------------------
1630 systemd_tty_ask_password_agent_SOURCES = \
1631         src/tty-ask-password-agent/tty-ask-password-agent.c
1632
1633 systemd_tty_ask_password_agent_LDADD = \
1634         libsystemd-label.la \
1635         libsystemd-shared.la
1636
1637 # ------------------------------------------------------------------------------
1638 libsystemd_daemon_la_SOURCES = \
1639         src/libsystemd-daemon/sd-daemon.c
1640
1641 libsystemd_daemon_internal_la_SOURCES = \
1642         $(libsystemd_daemon_la_SOURCES)
1643
1644 libsystemd_daemon_la_CFLAGS = \
1645         $(AM_CFLAGS) \
1646         -fvisibility=hidden \
1647         -DSD_EXPORT_SYMBOLS
1648
1649 libsystemd_daemon_la_LDFLAGS = \
1650         $(AM_LDFLAGS) \
1651         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
1652         -Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon/libsystemd-daemon.sym
1653
1654 pkginclude_HEADERS += \
1655         src/systemd/sd-daemon.h
1656
1657 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1658 libsystemd-daemon-install-hook:
1659         libname=libsystemd-daemon.so && $(move-to-rootlibdir)
1660
1661 libsystemd-daemon-uninstall-hook:
1662         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
1663
1664 INSTALL_EXEC_HOOKS += libsystemd-daemon-install-hook
1665 UNINSTALL_EXEC_HOOKS += libsystemd-daemon-uninstall-hook
1666
1667 lib_LTLIBRARIES += \
1668         libsystemd-daemon.la
1669
1670 noinst_LTLIBRARIES += \
1671         libsystemd-daemon-internal.la
1672
1673 pkgconfiglib_DATA += \
1674         src/libsystemd-daemon/libsystemd-daemon.pc
1675
1676 EXTRA_DIST += \
1677         src/libsystemd-daemon/libsystemd-daemon.pc.in \
1678         src/libsystemd-daemon/libsystemd-daemon.sym
1679
1680 # ------------------------------------------------------------------------------
1681 libsystemd_bus_la_SOURCES = \
1682         src/systemd/sd-bus.h \
1683         src/systemd/sd-bus-protocol.h \
1684         src/libsystemd-bus/sd-bus.c \
1685         src/libsystemd-bus/bus-control.c \
1686         src/libsystemd-bus/bus-control.h \
1687         src/libsystemd-bus/bus-error.c \
1688         src/libsystemd-bus/bus-error.h \
1689         src/libsystemd-bus/bus-internal.c \
1690         src/libsystemd-bus/bus-internal.h \
1691         src/libsystemd-bus/bus-socket.c \
1692         src/libsystemd-bus/bus-socket.h \
1693         src/libsystemd-bus/bus-message.c \
1694         src/libsystemd-bus/bus-message.h \
1695         src/libsystemd-bus/bus-signature.c \
1696         src/libsystemd-bus/bus-signature.h \
1697         src/libsystemd-bus/bus-type.c \
1698         src/libsystemd-bus/bus-type.h \
1699         src/libsystemd-bus/bus-match.c \
1700         src/libsystemd-bus/bus-match.h
1701
1702 libsystemd_bus_la_LIBADD =  \
1703         libsystemd-id128-internal.la \
1704         libsystemd-shared.la \
1705         libsystemd-daemon.la
1706
1707 noinst_LTLIBRARIES += \
1708         libsystemd-bus.la
1709
1710 noinst_tests += \
1711         test-bus-marshal \
1712         test-bus-signature \
1713         test-bus-chat \
1714         test-bus-server \
1715         test-bus-match
1716
1717 noinst_PROGRAMS += \
1718         busctl
1719
1720 test_bus_marshal_SOURCES = \
1721         src/libsystemd-bus/test-bus-marshal.c
1722
1723 test_bus_marshal_LDADD = \
1724         libsystemd-shared.la \
1725         libsystemd-bus.la \
1726         $(GLIB_LIBS) \
1727         $(DBUS_LIBS)
1728
1729 test_bus_marshal_CFLAGS = \
1730         $(AM_CFLAGS) \
1731         $(GLIB_CFLAGS) \
1732         $(DBUS_CFLAGS)
1733
1734 test_bus_signature_SOURCES = \
1735         src/libsystemd-bus/test-bus-signature.c
1736
1737 test_bus_signature_LDADD = \
1738         libsystemd-shared.la \
1739         libsystemd-bus.la
1740
1741 test_bus_chat_SOURCES = \
1742         src/libsystemd-bus/test-bus-chat.c
1743
1744 test_bus_chat_CFLAGS = \
1745         $(AM_CFLAGS) \
1746         -pthread
1747
1748 test_bus_chat_LDADD = \
1749         libsystemd-shared.la \
1750         libsystemd-bus.la \
1751         libsystemd-id128-internal.la
1752
1753 test_bus_server_SOURCES = \
1754         src/libsystemd-bus/test-bus-server.c
1755
1756 test_bus_server_CFLAGS = \
1757         $(AM_CFLAGS) \
1758         -pthread
1759
1760 test_bus_server_LDADD = \
1761         libsystemd-shared.la \
1762         libsystemd-bus.la \
1763         libsystemd-id128-internal.la
1764
1765 test_bus_match_SOURCES = \
1766         src/libsystemd-bus/test-bus-match.c
1767
1768 test_bus_match_CFLAGS = \
1769         $(AM_CFLAGS)
1770
1771 test_bus_match_LDADD = \
1772         libsystemd-shared.la \
1773         libsystemd-bus.la \
1774         libsystemd-id128-internal.la
1775
1776 busctl_SOURCES = \
1777         src/libsystemd-bus/busctl.c
1778
1779 busctl_LDADD = \
1780         libsystemd-shared.la \
1781         libsystemd-bus.la
1782
1783 # ------------------------------------------------------------------------------
1784 if ENABLE_GTK_DOC
1785 SUBDIRS += \
1786         docs/libudev
1787
1788 noinst_DATA += \
1789         docs/html/libudev \
1790         docs/html/gudev
1791 endif
1792
1793 include_HEADERS += \
1794         src/libudev/libudev.h
1795
1796 lib_LTLIBRARIES += \
1797         libudev.la
1798
1799 libudev_la_SOURCES =\
1800         src/libudev/libudev-private.h \
1801         src/libudev/libudev.c \
1802         src/libudev/libudev-list.c \
1803         src/libudev/libudev-util.c \
1804         src/libudev/libudev-device.c \
1805         src/libudev/libudev-enumerate.c \
1806         src/libudev/libudev-monitor.c \
1807         src/libudev/libudev-queue.c \
1808         src/libudev/libudev-hwdb-def.h \
1809         src/libudev/libudev-hwdb.c
1810
1811 libudev_la_CFLAGS = \
1812         $(AM_CFLAGS) \
1813         -fvisibility=hidden
1814
1815 libudev_la_LDFLAGS = \
1816         $(AM_LDFLAGS) \
1817         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
1818         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
1819
1820 libudev_la_LIBADD = \
1821         libsystemd-shared.la \
1822         libsystemd-daemon-internal.la \
1823         libsystemd-id128-internal.la
1824
1825 pkgconfiglib_DATA += \
1826         src/libudev/libudev.pc
1827
1828 EXTRA_DIST += \
1829         src/libudev/libudev.pc.in \
1830         src/libudev/libudev.sym
1831
1832 CLEANFILES += \
1833         src/libudev/libudev.pc \
1834         docs/html/libudev \
1835         docs/html/gudev
1836
1837 docs/html/libudev:
1838         $(AM_V_at)$(MKDIR_P) $(dir $@)
1839         $(AM_V_LN)$(LN_S) -f ../libudev/html $@
1840
1841 docs/html/gudev:
1842         $(AM_V_at)$(MKDIR_P) $(dir $@)
1843         $(AM_V_LN)$(LN_S) -f ../gudev/html $@
1844
1845 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1846 libudev-install-hook:
1847         libname=libudev.so && $(move-to-rootlibdir)
1848
1849 libudev-uninstall-hook:
1850         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
1851
1852 INSTALL_EXEC_HOOKS += libudev-install-hook
1853 UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
1854
1855 # ------------------------------------------------------------------------------
1856 noinst_LTLIBRARIES += \
1857         libudev-private.la
1858
1859 libudev_private_la_SOURCES =\
1860         $(libudev_la_SOURCES) \
1861         src/libudev/libudev-device-private.c \
1862         src/libudev/libudev-queue-private.c
1863
1864 libudev_private_la_CFLAGS = \
1865         $(AM_CFLAGS) \
1866         -fvisibility=default
1867
1868 libudev_private_la_LIBADD = \
1869         libsystemd-shared.la
1870
1871 # ------------------------------------------------------------------------------
1872 INSTALL_DIRS += \
1873         $(sysconfdir)/udev/rules.d \
1874         $(sysconfdir)/udev/hwdb.d
1875
1876 dist_udevrules_DATA += \
1877         rules/99-systemd.rules \
1878         rules/42-usb-hid-pm.rules \
1879         rules/50-udev-default.rules \
1880         rules/60-persistent-storage-tape.rules \
1881         rules/60-persistent-serial.rules \
1882         rules/60-persistent-input.rules \
1883         rules/60-persistent-alsa.rules \
1884         rules/60-persistent-storage.rules \
1885         rules/64-btrfs.rules \
1886         rules/75-net-description.rules \
1887         rules/75-tty-description.rules \
1888         rules/78-sound-card.rules \
1889         rules/80-net-name-slot.rules \
1890         rules/95-udev-late.rules
1891
1892 dist_udevhwdb_DATA = \
1893         hwdb/20-pci-vendor-model.hwdb \
1894         hwdb/20-pci-classes.hwdb \
1895         hwdb/20-usb-vendor-model.hwdb \
1896         hwdb/20-usb-classes.hwdb \
1897         hwdb/20-bluetooth-vendor-product.hwdb \
1898         hwdb/20-acpi-vendor.hwdb \
1899         hwdb/20-OUI.hwdb
1900
1901 udevconfdir = $(sysconfdir)/udev
1902 dist_udevconf_DATA = \
1903         src/udev/udev.conf
1904
1905 sharepkgconfigdir = $(datadir)/pkgconfig
1906 sharepkgconfig_DATA = \
1907         src/udev/udev.pc
1908
1909 EXTRA_DIST += \
1910         rules/99-systemd.rules.in \
1911         src/udev/udev.pc.in
1912
1913 CLEANFILES += \
1914         rules/99-systemd.rules \
1915         src/udev/udev.pc
1916
1917 EXTRA_DIST += \
1918         units/systemd-udevd.service.in \
1919         units/systemd-udev-trigger.service.in \
1920         units/systemd-udev-settle.service.in
1921
1922 CLEANFILES += \
1923         units/systemd-udevd.service \
1924         units/systemd-udev-trigger.service \
1925         units/systemd-udev-settle.service
1926
1927 SOCKETS_TARGET_WANTS += \
1928         systemd-udevd-control.socket \
1929         systemd-udevd-kernel.socket
1930 SYSINIT_TARGET_WANTS += \
1931         systemd-udevd.service \
1932         systemd-udev-trigger.service
1933
1934 rootbin_PROGRAMS += \
1935         udevadm
1936
1937 rootlibexec_PROGRAMS += \
1938         systemd-udevd
1939
1940 noinst_LTLIBRARIES += \
1941         libudev-core.la
1942
1943 libudev_core_la_SOURCES = \
1944         src/udev/udev.h \
1945         src/udev/udev-event.c \
1946         src/udev/udev-watch.c \
1947         src/udev/udev-node.c \
1948         src/udev/udev-rules.c \
1949         src/udev/udev-ctrl.c \
1950         src/udev/udev-builtin.c \
1951         src/udev/udev-builtin-btrfs.c \
1952         src/udev/udev-builtin-hwdb.c \
1953         src/udev/udev-builtin-input_id.c \
1954         src/udev/udev-builtin-net_id.c \
1955         src/udev/udev-builtin-path_id.c \
1956         src/udev/udev-builtin-usb_id.c
1957
1958 libudev_core_la_CFLAGS = \
1959         $(AM_CFLAGS) \
1960         $(BLKID_CFLAGS) \
1961         $(KMOD_CFLAGS)
1962
1963 libudev_core_la_LIBADD = \
1964         libudev-private.la \
1965         libsystemd-label.la \
1966         libsystemd-daemon-internal.la \
1967         libsystemd-shared.la \
1968         $(BLKID_LIBS) \
1969         $(KMOD_LIBS)
1970
1971 libudev_core_la_CPPFLAGS = \
1972         $(AM_CPPFLAGS) \
1973         -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
1974
1975 if ENABLE_FIRMWARE
1976 libudev_core_la_SOURCES += \
1977         src/udev/udev-builtin-firmware.c
1978
1979 dist_udevrules_DATA += \
1980         rules/50-firmware.rules
1981 endif
1982
1983 if HAVE_KMOD
1984 libudev_core_la_SOURCES += \
1985         src/udev/udev-builtin-kmod.c
1986
1987 dist_udevrules_DATA += \
1988         rules/80-drivers.rules
1989 endif
1990
1991 if HAVE_BLKID
1992 libudev_core_la_SOURCES += \
1993         src/udev/udev-builtin-blkid.c
1994 endif
1995
1996 if HAVE_ACL
1997 libudev_core_la_SOURCES += \
1998         src/udev/udev-builtin-uaccess.c \
1999         src/login/logind-acl.c \
2000         src/login/sd-login.c
2001
2002 libudev_core_la_LIBADD += \
2003         libsystemd-acl.la
2004 endif
2005
2006 systemd_udevd_SOURCES = \
2007         src/udev/udevd.c
2008
2009 systemd_udevd_LDADD = \
2010         libudev-core.la
2011
2012 udevadm_SOURCES = \
2013         src/udev/udevadm.c \
2014         src/udev/udevadm-info.c \
2015         src/udev/udevadm-control.c \
2016         src/udev/udevadm-monitor.c \
2017         src/udev/udevadm-hwdb.c \
2018         src/udev/udevadm-settle.c \
2019         src/udev/udevadm-trigger.c \
2020         src/udev/udevadm-test.c \
2021         src/udev/udevadm-test-builtin.c
2022
2023 udevadm_LDADD = \
2024         libudev-core.la \
2025         libsystemd-shared.la
2026
2027 # Update hwdb on installation. Do not bother if installing
2028 # in DESTDIR, since this is likely for packaging purposes.
2029 hwdb-update-hook:
2030         -test -n "$(DESTDIR)" || $(rootbindir)/udevadm hwdb --update
2031
2032 INSTALL_DATA_HOOKS += \
2033         hwdb-update-hook
2034
2035 hwdb-remove-hook:
2036         -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
2037
2038 # ------------------------------------------------------------------------------
2039 TESTS += \
2040         test/udev-test.pl \
2041         test/rules-test.sh
2042
2043 noinst_PROGRAMS += \
2044         test-libudev \
2045         test-udev
2046
2047 test_libudev_SOURCES = \
2048         src/test/test-libudev.c
2049
2050 test_libudev_LDADD = \
2051         libsystemd-label.la \
2052         libsystemd-shared.la \
2053         libudev.la
2054
2055 test_udev_SOURCES = \
2056         src/test/test-udev.c
2057
2058 test_udev_LDADD = \
2059         libudev-core.la \
2060         libsystemd-shared.la \
2061         $(BLKID_LIBS) \
2062         $(KMOD_LIBS) \
2063         $(SELINUX_LIBS)
2064
2065 if HAVE_ACL
2066 test_udev_LDADD += \
2067         libsystemd-acl.la
2068 endif
2069
2070 check_DATA += \
2071         test/sys
2072
2073 # packed sysfs test tree
2074 test/sys:
2075         $(AM_V_at)$(MKDIR_P) $(dir $@)
2076         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
2077
2078 test-sys-distclean:
2079         -rm -rf test/sys
2080 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
2081
2082 EXTRA_DIST += \
2083         test/sys.tar.xz \
2084         test/udev-test.pl \
2085         test/rules-test.sh \
2086         test/rule-syntax-check.py
2087
2088 # ------------------------------------------------------------------------------
2089 ata_id_SOURCES = \
2090         src/udev/ata_id/ata_id.c
2091
2092 ata_id_LDADD = \
2093         libudev-private.la \
2094         libsystemd-shared.la
2095
2096 udevlibexec_PROGRAMS += \
2097         ata_id
2098
2099 # ------------------------------------------------------------------------------
2100 cdrom_id_SOURCES = \
2101         src/udev/cdrom_id/cdrom_id.c
2102
2103 cdrom_id_LDADD = \
2104         libudev.la \
2105         libsystemd-shared.la
2106
2107 udevlibexec_PROGRAMS += \
2108         cdrom_id
2109
2110 dist_udevrules_DATA += \
2111         rules/60-cdrom_id.rules
2112
2113 # ------------------------------------------------------------------------------
2114 collect_SOURCES = \
2115         src/udev/collect/collect.c
2116
2117 collect_LDADD = \
2118         libudev-private.la
2119
2120 udevlibexec_PROGRAMS += \
2121         collect
2122
2123 # ------------------------------------------------------------------------------
2124 scsi_id_SOURCES =\
2125         src/udev/scsi_id/scsi_id.c \
2126         src/udev/scsi_id/scsi_serial.c \
2127         src/udev/scsi_id/scsi.h \
2128         src/udev/scsi_id/scsi_id.h
2129
2130 scsi_id_LDADD = \
2131         libudev-private.la \
2132         libsystemd-shared.la
2133
2134 udevlibexec_PROGRAMS += \
2135         scsi_id
2136
2137 EXTRA_DIST += \
2138         src/udev/scsi_id/README
2139
2140 # ------------------------------------------------------------------------------
2141 v4l_id_SOURCES = \
2142         src/udev/v4l_id/v4l_id.c
2143
2144 v4l_id_LDADD = \
2145         libudev.la
2146
2147 udevlibexec_PROGRAMS += \
2148         v4l_id
2149
2150 dist_udevrules_DATA += \
2151         rules/60-persistent-v4l.rules
2152
2153 # ------------------------------------------------------------------------------
2154 accelerometer_SOURCES = \
2155         src/udev/accelerometer/accelerometer.c
2156
2157 accelerometer_LDADD = \
2158         libudev.la -lm \
2159         libsystemd-shared.la
2160
2161 udevlibexec_PROGRAMS += \
2162         accelerometer
2163
2164 dist_udevrules_DATA += \
2165         rules/61-accelerometer.rules
2166
2167 # ------------------------------------------------------------------------------
2168 if ENABLE_GUDEV
2169 if ENABLE_GTK_DOC
2170 SUBDIRS += \
2171         docs/gudev
2172 endif
2173
2174 libgudev_includedir = \
2175         $(includedir)/gudev-1.0/gudev
2176
2177 libgudev_include_HEADERS = \
2178         src/gudev/gudev.h \
2179         src/gudev/gudevenums.h \
2180         src/gudev/gudevenumtypes.h \
2181         src/gudev/gudevtypes.h \
2182         src/gudev/gudevclient.h \
2183         src/gudev/gudevdevice.h \
2184         src/gudev/gudevenumerator.h
2185
2186 lib_LTLIBRARIES += libgudev-1.0.la
2187
2188 pkgconfiglib_DATA += \
2189         src/gudev/gudev-1.0.pc
2190
2191 CLEANFILES += \
2192         src/gudev/gudev-1.0.pc
2193
2194 libgudev_1_0_la_SOURCES = \
2195         src/gudev/gudevenums.h \
2196         src/gudev/gudevenumtypes.h \
2197         src/gudev/gudevenumtypes.h\
2198         src/gudev/gudevtypes.h \
2199         src/gudev/gudevclient.h \
2200         src/gudev/gudevclient.c \
2201         src/gudev/gudevdevice.h \
2202         src/gudev/gudevdevice.c \
2203         src/gudev/gudevenumerator.h \
2204         src/gudev/gudevenumerator.c \
2205         src/gudev/gudevprivate.h
2206
2207 nodist_libgudev_1_0_la_SOURCES = \
2208         src/gudev/gudevmarshal.h \
2209         src/gudev/gudevmarshal.c \
2210         src/gudev/gudevenumtypes.h \
2211         src/gudev/gudevenumtypes.c
2212
2213 BUILT_SOURCES += \
2214         $(nodist_libgudev_1_0_la_SOURCES)
2215
2216 libgudev_1_0_la_CPPFLAGS = \
2217         $(AM_CPPFLAGS) \
2218         -I$(top_builddir)/src\
2219         -I$(top_srcdir)/src\
2220         -I$(top_builddir)/src/gudev \
2221         -I$(top_srcdir)/src/gudev \
2222         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
2223         -D_GUDEV_COMPILATION \
2224         -DG_LOG_DOMAIN=\"GUdev\"
2225
2226 libgudev_1_0_la_CFLAGS = \
2227         $(AM_CFLAGS) \
2228         -fvisibility=default \
2229         $(GLIB_CFLAGS)
2230
2231 libgudev_1_0_la_LIBADD = \
2232         libudev.la \
2233         $(GLIB_LIBS)
2234
2235 libgudev_1_0_la_LDFLAGS = \
2236         $(AM_LDFLAGS) \
2237         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
2238         -export-dynamic -no-undefined \
2239         -export-symbols-regex '^g_udev_.*'
2240
2241 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
2242         $(AM_V_at)$(MKDIR_P) $(dir $@)
2243         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
2244
2245 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
2246         $(AM_V_at)$(MKDIR_P) $(dir $@)
2247         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
2248         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
2249
2250 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
2251         $(AM_V_at)$(MKDIR_P) $(dir $@)
2252         $(AM_V_GEN)glib-mkenums --template $^ > $@
2253
2254 if HAVE_INTROSPECTION
2255 -include $(INTROSPECTION_MAKEFILE)
2256
2257 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
2258
2259 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
2260
2261 src_gudev_GUdev_1_0_gir_CFLAGS = \
2262         $(INCLUDES) \
2263         -D_GUDEV_COMPILATION \
2264         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
2265         -I$(top_srcdir)/src \
2266         -I$(top_builddir)/src \
2267         -I$(top_srcdir)/src/gdev \
2268         -I$(top_builddir)/src/gdev
2269
2270 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
2271
2272 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
2273         --pkg-export=gudev-1.0 \
2274         --warn-all
2275
2276 src_gudev_GUdev_1_0_gir_FILES = \
2277         src/gudev/gudev.h \
2278         src/gudev/gudevtypes.h \
2279         src/gudev/gudevenums.h \
2280         src/gudev/gudevenumtypes.h \
2281         src/gudev/gudevclient.h \
2282         src/gudev/gudevdevice.h \
2283         src/gudev/gudevenumerator.h \
2284         src/gudev/gudevclient.c \
2285         src/gudev/gudevdevice.c \
2286         src/gudev/gudevenumerator.c
2287
2288 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
2289 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
2290
2291 girdir = $(datadir)/gir-1.0
2292 gir_DATA = \
2293         src/gudev/GUdev-1.0.gir
2294
2295 typelibsdir = $(libdir)/girepository-1.0
2296 typelibs_DATA = \
2297         src/gudev/GUdev-1.0.typelib
2298
2299 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
2300 endif # HAVE_INTROSPECTION
2301
2302 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2303 libgudev-install-hook:
2304         libname=libgudev-1.0.so && $(move-to-rootlibdir)
2305
2306 libgudev-uninstall-hook:
2307         rm -f $(DESTDIR)$(rootlibdir)/libgudev-1.0.so*
2308
2309 INSTALL_EXEC_HOOKS += libgudev-install-hook
2310 UNINSTALL_EXEC_HOOKS += libgudev-uninstall-hook
2311 endif
2312
2313 EXTRA_DIST += \
2314         src/gudev/gudev-1.0.pc.in \
2315         src/gudev/gudevmarshal.list \
2316         src/gudev/gudevenumtypes.h.template \
2317         src/gudev/gudevenumtypes.c.template \
2318         src/gudev/gjs-example.js \
2319         src/gudev/seed-example-enum.js \
2320         src/gudev/seed-example.js
2321
2322 # ------------------------------------------------------------------------------
2323 if ENABLE_KEYMAP
2324 keymap_SOURCES = \
2325         src/udev/keymap/keymap.c
2326
2327 keymap_CPPFLAGS = \
2328         $(AM_CPPFLAGS) -I src/udev/keymap
2329
2330 keymap_LDADD = \
2331         libsystemd-shared.la
2332
2333 nodist_keymap_SOURCES = \
2334         src/udev/keymap/keys-from-name.h \
2335         src/udev/keymap/keys-to-name.h
2336
2337 BUILT_SOURCES += \
2338         $(nodist_keymap_SOURCES)
2339
2340 udevlibexec_PROGRAMS += \
2341         keymap
2342
2343 dist_doc_DATA += \
2344         src/udev/keymap/README.keymap.txt
2345
2346 dist_udevrules_DATA += \
2347         src/udev/keymap/95-keymap.rules \
2348         src/udev/keymap/95-keyboard-force-release.rules
2349
2350 dist_udevhome_SCRIPTS = \
2351         src/udev/keymap/findkeyboards \
2352         src/udev/keymap/keyboard-force-release.sh
2353
2354 TESTS += \
2355         src/udev/keymap/check-keymaps.sh
2356
2357 CLEANFILES += \
2358         src/udev/keymap/keys.txt \
2359         src/udev/keymap/keys-from-name.gperf \
2360         src/udev/keymap/keyboard-force-release.sh
2361
2362 udevkeymapdir = $(udevlibexecdir)/keymaps
2363 dist_udevkeymap_DATA = \
2364         keymaps/acer \
2365         keymaps/acer-aspire_5720 \
2366         keymaps/acer-aspire_8930 \
2367         keymaps/acer-aspire_5920g \
2368         keymaps/acer-aspire_6920 \
2369         keymaps/acer-travelmate_c300 \
2370         keymaps/asus \
2371         keymaps/compaq-e_evo \
2372         keymaps/dell \
2373         keymaps/dell-latitude-xt2 \
2374         keymaps/everex-xt5000 \
2375         keymaps/fujitsu-amilo_li_2732 \
2376         keymaps/fujitsu-amilo_pa_2548 \
2377         keymaps/fujitsu-amilo_pro_edition_v3505 \
2378         keymaps/fujitsu-amilo_pro_v3205 \
2379         keymaps/fujitsu-amilo_si_1520 \
2380         keymaps/fujitsu-esprimo_mobile_v5 \
2381         keymaps/fujitsu-esprimo_mobile_v6 \
2382         keymaps/genius-slimstar-320 \
2383         keymaps/hewlett-packard \
2384         keymaps/hewlett-packard-2510p_2530p \
2385         keymaps/hewlett-packard-compaq_elitebook \
2386         keymaps/hewlett-packard-pavilion \
2387         keymaps/hewlett-packard-presario-2100 \
2388         keymaps/hewlett-packard-tablet \
2389         keymaps/hewlett-packard-tx2 \
2390         keymaps/hewlett-packard_elitebook-8440p \
2391         keymaps/hewlett-packard-hdx9494nr \
2392         keymaps/ibm-thinkpad-usb-keyboard-trackpoint \
2393         keymaps/inventec-symphony_6.0_7.0 \
2394         keymaps/lenovo-3000 \
2395         keymaps/lenovo-ideapad \
2396         keymaps/lenovo-thinkpad-usb-keyboard-trackpoint \
2397         keymaps/lenovo-thinkpad_x6_tablet \
2398         keymaps/lenovo-thinkpad_x200_tablet \
2399         keymaps/lg-x110 \
2400         keymaps/logitech-wave \
2401         keymaps/logitech-wave-cordless \
2402         keymaps/logitech-wave-pro-cordless \
2403         keymaps/maxdata-pro_7000 \
2404         keymaps/medion-fid2060 \
2405         keymaps/medionnb-a555 \
2406         keymaps/micro-star \
2407         keymaps/module-asus-w3j \
2408         keymaps/module-ibm \
2409         keymaps/module-lenovo \
2410         keymaps/module-sony \
2411         keymaps/module-sony-old \
2412         keymaps/module-sony-vgn \
2413         keymaps/module-sony-vpc \
2414         keymaps/olpc-xo \
2415         keymaps/onkyo \
2416         keymaps/oqo-model2 \
2417         keymaps/samsung-other \
2418         keymaps/samsung-series-9 \
2419         keymaps/samsung-sq1us \
2420         keymaps/samsung-sx20s \
2421         keymaps/toshiba-satellite_a100 \
2422         keymaps/toshiba-satellite_a110 \
2423         keymaps/toshiba-satellite_m30x \
2424         keymaps/zepto-znote
2425
2426 udevkeymapforcereldir = $(udevlibexecdir)/keymaps/force-release
2427 dist_udevkeymapforcerel_DATA = \
2428         keymaps-force-release/dell-touchpad \
2429         keymaps-force-release/dell-xps \
2430         keymaps-force-release/hp-other \
2431         keymaps-force-release/samsung-other \
2432         keymaps-force-release/samsung-series-9 \
2433         keymaps-force-release/common-volume-keys
2434
2435 src/udev/keymap/keys.txt: Makefile
2436         $(AM_V_at)$(MKDIR_P) $(dir $@)
2437         $(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/' > $@
2438
2439 src/udev/keymap/keys-from-name.gperf: src/udev/keymap/keys.txt Makefile
2440         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@
2441
2442 src/udev/keymap/keys-from-name.h: src/udev/keymap/keys-from-name.gperf Makefile
2443         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C < $< > $@
2444
2445 src/udev/keymap/keys-to-name.h: src/udev/keymap/keys.txt Makefile
2446         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
2447 endif
2448
2449 EXTRA_DIST += \
2450         src/udev/keymap/check-keymaps.sh \
2451         src/udev/keymap/keyboard-force-release.sh.in
2452
2453 # ------------------------------------------------------------------------------
2454 mtd_probe_SOURCES =  \
2455         src/udev/mtd_probe/mtd_probe.c \
2456         src/udev/mtd_probe/mtd_probe.h \
2457         src/udev/mtd_probe/probe_smartmedia.c
2458
2459 mtd_probe_CPPFLAGS = \
2460         $(AM_CPPFLAGS)
2461
2462 dist_udevrules_DATA += \
2463         rules/75-probe_mtd.rules
2464
2465 udevlibexec_PROGRAMS += \
2466         mtd_probe
2467
2468 # ------------------------------------------------------------------------------
2469 libsystemd_id128_la_SOURCES = \
2470         src/libsystemd-id128/sd-id128.c
2471
2472 libsystemd_id128_la_CFLAGS = \
2473         $(AM_CFLAGS) \
2474         -fvisibility=hidden
2475
2476 libsystemd_id128_la_LDFLAGS = \
2477         $(AM_LDFLAGS) \
2478         -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
2479         -Wl,--version-script=$(top_srcdir)/src/libsystemd-id128/libsystemd-id128.sym
2480
2481 libsystemd_id128_la_LIBADD = \
2482         libsystemd-shared.la \
2483         libsystemd-daemon-internal.la
2484
2485 libsystemd_id128_internal_la_SOURCES = \
2486         $(libsystemd_id128_la_SOURCES)
2487
2488 test_id128_SOURCES = \
2489         src/test/test-id128.c
2490
2491 test_id128_LDADD = \
2492         libsystemd-shared.la \
2493         libsystemd-id128-internal.la
2494
2495 noinst_tests += \
2496         test-id128
2497
2498 pkginclude_HEADERS += \
2499         src/systemd/sd-id128.h
2500
2501 lib_LTLIBRARIES += \
2502         libsystemd-id128.la
2503
2504 noinst_LTLIBRARIES += \
2505         libsystemd-id128-internal.la
2506
2507 pkgconfiglib_DATA += \
2508         src/libsystemd-id128/libsystemd-id128.pc
2509
2510 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2511 libsystemd-id128-install-hook:
2512         libname=libsystemd-id128.so && $(move-to-rootlibdir)
2513
2514 libsystemd-id128-uninstall-hook:
2515         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
2516
2517 INSTALL_EXEC_HOOKS += libsystemd-id128-install-hook
2518 UNINSTALL_EXEC_HOOKS += libsystemd-id128-uninstall-hook
2519
2520 EXTRA_DIST += \
2521         src/libsystemd-id128/libsystemd-id128.pc.in \
2522         src/libsystemd-id128/libsystemd-id128.sym
2523
2524 # ------------------------------------------------------------------------------
2525
2526 rootlibexec_PROGRAMS += \
2527         systemd-activate
2528
2529 systemd_activate_SOURCES = \
2530         src/activate/activate.c
2531
2532 systemd_activate_LDADD = \
2533         libsystemd-shared.la \
2534         libsystemd-daemon.la
2535
2536 # ------------------------------------------------------------------------------
2537 systemd_journald_SOURCES = \
2538         src/journal/journald.c \
2539         src/journal/journald-server.h
2540
2541 systemd_journald_LDADD = \
2542         libsystemd-journal-internal.la \
2543         libsystemd-shared.la \
2544         libsystemd-id128-internal.la
2545
2546 systemd_cat_SOURCES = \
2547         src/journal/cat.c
2548
2549 systemd_cat_LDADD = \
2550         libsystemd-shared.la \
2551         libsystemd-journal-internal.la
2552
2553 journalctl_SOURCES = \
2554         src/journal/journalctl.c
2555
2556 journalctl_CFLAGS = \
2557         $(AM_CFLAGS)
2558
2559 journalctl_LDADD = \
2560         libsystemd-shared.la \
2561         libsystemd-journal-internal.la \
2562         libsystemd-id128-internal.la \
2563         libsystemd-logs.la
2564
2565 if HAVE_ACL
2566 journalctl_LDADD += \
2567         libsystemd-acl.la
2568 endif
2569
2570 if HAVE_QRENCODE
2571 journalctl_SOURCES += \
2572         src/journal/journal-qrcode.c \
2573         src/journal/journal-qrcode.h
2574
2575 journalctl_CFLAGS += \
2576         $(QRENCODE_CFLAGS)
2577
2578 journalctl_LDADD += \
2579         $(QRENCODE_LIBS)
2580 endif
2581
2582 test_journal_SOURCES = \
2583         src/journal/test-journal.c
2584
2585 test_journal_LDADD = \
2586         libsystemd-shared.la \
2587         libsystemd-journal-internal.la \
2588         libsystemd-id128-internal.la
2589
2590 test_journal_send_SOURCES = \
2591         src/journal/test-journal-send.c
2592
2593 test_journal_send_LDADD = \
2594         libsystemd-shared.la \
2595         libsystemd-journal-internal.la \
2596         libsystemd-id128-internal.la
2597
2598 test_journal_syslog_SOURCES = \
2599         src/journal/test-journal-syslog.c
2600
2601 test_journal_syslog_LDADD = \
2602         libsystemd-journal-internal.la \
2603         libsystemd-shared.la \
2604         libsystemd-id128-internal.la
2605
2606 test_journal_match_SOURCES = \
2607         src/journal/test-journal-match.c
2608
2609 test_journal_match_LDADD = \
2610         libsystemd-shared.la \
2611         libsystemd-journal-internal.la \
2612         libsystemd-id128-internal.la
2613
2614 test_journal_enum_SOURCES = \
2615         src/journal/test-journal-enum.c
2616
2617 test_journal_enum_LDADD = \
2618         libsystemd-shared.la \
2619         libsystemd-journal-internal.la \
2620         libsystemd-id128-internal.la
2621
2622 test_journal_stream_SOURCES = \
2623         src/journal/test-journal-stream.c
2624
2625 test_journal_stream_LDADD = \
2626         libsystemd-shared.la \
2627         libsystemd-journal-internal.la \
2628         libsystemd-id128-internal.la
2629
2630 test_journal_verify_SOURCES = \
2631         src/journal/test-journal-verify.c
2632
2633 test_journal_verify_LDADD = \
2634         libsystemd-shared.la \
2635         libsystemd-journal-internal.la \
2636         libsystemd-id128-internal.la
2637
2638 test_mmap_cache_SOURCES = \
2639         src/journal/test-mmap-cache.c
2640
2641 test_mmap_cache_LDADD = \
2642         libsystemd-shared.la \
2643         libsystemd-journal-internal.la
2644
2645 test_catalog_SOURCES = \
2646         src/journal/test-catalog.c
2647
2648 test_catalog_LDADD = \
2649         libsystemd-shared.la \
2650         libsystemd-label.la \
2651         libsystemd-journal-internal.la \
2652         libsystemd-id128-internal.la
2653
2654 libsystemd_journal_la_SOURCES = \
2655         src/journal/sd-journal.c \
2656         src/systemd/sd-journal.h \
2657         src/journal/journal-file.c \
2658         src/journal/journal-file.h \
2659         src/journal/journal-vacuum.c \
2660         src/journal/journal-vacuum.h \
2661         src/journal/journal-verify.c \
2662         src/journal/journal-verify.h \
2663         src/journal/lookup3.c \
2664         src/journal/lookup3.h \
2665         src/journal/journal-send.c \
2666         src/journal/journal-def.h \
2667         src/journal/compress.h \
2668         src/journal/catalog.c \
2669         src/journal/catalog.h \
2670         src/journal/mmap-cache.c \
2671         src/journal/mmap-cache.h
2672
2673 libsystemd_journal_la_CFLAGS = \
2674         $(AM_CFLAGS) \
2675         -fvisibility=hidden
2676
2677 libsystemd_journal_la_LDFLAGS = \
2678         $(AM_LDFLAGS) \
2679         -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
2680         -Wl,--version-script=$(top_srcdir)/src/journal/libsystemd-journal.sym
2681
2682 libsystemd_journal_la_LIBADD = \
2683         libsystemd-shared.la \
2684         libsystemd-label.la \
2685         libsystemd-daemon-internal.la \
2686         libsystemd-id128-internal.la
2687
2688 libsystemd_journal_internal_la_SOURCES = \
2689         $(libsystemd_journal_la_SOURCES) \
2690         src/journal/journald-kmsg.c \
2691         src/journal/journald-kmsg.h \
2692         src/journal/journald-syslog.c \
2693         src/journal/journald-syslog.h \
2694         src/journal/journald-stream.c \
2695         src/journal/journald-stream.h \
2696         src/journal/journald-server.c \
2697         src/journal/journald-server.h \
2698         src/journal/journald-console.c \
2699         src/journal/journald-console.h \
2700         src/journal/journald-native.c \
2701         src/journal/journald-native.h \
2702         src/journal/journald-rate-limit.c \
2703         src/journal/journald-rate-limit.h \
2704         src/journal/journal-internal.h
2705
2706 libsystemd_journal_internal_la_CFLAGS = \
2707         $(AM_CFLAGS)
2708
2709 libsystemd_journal_internal_la_LIBADD = \
2710         libsystemd-label.la \
2711         libsystemd-audit.la \
2712         libsystemd-daemon.la \
2713         libudev.la \
2714         libsystemd-shared.la \
2715         libsystemd-label.la
2716
2717 nodist_libsystemd_journal_internal_la_SOURCES = \
2718         src/journal/journald-gperf.c
2719
2720 if ENABLE_LOGIND
2721 libsystemd_journal_internal_la_LIBADD += \
2722         libsystemd-login-internal.la
2723 endif
2724
2725 if HAVE_ACL
2726 libsystemd_journal_internal_la_LIBADD += \
2727         libsystemd-acl.la
2728 endif
2729
2730 if HAVE_XZ
2731 libsystemd_journal_la_SOURCES += \
2732         src/journal/compress.c
2733
2734 libsystemd_journal_la_CFLAGS += \
2735         $(XZ_CFLAGS)
2736
2737 libsystemd_journal_la_LIBADD += \
2738         $(XZ_LIBS)
2739
2740 libsystemd_journal_internal_la_CFLAGS += \
2741         $(XZ_CFLAGS)
2742
2743 libsystemd_journal_internal_la_LIBADD += \
2744         $(XZ_LIBS)
2745
2746 endif
2747
2748 if HAVE_GCRYPT
2749 libsystemd_journal_la_SOURCES += \
2750         src/journal/journal-authenticate.c \
2751         src/journal/journal-authenticate.h \
2752         src/journal/fsprg.c \
2753         src/journal/fsprg.h
2754
2755 libsystemd_journal_la_CFLAGS += \
2756         $(GCRYPT_CFLAGS) \
2757         -Wno-pointer-arith
2758
2759 libsystemd_journal_la_LIBADD += \
2760         $(GCRYPT_LIBS)
2761
2762 libsystemd_journal_internal_la_CFLAGS += \
2763         $(GCRYPT_CFLAGS) \
2764         -Wno-pointer-arith
2765
2766 libsystemd_journal_internal_la_LIBADD += \
2767         $(GCRYPT_LIBS)
2768 endif
2769
2770 # move lib from $(libdir) to $(rootlibdir) and update devel link, if
2771 # needed. Also, grant read access to new journal files to members of
2772 # "adm" and "wheel".
2773 libsystemd-journal-install-hook:
2774         libname=libsystemd-journal.so && $(move-to-rootlibdir)
2775         -$(MKDIR_P) $(DESTDIR)/var/log/journal
2776         -chown 0:0 $(DESTDIR)/var/log/journal
2777         -chmod 755 $(DESTDIR)/var/log/journal
2778         -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
2779         -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
2780
2781 libsystemd-journal-uninstall-hook:
2782         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
2783
2784 INSTALL_EXEC_HOOKS += libsystemd-journal-install-hook
2785 UNINSTALL_EXEC_HOOKS += libsystemd-journal-uninstall-hook
2786
2787 # ------------------------------------------------------------------------------
2788
2789 # Update catalog on installation. Do not bother if installing
2790 # in DESTDIR, since this is likely for packaging purposes.
2791 catalog-update-hook:
2792         -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
2793
2794 INSTALL_DATA_HOOKS += \
2795         catalog-update-hook
2796
2797 catalog-remove-hook:
2798         -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
2799
2800 UNINSTALL_DATA_HOOKS += \
2801         catalog-remove-hook
2802
2803 noinst_PROGRAMS += \
2804         test-journal-enum
2805
2806 noinst_tests += \
2807         test-journal \
2808         test-journal-send \
2809         test-journal-syslog \
2810         test-journal-match \
2811         test-journal-stream \
2812         test-journal-verify \
2813         test-mmap-cache \
2814         test-catalog
2815
2816 pkginclude_HEADERS += \
2817         src/systemd/sd-journal.h \
2818         src/systemd/sd-messages.h
2819
2820 lib_LTLIBRARIES += \
2821         libsystemd-journal.la
2822
2823 noinst_LTLIBRARIES += \
2824         libsystemd-journal-internal.la
2825
2826 rootlibexec_PROGRAMS += \
2827         systemd-journald
2828
2829 rootbin_PROGRAMS += \
2830         journalctl
2831
2832 bin_PROGRAMS += \
2833         systemd-cat
2834
2835 dist_systemunit_DATA += \
2836         units/systemd-journald.socket
2837
2838 nodist_systemunit_DATA += \
2839         units/systemd-journald.service \
2840         units/systemd-journal-flush.service
2841
2842 dist_pkgsysconf_DATA += \
2843         src/journal/journald.conf
2844
2845 pkgconfiglib_DATA += \
2846         src/journal/libsystemd-journal.pc
2847
2848 dist_catalog_DATA = \
2849         catalog/systemd.catalog
2850
2851 SOCKETS_TARGET_WANTS += \
2852         systemd-journald.socket
2853 SYSINIT_TARGET_WANTS += \
2854         systemd-journald.service \
2855         systemd-journal-flush.service
2856
2857 EXTRA_DIST += \
2858         src/journal/libsystemd-journal.pc.in \
2859         src/journal/libsystemd-journal.sym \
2860         units/systemd-journald.service.in \
2861         units/systemd-journal-flush.service.in \
2862         src/journal/journald-gperf.gperf
2863
2864 CLEANFILES += \
2865         src/journal/journald-gperf.c
2866
2867 # ------------------------------------------------------------------------------
2868 if HAVE_MICROHTTPD
2869 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
2870
2871 rootlibexec_PROGRAMS += \
2872         systemd-journal-gatewayd
2873
2874 systemd_journal_gatewayd_SOURCES = \
2875         src/journal/journal-gatewayd.c \
2876         src/journal/microhttpd-util.h \
2877         src/journal/microhttpd-util.c
2878
2879 systemd_journal_gatewayd_LDADD = \
2880         libsystemd-shared.la \
2881         libsystemd-logs.la \
2882         libsystemd-journal-internal.la \
2883         libsystemd-id128-internal.la \
2884         libsystemd-daemon.la \
2885         libsystemd-bus.la \
2886         $(MICROHTTPD_LIBS)
2887
2888 systemd_journal_gatewayd_CFLAGS = \
2889         -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\" \
2890         $(AM_CFLAGS) \
2891         $(MICROHTTPD_CFLAGS)
2892
2893 dist_systemunit_DATA += \
2894         units/systemd-journal-gatewayd.socket
2895
2896 nodist_systemunit_DATA += \
2897         units/systemd-journal-gatewayd.service
2898
2899 dist_gatewayddocumentroot_DATA = \
2900         src/journal/browse.html
2901
2902 endif
2903
2904 EXTRA_DIST += \
2905         units/systemd-journal-gatewayd.service.in
2906
2907 # ------------------------------------------------------------------------------
2908 if ENABLE_COREDUMP
2909 systemd_coredump_SOURCES = \
2910         src/journal/coredump.c
2911
2912 systemd_coredump_LDADD = \
2913         libsystemd-journal-internal.la \
2914         libsystemd-label.la \
2915         libsystemd-shared.la
2916
2917 if ENABLE_LOGIND
2918 systemd_coredump_LDADD += \
2919         libsystemd-login-internal.la
2920 endif
2921
2922 rootlibexec_PROGRAMS += \
2923         systemd-coredump
2924
2925 systemd_coredumpctl_SOURCES = \
2926         src/journal/coredumpctl.c
2927
2928 systemd_coredumpctl_LDADD = \
2929         libsystemd-shared.la \
2930         libsystemd-journal.la
2931
2932 bin_PROGRAMS += \
2933         systemd-coredumpctl
2934
2935 dist_bashcompletion_DATA += \
2936         shell-completion/bash/systemd-coredumpctl
2937
2938 sysctl_DATA = \
2939         sysctl.d/50-coredump.conf
2940
2941 CLEANFILES += \
2942         sysctl.d/50-coredump.conf
2943 endif
2944
2945 EXTRA_DIST += \
2946         sysctl.d/50-coredump.conf.in
2947
2948 # ------------------------------------------------------------------------------
2949 if ENABLE_BINFMT
2950 systemd_binfmt_SOURCES = \
2951         src/binfmt/binfmt.c
2952
2953 systemd_binfmt_LDADD = \
2954         libsystemd-shared.la
2955
2956 rootlibexec_PROGRAMS += \
2957         systemd-binfmt
2958
2959 dist_systemunit_DATA += \
2960         units/proc-sys-fs-binfmt_misc.automount \
2961         units/proc-sys-fs-binfmt_misc.mount
2962
2963 nodist_systemunit_DATA += \
2964         units/systemd-binfmt.service
2965
2966 INSTALL_DIRS += \
2967         $(prefix)/lib/binfmt.d \
2968         $(sysconfdir)/binfmt.d
2969
2970 SYSINIT_TARGET_WANTS += \
2971         systemd-binfmt.service \
2972         proc-sys-fs-binfmt_misc.automount
2973
2974 endif
2975
2976 EXTRA_DIST += \
2977         units/systemd-binfmt.service.in
2978
2979 # ------------------------------------------------------------------------------
2980 if ENABLE_VCONSOLE
2981 systemd_vconsole_setup_SOURCES = \
2982         src/vconsole/vconsole-setup.c
2983
2984 systemd_vconsole_setup_LDADD = \
2985         libsystemd-shared.la
2986
2987 rootlibexec_PROGRAMS += \
2988         systemd-vconsole-setup
2989
2990 nodist_systemunit_DATA += \
2991         units/systemd-vconsole-setup.service
2992
2993 SYSINIT_TARGET_WANTS += \
2994         systemd-vconsole-setup.service
2995 endif
2996
2997 EXTRA_DIST += \
2998         units/systemd-vconsole-setup.service.in
2999
3000 # ------------------------------------------------------------------------------
3001 if ENABLE_READAHEAD
3002 systemd_readahead_SOURCES = \
3003         src/readahead/readahead.c \
3004         src/readahead/readahead-collect.c \
3005         src/readahead/readahead-replay.c \
3006         src/readahead/readahead-analyze.c \
3007         src/readahead/readahead-common.c \
3008         src/readahead/readahead-common.h
3009
3010 systemd_readahead_LDADD = \
3011         libsystemd-shared.la \
3012         libsystemd-daemon.la \
3013         libudev.la
3014
3015 dist_doc_DATA += \
3016         src/readahead/sd-readahead.c \
3017         src/systemd/sd-readahead.h
3018
3019 rootlibexec_PROGRAMS += \
3020         systemd-readahead
3021
3022 dist_systemunit_DATA += \
3023         units/systemd-readahead-drop.service \
3024         units/systemd-readahead-done.timer
3025
3026 nodist_systemunit_DATA += \
3027         units/systemd-readahead-collect.service \
3028         units/systemd-readahead-replay.service \
3029         units/systemd-readahead-done.service
3030
3031 endif
3032
3033 EXTRA_DIST += \
3034         units/systemd-readahead-collect.service.in \
3035         units/systemd-readahead-replay.service.in \
3036         units/systemd-readahead-done.service.in
3037
3038 # ------------------------------------------------------------------------------
3039 if ENABLE_BOOTCHART
3040 systemd_bootchart_SOURCES = \
3041         src/bootchart/bootchart.c \
3042         src/bootchart/bootchart.h \
3043         src/bootchart/store.c \
3044         src/bootchart/store.h \
3045         src/bootchart/svg.c \
3046         src/bootchart/svg.h
3047
3048 systemd_bootchart_LDADD = \
3049         libsystemd-shared.la
3050
3051 rootlibexec_PROGRAMS += \
3052         systemd-bootchart
3053
3054 dist_pkgsysconf_DATA += \
3055         src/bootchart/bootchart.conf
3056 endif
3057
3058 # ------------------------------------------------------------------------------
3059 if ENABLE_QUOTACHECK
3060 rootlibexec_PROGRAMS += \
3061         systemd-quotacheck
3062
3063 nodist_systemunit_DATA += \
3064         units/systemd-quotacheck.service
3065
3066 systemd_quotacheck_SOURCES = \
3067         src/quotacheck/quotacheck.c
3068
3069 systemd_quotacheck_LDADD = \
3070         libsystemd-shared.la
3071 endif
3072
3073 EXTRA_DIST += \
3074         units/systemd-quotacheck.service.in
3075
3076 nodist_systemunit_DATA += \
3077         units/quotaon.service
3078
3079 # ------------------------------------------------------------------------------
3080 if ENABLE_RANDOMSEED
3081 rootlibexec_PROGRAMS += \
3082         systemd-random-seed
3083
3084 nodist_systemunit_DATA += \
3085         units/systemd-random-seed-save.service \
3086         units/systemd-random-seed-load.service
3087
3088 systemd_random_seed_SOURCES = \
3089         src/random-seed/random-seed.c
3090
3091 systemd_random_seed_LDADD = \
3092         libsystemd-label.la \
3093         libsystemd-shared.la
3094
3095 SHUTDOWN_TARGET_WANTS += \
3096         systemd-random-seed-save.service
3097 SYSINIT_TARGET_WANTS += \
3098         systemd-random-seed-load.service
3099
3100 endif
3101
3102 EXTRA_DIST += \
3103         units/systemd-random-seed-save.service.in \
3104         units/systemd-random-seed-load.service.in
3105
3106 # ------------------------------------------------------------------------------
3107 if HAVE_LIBCRYPTSETUP
3108 rootlibexec_PROGRAMS += \
3109         systemd-cryptsetup
3110
3111 systemgenerator_PROGRAMS += \
3112         systemd-cryptsetup-generator
3113
3114 dist_systemunit_DATA += \
3115         units/cryptsetup.target
3116
3117 systemd_cryptsetup_SOURCES = \
3118         src/cryptsetup/cryptsetup.c
3119
3120 systemd_cryptsetup_CFLAGS = \
3121         $(AM_CFLAGS) \
3122         $(LIBCRYPTSETUP_CFLAGS)
3123
3124 systemd_cryptsetup_LDADD = \
3125         libsystemd-label.la \
3126         libsystemd-shared.la \
3127         libudev.la \
3128         $(LIBCRYPTSETUP_LIBS)
3129
3130 systemd_cryptsetup_generator_SOURCES = \
3131         src/cryptsetup/cryptsetup-generator.c
3132
3133 systemd_cryptsetup_generator_LDADD = \
3134         libsystemd-label.la \
3135         libsystemd-shared.la
3136
3137 SYSINIT_TARGET_WANTS += \
3138         cryptsetup.target
3139
3140 endif
3141
3142 # ------------------------------------------------------------------------------
3143 if ENABLE_HOSTNAMED
3144 systemd_hostnamed_SOURCES = \
3145         src/hostname/hostnamed.c
3146
3147 systemd_hostnamed_CFLAGS = \
3148         $(AM_CFLAGS) \
3149         $(DBUS_CFLAGS)
3150
3151 systemd_hostnamed_LDADD = \
3152         libsystemd-label.la \
3153         libsystemd-shared.la \
3154         libsystemd-daemon.la \
3155         libsystemd-dbus.la
3156
3157 rootlibexec_PROGRAMS += \
3158         systemd-hostnamed
3159
3160 nodist_systemunit_DATA += \
3161         units/systemd-hostnamed.service
3162
3163 dist_dbuspolicy_DATA += \
3164         src/hostname/org.freedesktop.hostname1.conf
3165
3166 dist_dbussystemservice_DATA += \
3167         src/hostname/org.freedesktop.hostname1.service
3168
3169 polkitpolicy_files += \
3170         src/hostname/org.freedesktop.hostname1.policy
3171
3172 dbusinterface_DATA += \
3173         org.freedesktop.hostname1.xml
3174
3175 org.freedesktop.hostname1.xml: systemd-hostnamed
3176         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.hostname1 $< $@.tmp && \
3177                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
3178                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
3179
3180 SYSTEM_UNIT_ALIASES += \
3181         systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
3182
3183 hostnamectl_SOURCES = \
3184         src/hostname/hostnamectl.c
3185
3186 hostnamectl_CFLAGS = \
3187         $(AM_CFLAGS) \
3188         $(DBUS_CFLAGS)
3189
3190 hostnamectl_LDADD = \
3191         libsystemd-shared.la \
3192         libsystemd-dbus.la \
3193         libsystemd-id128-internal.la
3194
3195 bin_PROGRAMS += \
3196         hostnamectl
3197
3198 dist_bashcompletion_DATA += \
3199         shell-completion/bash/hostnamectl
3200
3201 endif
3202
3203 polkitpolicy_in_files += \
3204         src/hostname/org.freedesktop.hostname1.policy.in
3205
3206 EXTRA_DIST += \
3207         units/systemd-hostnamed.service.in
3208
3209 # ------------------------------------------------------------------------------
3210 if ENABLE_LOCALED
3211 systemd_localed_SOURCES = \
3212         src/locale/localed.c
3213
3214 systemd_localed_CFLAGS = \
3215         $(AM_CFLAGS) \
3216         $(DBUS_CFLAGS)
3217
3218 systemd_localed_LDADD = \
3219         libsystemd-label.la \
3220         libsystemd-shared.la \
3221         libsystemd-daemon.la \
3222         libsystemd-dbus.la
3223
3224 nodist_systemunit_DATA += \
3225         units/systemd-localed.service
3226
3227 rootlibexec_PROGRAMS += \
3228         systemd-localed
3229
3230 dist_dbuspolicy_DATA += \
3231         src/locale/org.freedesktop.locale1.conf
3232
3233 dist_dbussystemservice_DATA += \
3234         src/locale/org.freedesktop.locale1.service
3235
3236 polkitpolicy_files += \
3237         src/locale/org.freedesktop.locale1.policy
3238
3239 dbusinterface_DATA += \
3240         org.freedesktop.locale1.xml
3241
3242 org.freedesktop.locale1.xml: systemd-localed
3243         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.locale1 $< $@.tmp && \
3244                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
3245                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
3246
3247 SYSTEM_UNIT_ALIASES += \
3248         systemd-localed.service dbus-org.freedesktop.locale1.service
3249
3250 dist_pkgdata_DATA += \
3251         src/locale/kbd-model-map
3252
3253 dist_noinst_SCRIPT = \
3254         src/locale/generate-kbd-model-map
3255
3256 update-kbd-model-map: src/locale/generate-kbd-model-map
3257         $PYTHON $< > src/locale/kbd-model-map
3258
3259 localectl_SOURCES = \
3260         src/locale/localectl.c
3261
3262 localectl_CFLAGS = \
3263         $(AM_CFLAGS) \
3264         $(DBUS_CFLAGS)
3265
3266 localectl_LDADD = \
3267         libsystemd-shared.la \
3268         libsystemd-dbus.la \
3269         libsystemd-id128-internal.la
3270
3271 bin_PROGRAMS += \
3272         localectl
3273
3274 dist_bashcompletion_DATA += \
3275         shell-completion/bash/localectl
3276
3277 endif
3278
3279 polkitpolicy_in_files += \
3280         src/locale/org.freedesktop.locale1.policy.in
3281
3282 EXTRA_DIST += \
3283         units/systemd-localed.service.in
3284
3285 # ------------------------------------------------------------------------------
3286 if ENABLE_TIMEDATED
3287 systemd_timedated_SOURCES = \
3288         src/timedate/timedated.c
3289
3290 systemd_timedated_CFLAGS = \
3291         $(AM_CFLAGS) \
3292         $(DBUS_CFLAGS)
3293
3294 systemd_timedated_LDADD = \
3295         libsystemd-label.la \
3296         libsystemd-shared.la \
3297         libsystemd-daemon.la \
3298         libsystemd-dbus.la
3299
3300 rootlibexec_PROGRAMS += \
3301         systemd-timedated
3302
3303 dist_dbussystemservice_DATA += \
3304         src/timedate/org.freedesktop.timedate1.service
3305
3306 dist_dbuspolicy_DATA += \
3307         src/timedate/org.freedesktop.timedate1.conf
3308
3309 nodist_systemunit_DATA += \
3310         units/systemd-timedated.service
3311
3312 polkitpolicy_files += \
3313         src/timedate/org.freedesktop.timedate1.policy
3314
3315 org.freedesktop.timedate1.xml: systemd-timedated
3316         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.timedate1 $< $@.tmp && \
3317                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
3318                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
3319
3320 dbusinterface_DATA += \
3321         org.freedesktop.timedate1.xml
3322
3323 INSTALL_DIRS += \
3324         $(prefix)/lib/systemd/ntp-units.d \
3325         $(sysconfdir)/systemd/ntp-units.d
3326
3327 SYSTEM_UNIT_ALIASES += \
3328         systemd-timedated.service dbus-org.freedesktop.timedate1.service
3329
3330 timedatectl_SOURCES = \
3331         src/timedate/timedatectl.c
3332
3333 timedatectl_CFLAGS = \
3334         $(AM_CFLAGS) \
3335         $(DBUS_CFLAGS)
3336
3337 timedatectl_LDADD = \
3338         libsystemd-shared.la \
3339         libsystemd-dbus.la
3340
3341 bin_PROGRAMS += \
3342         timedatectl
3343
3344 dist_bashcompletion_DATA += \
3345         shell-completion/bash/timedatectl
3346 endif
3347
3348 polkitpolicy_in_files += \
3349         src/timedate/org.freedesktop.timedate1.policy.in
3350
3351 EXTRA_DIST += \
3352         units/systemd-timedated.service.in
3353
3354 # ------------------------------------------------------------------------------
3355 if ENABLE_EFI
3356 bootctl_SOURCES = \
3357         src/boot/boot.h \
3358         src/boot/boot-loader.h \
3359         src/boot/bootctl.c \
3360         src/boot/boot-loader.c \
3361         src/boot/boot-efi.c
3362
3363 bootctl_LDADD = \
3364         libsystemd-shared.la \
3365         libsystemd-id128.la \
3366         libsystemd-daemon.la
3367
3368 bin_PROGRAMS += \
3369         bootctl
3370 endif
3371
3372 # ------------------------------------------------------------------------------
3373 if HAVE_MYHOSTNAME
3374 libnss_myhostname_la_SOURCES = \
3375         src/nss-myhostname/nss-myhostname.c \
3376         src/nss-myhostname/ifconf.h \
3377         src/nss-myhostname/netlink.c
3378
3379 libnss_myhostname_la_CFLAGS = \
3380         $(AM_CFLAGS)
3381
3382 libnss_myhostname_la_LDFLAGS = \
3383         $(AM_LDFLAGS) \
3384         -module \
3385         -export-dynamic \
3386         -avoid-version \
3387         -shared \
3388         -shrext .so.2
3389
3390 lib_LTLIBRARIES += \
3391         libnss_myhostname.la
3392 endif
3393
3394 # ------------------------------------------------------------------------------
3395 if ENABLE_LOGIND
3396 systemd_logind_SOURCES = \
3397         src/login/logind.c \
3398         src/login/logind.h \
3399         src/login/logind-dbus.c \
3400         src/login/logind-device.c \
3401         src/login/logind-device.h \
3402         src/login/logind-button.c \
3403         src/login/logind-button.h \
3404         src/login/logind-action.c \
3405         src/login/logind-action.h \
3406         src/login/logind-seat.c \
3407         src/login/logind-seat.h \
3408         src/login/logind-session.c \
3409         src/login/logind-session.h \
3410         src/login/logind-user.c \
3411         src/login/logind-user.h \
3412         src/login/logind-inhibit.c \
3413         src/login/logind-inhibit.h \
3414         src/login/logind-session-dbus.c \
3415         src/login/logind-seat-dbus.c \
3416         src/login/logind-user-dbus.c \
3417         src/login/logind-acl.h
3418
3419 nodist_systemd_logind_SOURCES = \
3420         src/login/logind-gperf.c
3421
3422 systemd_logind_CFLAGS = \
3423         $(AM_CFLAGS) \
3424         $(DBUS_CFLAGS)
3425
3426 systemd_logind_LDADD = \
3427         libsystemd-label.la \
3428         libsystemd-shared.la \
3429         libsystemd-audit.la \
3430         libsystemd-daemon.la \
3431         libsystemd-dbus.la \
3432         libudev.la
3433
3434 if HAVE_ACL
3435 systemd_logind_SOURCES += \
3436         src/login/logind-acl.c
3437
3438 systemd_logind_LDADD += \
3439         libsystemd-acl.la
3440 endif
3441
3442 systemd_user_sessions_SOURCES = \
3443         src/login/user-sessions.c
3444
3445 systemd_user_sessions_LDADD = \
3446         libsystemd-shared.la
3447
3448 rootlibexec_PROGRAMS += \
3449         systemd-logind \
3450         systemd-user-sessions
3451
3452 loginctl_SOURCES = \
3453         src/login/loginctl.c \
3454         src/login/sysfs-show.c
3455
3456 loginctl_CFLAGS = \
3457         $(AM_CFLAGS) \
3458         $(DBUS_CFLAGS)
3459
3460 loginctl_LDADD = \
3461         libsystemd-shared.la \
3462         libsystemd-dbus.la \
3463         libudev.la
3464
3465 rootbin_PROGRAMS += \
3466         loginctl
3467
3468 dist_bashcompletion_DATA += \
3469         shell-completion/bash/loginctl
3470
3471 systemd_inhibit_SOURCES = \
3472         src/login/inhibit.c
3473
3474 systemd_inhibit_CFLAGS = \
3475         $(AM_CFLAGS) \
3476         $(DBUS_CFLAGS)
3477
3478 systemd_inhibit_LDADD = \
3479         libsystemd-shared.la \
3480         libsystemd-dbus.la
3481
3482 rootbin_PROGRAMS += \
3483         systemd-inhibit
3484
3485 test_login_SOURCES = \
3486         src/login/test-login.c
3487
3488 test_login_LDADD = \
3489         libsystemd-login-internal.la \
3490         libsystemd-shared.la
3491
3492 test_inhibit_SOURCES = \
3493         src/login/test-inhibit.c
3494
3495 test_inhibit_LDADD = \
3496         libsystemd-shared.la \
3497         libsystemd-dbus.la
3498
3499 test_inhibit_CFLAGS = \
3500         $(AM_CFLAGS) \
3501         $(DBUS_CFLAGS)
3502
3503 noinst_PROGRAMS += \
3504         test-login \
3505         test-inhibit
3506
3507 libsystemd_login_la_SOURCES = \
3508         src/login/sd-login.c
3509
3510 libsystemd_login_la_CFLAGS = \
3511         $(AM_CFLAGS) \
3512         -fvisibility=hidden
3513
3514 libsystemd_login_la_LDFLAGS = \
3515         $(AM_LDFLAGS) \
3516         -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
3517         -Wl,--version-script=$(top_srcdir)/src/login/libsystemd-login.sym
3518
3519 libsystemd_login_la_LIBADD = \
3520         libsystemd-shared.la \
3521         libsystemd-daemon-internal.la
3522
3523 libsystemd_login_internal_la_SOURCES = \
3524         $(libsystemd_login_la_SOURCES)
3525
3526 if HAVE_PAM
3527 pam_systemd_la_SOURCES = \
3528         src/login/pam-module.c
3529
3530 pam_systemd_la_CFLAGS = \
3531         $(AM_CFLAGS) \
3532         $(PAM_CFLAGS) \
3533         $(DBUS_CFLAGS) \
3534         -fvisibility=hidden
3535
3536 pam_systemd_la_LDFLAGS = \
3537         $(AM_LDFLAGS) \
3538         -module \
3539         -export-dynamic \
3540         -avoid-version \
3541         -shared \
3542         -export-symbols-regex '^pam_sm_.*'
3543
3544 pam_systemd_la_LIBADD = \
3545         libsystemd-daemon.la \
3546         libsystemd-audit.la \
3547         libsystemd-dbus.la \
3548         libsystemd-shared.la \
3549         $(PAM_LIBS)
3550
3551 pamlib_LTLIBRARIES = \
3552         pam_systemd.la
3553 endif
3554
3555 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
3556 libsystemd-login-install-hook:
3557         libname=libsystemd-login.so && $(move-to-rootlibdir)
3558
3559 libsystemd-login-uninstall-hook:
3560         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
3561
3562 INSTALL_EXEC_HOOKS += libsystemd-login-install-hook
3563 UNINSTALL_EXEC_HOOKS += libsystemd-login-uninstall-hook
3564
3565 nodist_systemunit_DATA += \
3566         units/systemd-logind.service \
3567         units/systemd-user-sessions.service
3568
3569 dist_dbussystemservice_DATA += \
3570         src/login/org.freedesktop.login1.service
3571
3572 dist_dbuspolicy_DATA += \
3573         src/login/org.freedesktop.login1.conf
3574
3575 dist_pkgsysconf_DATA += \
3576         src/login/logind.conf
3577
3578 pkginclude_HEADERS += \
3579         src/systemd/sd-login.h
3580
3581 lib_LTLIBRARIES += \
3582         libsystemd-login.la
3583
3584 noinst_LTLIBRARIES += \
3585         libsystemd-login-internal.la
3586
3587 pkgconfiglib_DATA += \
3588         src/login/libsystemd-login.pc
3589
3590 polkitpolicy_files += \
3591         src/login/org.freedesktop.login1.policy
3592
3593 INSTALL_DIRS += \
3594         $(systemdstatedir)
3595
3596 MULTI_USER_TARGET_WANTS += \
3597         systemd-logind.service \
3598         systemd-user-sessions.service
3599
3600 SYSTEM_UNIT_ALIASES += \
3601         systemd-logind.service dbus-org.freedesktop.login1.service
3602
3603 systemd_multi_seat_x_SOURCES = \
3604         src/login/multi-seat-x.c
3605
3606 systemd_multi_seat_x_LDADD = \
3607         libsystemd-label.la \
3608         libsystemd-shared.la
3609
3610 rootlibexec_PROGRAMS += \
3611         systemd-multi-seat-x
3612
3613 dist_udevrules_DATA += \
3614         src/login/70-uaccess.rules \
3615         src/login/70-power-switch.rules
3616
3617 nodist_udevrules_DATA += \
3618         src/login/71-seat.rules \
3619         src/login/73-seat-late.rules
3620
3621 CLEANFILES += \
3622         src/login/logind-gperf.c \
3623         src/login/71-seat.rules \
3624         src/login/73-seat-late.rules
3625 endif
3626
3627 polkitpolicy_in_files += \
3628         src/login/org.freedesktop.login1.policy.in
3629
3630 EXTRA_DIST += \
3631         src/login/logind-gperf.gperf \
3632         src/login/libsystemd-login.pc.in \
3633         src/login/libsystemd-login.sym \
3634         src/login/71-seat.rules.in \
3635         src/login/73-seat-late.rules.in \
3636         units/systemd-logind.service.in \
3637         units/systemd-user-sessions.service.in
3638
3639 # ------------------------------------------------------------------------------
3640 if HAVE_PYTHON_DEVEL
3641 pkgpyexec_LTLIBRARIES = \
3642         _journal.la \
3643         id128.la \
3644         _daemon.la \
3645         _reader.la
3646
3647 _journal_la_SOURCES = \
3648         src/python-systemd/_journal.c
3649
3650 _journal_la_CFLAGS = \
3651         $(AM_CFLAGS) \
3652         -fvisibility=default \
3653         $(PYTHON_CFLAGS)
3654
3655 _journal_la_LDFLAGS = \
3656         $(AM_LDFLAGS) \
3657         -shared \
3658         -module \
3659         -avoid-version
3660
3661 _journal_la_LIBADD = \
3662         $(PYTHON_LIBS) \
3663         libsystemd-journal.la
3664
3665 id128_la_SOURCES = \
3666         src/python-systemd/id128.c \
3667         src/python-systemd/id128-constants.h \
3668         src/python-systemd/pyutil.c \
3669         src/python-systemd/pyutil.h
3670
3671 id128_la_CFLAGS = \
3672         $(AM_CFLAGS) \
3673         -fvisibility=default \
3674         $(PYTHON_CFLAGS) \
3675         -I$(top_builddir)/src/python-systemd
3676
3677 id128_la_LDFLAGS = \
3678         $(AM_LDFLAGS) \
3679         -shared \
3680         -module \
3681         -avoid-version
3682
3683 id128_la_LIBADD = \
3684         $(PYTHON_LIBS) \
3685         libsystemd-id128.la
3686
3687 _daemon_la_SOURCES = \
3688         src/python-systemd/_daemon.c \
3689         src/python-systemd/pyutil.c \
3690         src/python-systemd/pyutil.h
3691
3692 _daemon_la_CFLAGS = \
3693         $(AM_CFLAGS) \
3694         -fvisibility=default \
3695         $(PYTHON_CFLAGS) \
3696         -I$(top_builddir)/src/python-systemd
3697
3698 _daemon_la_LDFLAGS = \
3699         $(AM_LDFLAGS) \
3700         -shared \
3701         -module \
3702         -avoid-version
3703
3704 _daemon_la_LIBADD = \
3705         $(PYTHON_LIBS) \
3706         libsystemd-daemon.la
3707
3708 _reader_la_SOURCES = \
3709         src/python-systemd/_reader.c \
3710         src/python-systemd/pyutil.c \
3711         src/python-systemd/pyutil.h
3712
3713 _reader_la_CFLAGS = \
3714         $(AM_CFLAGS) \
3715         -fvisibility=default \
3716         $(PYTHON_CFLAGS)
3717
3718 _reader_la_LDFLAGS = \
3719         $(AM_LDFLAGS) \
3720         -shared \
3721         -module \
3722         -avoid-version
3723
3724 _reader_la_LIBADD = \
3725         $(PYTHON_LIBS) \
3726         libsystemd-journal.la \
3727         libsystemd-id128.la \
3728         libsystemd-shared.la
3729
3730 dist_pkgpyexec_PYTHON = \
3731         src/python-systemd/journal.py \
3732         src/python-systemd/daemon.py \
3733         src/python-systemd/__init__.py
3734
3735 src/python-systemd/id128-constants.h: src/systemd/sd-messages.h Makefile
3736         $(AM_V_at)$(MKDIR_P) $(dir $@)
3737         $(AM_V_GEN)$(SED) -n -r 's/,//g; s/#define (SD_MESSAGE_[A-Z0-9_]+)\s.*/add_id(m, "\1", \1) JOINER/p' <$< >$@
3738
3739 BUILT_SOURCES += \
3740         src/python-systemd/id128-constants.h
3741
3742 SPHINXOPTS = -D version=$(VERSION) -D release=$(VERSION)
3743 sphinx-%:
3744         $(AM_V_at)test -n "$(SPHINX_BUILD)" || { echo " *** sphinx-build is not available"; exit 1; }
3745         $(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/
3746         $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/docs/html/python-systemd/
3747
3748 destdir-sphinx: all
3749         dir="$$(mktemp -d /tmp/systemd-install.XXXXXX)" && \
3750                 $(MAKE) DESTDIR="$$dir" install && \
3751                 $(MAKE) DESTDIR="$$dir" sphinx-html && \
3752                 rm -rf "$$dir"
3753
3754 endif
3755
3756 CLEAN_LOCAL_HOOKS += clean-sphinx
3757
3758 clean-sphinx:
3759         -rm -rf docs/html/python-systemd/
3760
3761 # ------------------------------------------------------------------------------
3762 substitutions = \
3763        '|rootlibexecdir=$(rootlibexecdir)|' \
3764        '|rootbindir=$(rootbindir)|' \
3765        '|bindir=$(bindir)|' \
3766        '|SYSTEMCTL=$(rootbindir)/systemctl|' \
3767        '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
3768        '|pkgsysconfdir=$(pkgsysconfdir)|' \
3769        '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
3770        '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
3771        '|pkgdatadir=$(pkgdatadir)|' \
3772        '|systemunitdir=$(systemunitdir)|' \
3773        '|userunitdir=$(userunitdir)|' \
3774        '|systempresetdir=$(systempresetdir)|' \
3775        '|userpresetdir=$(userpresetdir)|' \
3776        '|udevhwdbdir=$(udevhwdbdir)|' \
3777        '|udevrulesdir=$(udevrulesdir)|' \
3778        '|catalogdir=$(catalogdir)|' \
3779        '|tmpfilesdir=$(tmpfilesdir)|' \
3780        '|sysctldir=$(sysctldir)|' \
3781        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
3782        '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
3783        '|PACKAGE_URL=$(PACKAGE_URL)|' \
3784        '|RANDOM_SEED=$(localstatedir)/lib/random-seed|' \
3785        '|prefix=$(prefix)|' \
3786        '|exec_prefix=$(exec_prefix)|' \
3787        '|libdir=$(libdir)|' \
3788        '|includedir=$(includedir)|' \
3789        '|VERSION=$(VERSION)|' \
3790        '|rootprefix=$(rootprefix)|' \
3791        '|udevlibexecdir=$(udevlibexecdir)|' \
3792        '|SUSHELL=$(SUSHELL)|' \
3793        '|DEBUGTTY=$(DEBUGTTY)|' \
3794        '|KILL=$(KILL)|' \
3795        '|QUOTAON=$(QUOTAON)|' \
3796        '|QUOTACHECK=$(QUOTACHECK)|' \
3797        '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
3798        '|VARLOGDIR=$(varlogdir)|' \
3799        '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
3800        '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
3801        '|PYTHON=$(PYTHON)|' \
3802        '|PYTHON_BINARY=$(PYTHON_BINARY)|'
3803
3804 SED_PROCESS = \
3805         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
3806         $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
3807                 < $< > $@
3808
3809 units/%: units/%.in Makefile
3810         $(SED_PROCESS)
3811
3812 man/%: man/%.in Makefile
3813         $(SED_PROCESS)
3814
3815 sysctl.d/%: sysctl.d/%.in Makefile
3816         $(SED_PROCESS)
3817
3818 %.pc: %.pc.in Makefile
3819         $(SED_PROCESS)
3820
3821 src/core/macros.%: src/core/macros.%.in Makefile
3822         $(SED_PROCESS)
3823
3824 src/%.policy.in: src/%.policy.in.in Makefile
3825         $(SED_PROCESS)
3826
3827 %.rules: %.rules.in Makefile
3828         $(SED_PROCESS)
3829
3830 %.sh: %.sh.in Makefile
3831         $(SED_PROCESS)
3832         $(AM_V_GEN)chmod +x $@
3833
3834 src/%.c: src/%.gperf
3835         $(AM_V_at)$(MKDIR_P) $(dir $@)
3836         $(AM_V_GPERF)$(GPERF) < $< > $@
3837
3838 src/%: src/%.m4
3839         $(AM_V_at)$(MKDIR_P) $(dir $@)
3840         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
3841
3842 units/%: units/%.m4 Makefile
3843         $(AM_V_M4)$(MKDIR_P) $(dir $@)
3844         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
3845
3846 units/user/%: units/%.m4 Makefile
3847         $(AM_V_M4)$(MKDIR_P) $(dir $@)
3848         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
3849
3850 if ENABLE_POLKIT
3851 nodist_polkitpolicy_DATA = \
3852         $(polkitpolicy_files) \
3853         $(polkitpolicy_in_in_files:.policy.in.in=.policy)
3854 endif
3855
3856 EXTRA_DIST += \
3857         $(polkitpolicy_in_files) \
3858         $(polkitpolicy_in_in_files)
3859
3860 CLEANFILES += \
3861         $(nodist_systemunit_DATA) \
3862         $(nodist_userunit_DATA) \
3863         $(pkgconfigdata_DATA) \
3864         $(pkgconfiglib_DATA) \
3865         $(nodist_polkitpolicy_DATA)
3866
3867 # ------------------------------------------------------------------------------
3868 if ENABLE_MANPAGES
3869 man/custom-entities.ent: Makefile
3870         $(AM_V_GEN)$(MKDIR_P) $(dir $@)
3871         $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
3872          echo '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">,$(substitutions))))') \
3873          > $@ # '
3874
3875 DISTCLEANFILES&n