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