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