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