chiark / gitweb /
libsystemd: add sd-device library
[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 GCC_COLORS ?= 'ooh, shiny!'
28 export GCC_COLORS
29
30 SUBDIRS = . po
31
32 # remove targets if the command fails
33 .DELETE_ON_ERROR:
34
35 # keep intermediate files
36 .SECONDARY:
37
38 # Keep the test-suite.log
39 .PRECIOUS: $(TEST_SUITE_LOG) Makefile
40
41 LIBUDEV_CURRENT=7
42 LIBUDEV_REVISION=2
43 LIBUDEV_AGE=6
44
45 LIBGUDEV_CURRENT=2
46 LIBGUDEV_REVISION=0
47 LIBGUDEV_AGE=2
48
49 LIBSYSTEMD_CURRENT=6
50 LIBSYSTEMD_REVISION=0
51 LIBSYSTEMD_AGE=6
52
53 # The following four libraries only exist for compatibility reasons,
54 # their version info should not be bumped anymore
55 LIBSYSTEMD_LOGIN_CURRENT=9
56 LIBSYSTEMD_LOGIN_REVISION=3
57 LIBSYSTEMD_LOGIN_AGE=9
58
59 LIBSYSTEMD_DAEMON_CURRENT=0
60 LIBSYSTEMD_DAEMON_REVISION=12
61 LIBSYSTEMD_DAEMON_AGE=0
62
63 LIBSYSTEMD_ID128_CURRENT=0
64 LIBSYSTEMD_ID128_REVISION=28
65 LIBSYSTEMD_ID128_AGE=0
66
67 LIBSYSTEMD_JOURNAL_CURRENT=11
68 LIBSYSTEMD_JOURNAL_REVISION=5
69 LIBSYSTEMD_JOURNAL_AGE=11
70
71 # Dirs of external packages
72 dbuspolicydir=@dbuspolicydir@
73 dbussessionservicedir=@dbussessionservicedir@
74 dbussystemservicedir=@dbussystemservicedir@
75 pamlibdir=@pamlibdir@
76 pamconfdir=@pamconfdir@
77 pkgconfiglibdir=$(libdir)/pkgconfig
78 polkitpolicydir=$(datadir)/polkit-1/actions
79 bashcompletiondir=@bashcompletiondir@
80 zshcompletiondir=@zshcompletiondir@
81 rpmmacrosdir=$(prefix)/lib/rpm/macros.d
82 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
83 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
84 varlogdir=$(localstatedir)/log
85 systemdstatedir=$(localstatedir)/lib/systemd
86 catalogstatedir=$(systemdstatedir)/catalog
87 xinitrcdir=$(sysconfdir)/X11/xinit/xinitrc.d
88
89 # Our own, non-special dirs
90 pkgsysconfdir=$(sysconfdir)/systemd
91 userunitdir=$(prefix)/lib/systemd/user
92 userpresetdir=$(prefix)/lib/systemd/user-preset
93 tmpfilesdir=$(prefix)/lib/tmpfiles.d
94 sysusersdir=$(prefix)/lib/sysusers.d
95 sysctldir=$(prefix)/lib/sysctl.d
96 binfmtdir=$(prefix)/lib/binfmt.d
97 modulesloaddir=$(prefix)/lib/modules-load.d
98 networkdir=$(rootprefix)/lib/systemd/network
99 pkgincludedir=$(includedir)/systemd
100 systemgeneratordir=$(rootlibexecdir)/system-generators
101 usergeneratordir=$(prefix)/lib/systemd/user-generators
102 systemshutdowndir=$(rootlibexecdir)/system-shutdown
103 systemsleepdir=$(rootlibexecdir)/system-sleep
104 systemunitdir=$(rootprefix)/lib/systemd/system
105 systempresetdir=$(rootprefix)/lib/systemd/system-preset
106 udevlibexecdir=$(rootprefix)/lib/udev
107 udevhomedir=$(udevlibexecdir)
108 udevrulesdir=$(udevlibexecdir)/rules.d
109 udevhwdbdir=$(udevlibexecdir)/hwdb.d
110 catalogdir=$(prefix)/lib/systemd/catalog
111 kernelinstalldir = $(prefix)/lib/kernel/install.d
112 factory_etcdir = $(prefix)/share/factory/etc
113 factory_pamdir = $(prefix)/share/factory/etc/pam.d
114 bootlibdir = $(prefix)/lib/systemd/boot/efi
115
116 # And these are the special ones for /
117 rootprefix=@rootprefix@
118 rootbindir=$(rootprefix)/bin
119 rootlibexecdir=$(rootprefix)/lib/systemd
120
121 EXTRA_DIST =
122 BUILT_SOURCES =
123 INSTALL_EXEC_HOOKS =
124 UNINSTALL_EXEC_HOOKS =
125 INSTALL_DATA_HOOKS =
126 UNINSTALL_DATA_HOOKS =
127 DISTCLEAN_LOCAL_HOOKS =
128 CLEAN_LOCAL_HOOKS =
129 pkginclude_HEADERS =
130 noinst_LTLIBRARIES =
131 lib_LTLIBRARIES =
132 include_HEADERS =
133 noinst_DATA =
134 pkgconfiglib_DATA =
135 polkitpolicy_in_in_files =
136 polkitpolicy_in_files =
137 polkitpolicy_files =
138 dist_udevrules_DATA =
139 nodist_udevrules_DATA =
140 dist_pkgsysconf_DATA =
141 nodist_pkgsysconf_DATA =
142 dist_pkgdata_DATA =
143 dist_dbuspolicy_DATA =
144 dist_dbussystemservice_DATA =
145 dist_systemunit_DATA_busnames =
146 dist_sysusers_DATA =
147 check_PROGRAMS =
148 check_DATA =
149 tests=
150 manual_tests =
151 TEST_EXTENSIONS = .py
152 PY_LOG_COMPILER = $(PYTHON)
153 if ENABLE_TESTS
154 noinst_PROGRAMS = $(manual_tests) $(tests)
155 TESTS = $(tests)
156 else
157 noinst_PROGRAMS =
158 TESTS =
159 endif
160 udevlibexec_PROGRAMS =
161
162 in_files = $(filter %.in,$(EXTRA_DIST))
163 in_in_files = $(filter %.in.in, $(in_files))
164 m4_files = $(filter %.m4,$(EXTRA_DIST) $(in_files:.m4.in=.m4))
165
166 CLEANFILES = $(BUILT_SOURCES) \
167         $(pkgconfiglib_DATA) \
168         $(in_files:.in=) $(in_in_files:.in.in=) \
169         $(m4_files:.m4=)
170
171 .PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
172         $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
173         $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
174
175 AM_CPPFLAGS = \
176         -include $(top_builddir)/config.h \
177         -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
178         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
179         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
180         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
181         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
182         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
183         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
184         -DCERTIFICATE_ROOT=\"$(CERTIFICATEROOT)\" \
185         -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
186         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
187         -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
188         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
189         -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
190         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
191         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
192         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
193         -DROOTPREFIX=\"$(rootprefix)\" \
194         -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" \
195         -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \
196         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
197         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
198         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
199         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
200         -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
201         -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
202         -DSYSTEMD_LANGUAGE_FALLBACK_MAP=\"$(pkgdatadir)/language-fallback-map\" \
203         -DX_SERVER=\"$(bindir)/X\" \
204         -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
205         -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
206         -DQUOTACHECK=\"$(QUOTACHECK)\" \
207         -DKEXEC=\"$(KEXEC)\" \
208         -DLIBDIR=\"$(libdir)\" \
209         -DROOTLIBDIR=\"$(rootlibdir)\" \
210         -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
211         -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
212         -I $(top_srcdir)/src \
213         -I $(top_builddir)/src/shared \
214         -I $(top_srcdir)/src/shared \
215         -I $(top_srcdir)/src/network \
216         -I $(top_srcdir)/src/login \
217         -I $(top_srcdir)/src/journal \
218         -I $(top_srcdir)/src/timedate \
219         -I $(top_srcdir)/src/timesync \
220         -I $(top_srcdir)/src/resolve \
221         -I $(top_builddir)/src/resolve \
222         -I $(top_srcdir)/src/systemd \
223         -I $(top_builddir)/src/core \
224         -I $(top_srcdir)/src/core \
225         -I $(top_srcdir)/src/libudev \
226         -I $(top_srcdir)/src/udev \
227         -I $(top_srcdir)/src/udev/net \
228         -I $(top_builddir)/src/udev \
229         -I $(top_srcdir)/src/libsystemd/sd-bus \
230         -I $(top_srcdir)/src/libsystemd/sd-event \
231         -I $(top_srcdir)/src/libsystemd/sd-rtnl \
232         -I $(top_srcdir)/src/libsystemd/sd-network \
233         -I $(top_srcdir)/src/libsystemd/sd-hwdb \
234         -I $(top_srcdir)/src/libsystemd/sd-device \
235         -I $(top_srcdir)/src/libsystemd-network \
236         -I $(top_srcdir)/src/libsystemd-terminal \
237         $(OUR_CPPFLAGS)
238
239 AM_CFLAGS = $(OUR_CFLAGS)
240 AM_LDFLAGS = $(OUR_LDFLAGS)
241
242 # ------------------------------------------------------------------------------
243 define move-to-rootlibdir
244         if test "$(libdir)" != "$(rootlibdir)"; then \
245                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
246                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
247                 rm -f $(DESTDIR)$(libdir)/$$libname && \
248                 $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
249                 mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
250         fi
251 endef
252
253 INSTALL_DIRS =
254
255 SHUTDOWN_TARGET_WANTS =
256 LOCAL_FS_TARGET_WANTS =
257 MULTI_USER_TARGET_WANTS =
258 GRAPHICAL_TARGET_WANTS =
259 RESCUE_TARGET_WANTS =
260 SYSINIT_TARGET_WANTS =
261 SOCKETS_TARGET_WANTS =
262 BUSNAMES_TARGET_WANTS =
263 TIMERS_TARGET_WANTS =
264 USER_SOCKETS_TARGET_WANTS =
265 USER_DEFAULT_TARGET_WANTS =
266 USER_BUSNAMES_TARGET_WANTS =
267
268 SYSTEM_UNIT_ALIASES =
269 USER_UNIT_ALIASES =
270 GENERAL_ALIASES =
271
272 install-target-wants-hook:
273         what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && dir=$(systemunitdir) && $(add-wants)
274         what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && dir=$(systemunitdir) && $(add-wants)
275         what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
276         what="$(GRAPHICAL_TARGET_WANTS)" && wants=graphical.target && dir=$(systemunitdir) && $(add-wants)
277         what="$(RESCUE_TARGET_WANTS)" && wants=rescue.target && dir=$(systemunitdir) && $(add-wants)
278         what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
279         what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
280         what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
281         what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
282         what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
283         what="$(USER_DEFAULT_TARGET_WANTS)" && wants=default.target && dir=$(userunitdir) && $(add-wants)
284
285 install-busnames-target-wants-hook:
286         what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
287         what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
288
289 define add-wants
290         [ -z "$$what" ] || ( \
291           dir=$(DESTDIR)$$dir/$$wants.wants && \
292           $(MKDIR_P) -m 0755 $$dir && \
293           cd $$dir && \
294           rm -f $$what && \
295           for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
296 endef
297
298 install-directories-hook:
299         $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
300
301 install-aliases-hook:
302         set -- $(SYSTEM_UNIT_ALIASES) && \
303                 dir=$(systemunitdir) && $(install-aliases)
304         set -- $(USER_UNIT_ALIASES) && \
305                 dir=$(userunitdir) && $(install-relative-aliases)
306         set -- $(GENERAL_ALIASES) && \
307                 dir= && $(install-relative-aliases)
308
309 define install-aliases
310         while [ -n "$$1" ]; do \
311                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
312                 rm -f $(DESTDIR)$$dir/$$2 && \
313                 $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
314                 shift 2 || exit $$?; \
315         done
316 endef
317
318 define install-relative-aliases
319         while [ -n "$$1" ]; do \
320                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
321                 rm -f $(DESTDIR)$$dir/$$2 && \
322                 $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
323                 shift 2 || exit $$?; \
324         done
325 endef
326
327 install-touch-usr-hook:
328         touch -c $(DESTDIR)/$(prefix)
329
330 INSTALL_EXEC_HOOKS += \
331         install-target-wants-hook \
332         install-directories-hook \
333         install-aliases-hook \
334         install-touch-usr-hook
335
336 if ENABLE_KDBUS
337 INSTALL_EXEC_HOOKS += \
338         install-busnames-target-wants-hook
339 endif
340
341 # ------------------------------------------------------------------------------
342 AM_V_M4 = $(AM_V_M4_$(V))
343 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
344 AM_V_M4_0 = @echo "  M4      " $@;
345
346 AM_V_XSLT = $(AM_V_XSLT_$(V))
347 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
348 AM_V_XSLT_0 = @echo "  XSLT    " $@;
349
350 AM_V_GPERF = $(AM_V_GPERF_$(V))
351 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
352 AM_V_GPERF_0 = @echo "  GPERF   " $@;
353
354 AM_V_LN = $(AM_V_LN_$(V))
355 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
356 AM_V_LN_0 = @echo "  LN      " $@;
357
358 AM_V_RM = $(AM_V_RM_$(V))
359 AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY))
360 AM_V_RM_0 = @echo "  RM      " $@;
361
362 # ------------------------------------------------------------------------------
363 rootbin_PROGRAMS = \
364         systemctl \
365         systemd-notify \
366         systemd-ask-password \
367         systemd-tty-ask-password-agent \
368         systemd-machine-id-setup \
369         systemd-escape
370
371 bin_PROGRAMS = \
372         systemd-cgls \
373         systemd-cgtop \
374         systemd-nspawn \
375         systemd-detect-virt \
376         systemd-delta \
377         systemd-analyze \
378         systemd-run \
379         systemd-stdio-bridge \
380         systemd-path
381
382 dist_bin_SCRIPTS = \
383         src/kernel-install/kernel-install
384
385 dist_kernelinstall_SCRIPTS = \
386         src/kernel-install/50-depmod.install \
387         src/kernel-install/90-loaderentry.install
388
389 rootlibexec_PROGRAMS = \
390         systemd \
391         systemd-cgroups-agent \
392         systemd-initctl \
393         systemd-shutdownd \
394         systemd-shutdown \
395         systemd-remount-fs \
396         systemd-reply-password \
397         systemd-fsck \
398         systemd-fsckd \
399         systemd-machine-id-commit \
400         systemd-ac-power \
401         systemd-sysctl \
402         systemd-sleep \
403         systemd-bus-proxyd \
404         systemd-socket-proxyd \
405         systemd-update-done
406
407 if HAVE_UTMP
408 rootlibexec_PROGRAMS += \
409         systemd-update-utmp
410 endif
411
412 systemgenerator_PROGRAMS = \
413         systemd-getty-generator \
414         systemd-fstab-generator \
415         systemd-system-update-generator \
416         systemd-debug-generator
417
418 dist_bashcompletion_DATA = \
419         shell-completion/bash/busctl \
420         shell-completion/bash/journalctl \
421         shell-completion/bash/systemd-analyze \
422         shell-completion/bash/systemd-cat \
423         shell-completion/bash/systemd-cgls \
424         shell-completion/bash/systemd-cgtop \
425         shell-completion/bash/systemd-delta \
426         shell-completion/bash/systemd-detect-virt \
427         shell-completion/bash/systemd-nspawn \
428         shell-completion/bash/systemd-run \
429         shell-completion/bash/udevadm \
430         shell-completion/bash/kernel-install
431
432 nodist_bashcompletion_DATA = \
433         shell-completion/bash/systemctl
434
435 dist_zshcompletion_DATA = \
436         shell-completion/zsh/_journalctl \
437         shell-completion/zsh/_udevadm \
438         shell-completion/zsh/_kernel-install \
439         shell-completion/zsh/_systemd-nspawn \
440         shell-completion/zsh/_systemd-analyze \
441         shell-completion/zsh/_systemd-run \
442         shell-completion/zsh/_sd_hosts_or_user_at_host \
443         shell-completion/zsh/_sd_outputmodes \
444         shell-completion/zsh/_sd_unit_files \
445         shell-completion/zsh/_systemd-delta \
446         shell-completion/zsh/_systemd
447
448 nodist_zshcompletion_DATA = \
449         shell-completion/zsh/_systemctl
450
451 EXTRA_DIST += \
452         shell-completion/bash/systemctl.in \
453         shell-completion/zsh/_systemctl.in
454
455 CLEANFILES += \
456         $(nodist_bashcompletion_DATA) \
457         $(nodist_zshcompletion_DATA)
458
459 dist_sysctl_DATA = \
460         sysctl.d/50-default.conf
461
462 dist_systemunit_DATA = \
463         units/graphical.target \
464         units/multi-user.target \
465         units/emergency.target \
466         units/sysinit.target \
467         units/basic.target \
468         units/getty.target \
469         units/halt.target \
470         units/kexec.target \
471         units/local-fs.target \
472         units/local-fs-pre.target \
473         units/initrd.target \
474         units/initrd-fs.target \
475         units/initrd-root-fs.target \
476         units/remote-fs.target \
477         units/remote-fs-pre.target \
478         units/network.target \
479         units/network-pre.target \
480         units/network-online.target \
481         units/nss-lookup.target \
482         units/nss-user-lookup.target \
483         units/poweroff.target \
484         units/reboot.target \
485         units/rescue.target \
486         units/rpcbind.target \
487         units/time-sync.target \
488         units/shutdown.target \
489         units/final.target \
490         units/umount.target \
491         units/sigpwr.target \
492         units/sleep.target \
493         units/sockets.target \
494         units/timers.target \
495         units/paths.target \
496         units/suspend.target \
497         units/swap.target \
498         units/slices.target \
499         units/system.slice \
500         units/x-.slice \
501         units/systemd-fsckd.socket \
502         units/systemd-initctl.socket \
503         units/systemd-shutdownd.socket \
504         units/syslog.socket \
505         units/dev-hugepages.mount \
506         units/dev-mqueue.mount \
507         units/sys-kernel-config.mount \
508         units/sys-kernel-debug.mount \
509         units/sys-fs-fuse-connections.mount \
510         units/tmp.mount \
511         units/var-lib-machines.mount \
512         units/printer.target \
513         units/sound.target \
514         units/bluetooth.target \
515         units/smartcard.target \
516         units/systemd-ask-password-wall.path \
517         units/systemd-ask-password-console.path \
518         units/systemd-udevd-control.socket \
519         units/systemd-udevd-kernel.socket \
520         units/system-update.target \
521         units/initrd-switch-root.target \
522         units/machines.target
523
524 if ENABLE_KDBUS
525 dist_systemunit_DATA += \
526         $(dist_systemunit_DATA_busnames)
527 endif
528
529 dist_systemunit_DATA_busnames += \
530         units/busnames.target
531
532 nodist_systemunit_DATA = \
533         units/getty@.service \
534         units/serial-getty@.service \
535         units/console-shell.service \
536         units/console-getty.service \
537         units/container-getty@.service \
538         units/systemd-initctl.service \
539         units/systemd-shutdownd.service \
540         units/systemd-remount-fs.service \
541         units/systemd-ask-password-wall.service \
542         units/systemd-ask-password-console.service \
543         units/systemd-sysctl.service \
544         units/emergency.service \
545         units/rescue.service \
546         units/user@.service \
547         units/systemd-suspend.service \
548         units/systemd-halt.service \
549         units/systemd-poweroff.service \
550         units/systemd-reboot.service \
551         units/systemd-kexec.service \
552         units/systemd-fsck@.service \
553         units/systemd-fsck-root.service \
554         units/systemd-fsckd.service \
555         units/systemd-machine-id-commit.service \
556         units/systemd-udevd.service \
557         units/systemd-udev-trigger.service \
558         units/systemd-udev-settle.service \
559         units/systemd-hwdb-update.service \
560         units/debug-shell.service \
561         units/initrd-parse-etc.service \
562         units/initrd-cleanup.service \
563         units/initrd-udevadm-cleanup-db.service \
564         units/initrd-switch-root.service \
565         units/systemd-nspawn@.service \
566         units/systemd-update-done.service
567
568 if HAVE_UTMP
569 nodist_systemunit_DATA += \
570         units/systemd-update-utmp.service \
571         units/systemd-update-utmp-runlevel.service
572 endif
573
574 dist_userunit_DATA = \
575         units/user/basic.target \
576         units/user/default.target \
577         units/user/exit.target
578
579 nodist_userunit_DATA = \
580         units/user/systemd-exit.service
581
582 dist_systempreset_DATA = \
583         system-preset/90-systemd.preset
584
585 EXTRA_DIST += \
586         units/getty@.service.m4 \
587         units/serial-getty@.service.m4 \
588         units/console-shell.service.m4.in \
589         units/console-getty.service.m4.in \
590         units/container-getty@.service.m4.in \
591         units/rescue.service.in \
592         units/systemd-initctl.service.in \
593         units/systemd-shutdownd.service.in \
594         units/systemd-remount-fs.service.in \
595         units/systemd-update-utmp.service.in \
596         units/systemd-update-utmp-runlevel.service.in \
597         units/systemd-ask-password-wall.service.in \
598         units/systemd-ask-password-console.service.in \
599         units/systemd-sysctl.service.in \
600         units/emergency.service.in \
601         units/systemd-halt.service.in \
602         units/systemd-poweroff.service.in \
603         units/systemd-reboot.service.in \
604         units/systemd-kexec.service.in \
605         units/user/systemd-exit.service.in \
606         units/systemd-fsck@.service.in \
607         units/systemd-fsck-root.service.in \
608         units/systemd-fsckd.service.in \
609         units/systemd-machine-id-commit.service.in \
610         units/user@.service.m4.in \
611         units/debug-shell.service.in \
612         units/systemd-suspend.service.in \
613         units/quotaon.service.in \
614         units/initrd-parse-etc.service.in \
615         units/initrd-cleanup.service.in \
616         units/initrd-udevadm-cleanup-db.service.in \
617         units/initrd-switch-root.service.in \
618         units/systemd-nspawn@.service.in \
619         units/systemd-update-done.service.in
620
621 if HAVE_SYSV_COMPAT
622 nodist_systemunit_DATA += \
623         units/rc-local.service \
624         units/halt-local.service
625
626 systemgenerator_PROGRAMS += \
627         systemd-sysv-generator \
628         systemd-rc-local-generator
629 endif
630
631 EXTRA_DIST += \
632         units/rc-local.service.in \
633         units/halt-local.service.in
634
635 # automake is broken and can't handle files with a dash in front
636 # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14728#8
637 units-install-hook:
638         mv $(DESTDIR)$(systemunitdir)/x-.slice $(DESTDIR)/$(systemunitdir)/-.slice
639
640 units-uninstall-hook:
641         rm -f $(DESTDIR)/$(systemunitdir)/-.slice
642
643 INSTALL_DATA_HOOKS += units-install-hook
644 UNINSTALL_DATA_HOOKS += units-uninstall-hook
645
646 dist_doc_DATA = \
647         README \
648         NEWS \
649         LICENSE.LGPL2.1 \
650         LICENSE.GPL2 \
651         LICENSE.MIT \
652         DISTRO_PORTING \
653         src/libsystemd/sd-bus/PORTING-DBUS1 \
654         src/libsystemd/sd-bus/DIFFERENCES \
655         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
656
657 @INTLTOOL_POLICY_RULE@
658
659 # ------------------------------------------------------------------------------
660
661 MANPAGES =
662 MANPAGES_ALIAS =
663
664 include Makefile-man.am
665
666 .PHONY: man update-man-list
667 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
668
669 XML_FILES = \
670         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
671 HTML_FILES = \
672         ${XML_FILES:.xml=.html}
673 HTML_ALIAS = \
674         ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
675
676 if ENABLE_MANPAGES
677 man_MANS = \
678         $(MANPAGES) \
679         $(MANPAGES_ALIAS)
680
681 noinst_DATA += \
682         $(HTML_FILES) \
683         $(HTML_ALIAS)
684
685 CLEANFILES += \
686         $(man_MANS) \
687         $(HTML_FILES) \
688         $(HTML_ALIAS)
689
690 docs/html/man:
691         $(AM_V_at)$(MKDIR_P) $(dir $@)
692         $(AM_V_LN)$(LN_S) -f ../../man $@
693
694 noinst_DATA += \
695         docs/html/man
696
697 CLEANFILES += \
698         docs/html/man
699
700 if HAVE_PYTHON
701 man/index.html: man/systemd.index.html
702         $(AM_V_LN)$(LN_S) -f systemd.index.html $@
703
704 noinst_DATA += \
705         man/index.html
706
707 CLEANFILES += \
708         man/index.html
709
710 XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_builddir)/man/*.xml)
711 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
712 SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
713
714 update-man-list: $(top_srcdir)/tools/make-man-rules.py $(XML_GLOB)
715         $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
716         $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
717         @echo "Makefile-man.am has been regenerated"
718
719 man/systemd.index.xml: $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES)
720         $(AM_V_at)$(MKDIR_P) $(dir $@)
721         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
722
723 man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py $(SOURCE_XML_FILES)
724         $(AM_V_at)$(MKDIR_P) $(dir $@)
725         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
726
727 EXTRA_DIST += \
728         man/systemd.index.xml \
729         man/index.html \
730         man/systemd.directives.xml \
731         man/glib-event-glue.c
732
733 CLEANFILES += \
734         man/systemd.index.xml \
735         man/systemd.directives.xml
736
737 endif
738
739 endif
740
741 EXTRA_DIST += \
742         $(XML_FILES) \
743         $(HTML_FILES) \
744         $(HTML_ALIAS) \
745         $(man_MANS) \
746         tools/make-man-index.py \
747         tools/make-directive-index.py \
748         tools/xml_helper.py
749
750 # ------------------------------------------------------------------------------
751 noinst_LTLIBRARIES += \
752         libsystemd-shared.la
753
754 libsystemd_shared_la_SOURCES = \
755         src/shared/capability.c \
756         src/shared/capability.h \
757         src/shared/linux/auto_dev-ioctl.h \
758         src/shared/ioprio.h \
759         src/shared/missing.h \
760         src/shared/initreq.h \
761         src/shared/securebits.h \
762         src/shared/special.h \
763         src/shared/list.h \
764         src/shared/unaligned.h \
765         src/shared/macro.h \
766         src/shared/def.h \
767         src/shared/sparse-endian.h \
768         src/shared/refcnt.h \
769         src/shared/udev-util.h \
770         src/shared/device-nodes.c \
771         src/shared/device-nodes.h \
772         src/shared/util.c \
773         src/shared/util.h \
774         src/shared/virt.c \
775         src/shared/virt.h \
776         src/shared/architecture.c \
777         src/shared/architecture.h \
778         src/shared/efivars.c \
779         src/shared/efivars.h \
780         src/shared/fstab-util.c \
781         src/shared/fstab-util.h \
782         src/shared/path-util.c \
783         src/shared/path-util.h \
784         src/shared/time-util.c \
785         src/shared/time-util.h \
786         src/shared/locale-util.c \
787         src/shared/locale-util.h \
788         src/shared/mempool.c \
789         src/shared/mempool.h \
790         src/shared/hashmap.c \
791         src/shared/hashmap.h \
792         src/shared/siphash24.c \
793         src/shared/siphash24.h \
794         src/shared/set.h \
795         src/shared/fdset.c \
796         src/shared/fdset.h \
797         src/shared/prioq.c \
798         src/shared/prioq.h \
799         src/shared/sleep-config.c \
800         src/shared/sleep-config.h \
801         src/shared/strv.c \
802         src/shared/strv.h \
803         src/shared/env-util.c \
804         src/shared/env-util.h \
805         src/shared/strbuf.c \
806         src/shared/strbuf.h \
807         src/shared/strxcpyx.c \
808         src/shared/strxcpyx.h \
809         src/shared/conf-parser.c \
810         src/shared/conf-parser.h \
811         src/shared/log.c \
812         src/shared/log.h \
813         src/shared/ratelimit.h \
814         src/shared/ratelimit.c \
815         src/shared/exit-status.c \
816         src/shared/exit-status.h \
817         src/shared/utf8.c \
818         src/shared/utf8.h \
819         src/shared/gunicode.c \
820         src/shared/gunicode.h \
821         src/shared/pager.c \
822         src/shared/pager.h \
823         src/shared/socket-util.c \
824         src/shared/socket-util.h \
825         src/shared/in-addr-util.c \
826         src/shared/in-addr-util.h \
827         src/shared/ether-addr-util.h \
828         src/shared/conf-files.c \
829         src/shared/conf-files.h \
830         src/shared/cgroup-util.c \
831         src/shared/cgroup-util.h \
832         src/shared/cgroup-show.c \
833         src/shared/cgroup-show.h \
834         src/shared/unit-name.c \
835         src/shared/unit-name.h \
836         src/shared/utmp-wtmp.h \
837         src/shared/watchdog.c \
838         src/shared/watchdog.h \
839         src/shared/spawn-ask-password-agent.c \
840         src/shared/spawn-ask-password-agent.h \
841         src/shared/replace-var.c \
842         src/shared/replace-var.h \
843         src/shared/spawn-polkit-agent.c \
844         src/shared/spawn-polkit-agent.h \
845         src/shared/clock-util.c \
846         src/shared/clock-util.h \
847         src/shared/calendarspec.c \
848         src/shared/calendarspec.h \
849         src/shared/fileio.c \
850         src/shared/fileio.h \
851         src/shared/output-mode.h \
852         src/shared/MurmurHash2.c \
853         src/shared/MurmurHash2.h \
854         src/shared/acpi-fpdt.h \
855         src/shared/acpi-fpdt.c \
856         src/shared/boot-timestamps.h \
857         src/shared/boot-timestamps.c \
858         src/shared/mkdir.c \
859         src/shared/mkdir.h \
860         src/shared/smack-util.c \
861         src/shared/smack-util.h \
862         src/shared/apparmor-util.c \
863         src/shared/apparmor-util.h \
864         src/shared/ima-util.c \
865         src/shared/ima-util.h \
866         src/shared/ptyfwd.c \
867         src/shared/ptyfwd.h \
868         src/shared/errno-list.c \
869         src/shared/errno-list.h \
870         src/shared/af-list.c \
871         src/shared/af-list.h \
872         src/shared/arphrd-list.c \
873         src/shared/arphrd-list.h \
874         src/shared/cap-list.c \
875         src/shared/cap-list.h \
876         src/shared/audit.c \
877         src/shared/audit.h \
878         src/shared/xml.c \
879         src/shared/xml.h \
880         src/shared/json.c \
881         src/shared/json.h \
882         src/shared/bus-label.c \
883         src/shared/bus-label.h \
884         src/shared/gpt.h \
885         src/shared/clean-ipc.h \
886         src/shared/clean-ipc.c \
887         src/shared/login-shared.c \
888         src/shared/login-shared.h \
889         src/shared/ring.c \
890         src/shared/ring.h \
891         src/shared/barrier.c \
892         src/shared/barrier.h \
893         src/shared/pty.c \
894         src/shared/pty.h \
895         src/shared/async.c \
896         src/shared/async.h \
897         src/shared/base-filesystem.c \
898         src/shared/base-filesystem.h \
899         src/shared/memfd-util.c \
900         src/shared/memfd-util.h \
901         src/shared/uid-range.c \
902         src/shared/uid-range.h \
903         src/shared/nss-util.h \
904         src/shared/verbs.c \
905         src/shared/verbs.h \
906         src/shared/sigbus.c \
907         src/shared/sigbus.h \
908         src/shared/build.h \
909         src/shared/import-util.c \
910         src/shared/import-util.h \
911         src/shared/sysctl-util.c \
912         src/shared/sysctl-util.h
913
914 if HAVE_UTMP
915 libsystemd_shared_la_SOURCES += \
916         src/shared/utmp-wtmp.c
917 endif
918
919 nodist_libsystemd_shared_la_SOURCES = \
920         src/shared/errno-from-name.h \
921         src/shared/errno-to-name.h \
922         src/shared/af-from-name.h \
923         src/shared/af-to-name.h \
924         src/shared/arphrd-from-name.h \
925         src/shared/arphrd-to-name.h \
926         src/shared/cap-from-name.h \
927         src/shared/cap-to-name.h
928
929 libsystemd_shared_la_CFLAGS = \
930         $(AM_CFLAGS) \
931         $(CAP_CFLAGS) \
932         $(SECCOMP_CFLAGS) \
933         -pthread
934
935 libsystemd_shared_la_LIBADD = \
936         $(CAP_LIBS) \
937         -lm
938
939 # ------------------------------------------------------------------------------
940 noinst_LTLIBRARIES += \
941         libsystemd-units.la
942
943 libsystemd_units_la_SOURCES = \
944         src/shared/install.c \
945         src/shared/install.h \
946         src/shared/install-printf.c \
947         src/shared/install-printf.h \
948         src/shared/path-lookup.c \
949         src/shared/path-lookup.h \
950         src/shared/specifier.c \
951         src/shared/specifier.h
952
953 # ------------------------------------------------------------------------------
954 noinst_LTLIBRARIES += \
955         libsystemd-label.la
956
957 libsystemd_label_la_SOURCES = \
958         src/shared/socket-label.c \
959         src/shared/label.c \
960         src/shared/label.h \
961         src/shared/selinux-util.c \
962         src/shared/selinux-util.h \
963         src/shared/mkdir-label.c \
964         src/shared/ask-password-api.c \
965         src/shared/ask-password-api.h \
966         src/shared/switch-root.h \
967         src/shared/switch-root.c \
968         src/shared/fileio-label.c \
969         src/shared/fileio-label.h \
970         src/shared/dev-setup.c \
971         src/shared/dev-setup.h \
972         src/shared/dropin.c \
973         src/shared/dropin.h \
974         src/shared/condition.c \
975         src/shared/condition.h \
976         src/shared/generator.h \
977         src/shared/generator.c \
978         src/shared/btrfs-util.c \
979         src/shared/btrfs-util.h \
980         src/shared/btrfs-ctree.h \
981         src/shared/machine-image.c \
982         src/shared/machine-image.h \
983         src/shared/machine-pool.c \
984         src/shared/machine-pool.h \
985         src/shared/copy.c \
986         src/shared/copy.h
987
988 libsystemd_label_la_CFLAGS = \
989         $(AM_CFLAGS) \
990         $(SELINUX_CFLAGS)
991
992 libsystemd_label_la_LIBADD = \
993         $(SELINUX_LIBS)
994
995 # -----------------------------------------------------------------------------
996
997 if HAVE_LIBIPTC
998 noinst_LTLIBRARIES += \
999         libsystemd-fw.la
1000
1001 libsystemd_fw_la_SOURCES = \
1002         src/shared/fw-util.h \
1003         src/shared/fw-util.c
1004
1005 libsystemd_fw_la_CFLAGS = \
1006         $(AM_CFLAGS) \
1007         $(LIBIPTC_CFLAGS)
1008
1009 libsystemd_fw_la_LIBADD = \
1010         $(LIBIPTC_LIBS)
1011 endif
1012
1013 # -----------------------------------------------------------------------------
1014
1015 if ENABLE_LDCONFIG
1016 dist_systemunit_DATA += \
1017         units/ldconfig.service
1018
1019 SYSINIT_TARGET_WANTS += \
1020         ldconfig.service
1021 endif
1022
1023 # ------------------------------------------------------------------------------
1024
1025 if HAVE_SECCOMP
1026 noinst_LTLIBRARIES += \
1027         libsystemd-seccomp.la
1028
1029 libsystemd_seccomp_la_SOURCES = \
1030         src/shared/seccomp-util.h \
1031         src/shared/seccomp-util.c
1032
1033 libsystemd_seccomp_la_CFLAGS = \
1034         $(AM_CFLAGS) \
1035         $(SECCOMP_CFLAGS)
1036
1037 libsystemd_seccomp_la_LIBADD = \
1038         $(SECCOMP_LIBS)
1039 endif
1040
1041 # ------------------------------------------------------------------------------
1042 noinst_LTLIBRARIES += \
1043         libsystemd-logs.la
1044
1045 libsystemd_logs_la_SOURCES = \
1046         src/shared/logs-show.c \
1047         src/shared/logs-show.h
1048
1049 # ------------------------------------------------------------------------------
1050 if HAVE_ACL
1051 noinst_LTLIBRARIES += \
1052         libsystemd-acl.la
1053
1054 libsystemd_acl_la_SOURCES = \
1055         src/shared/acl-util.c \
1056         src/shared/acl-util.h
1057
1058 libsystemd_acl_la_CFLAGS = \
1059         $(AM_CFLAGS) \
1060         $(ACL_CFLAGS)
1061
1062 libsystemd_acl_la_LIBADD = \
1063         $(ACL_LIBS)
1064 endif
1065
1066 # ------------------------------------------------------------------------------
1067 noinst_LTLIBRARIES += \
1068         libsystemd-core.la
1069
1070 libsystemd_core_la_SOURCES = \
1071         src/core/unit.c \
1072         src/core/unit.h \
1073         src/core/unit-printf.c \
1074         src/core/unit-printf.h \
1075         src/core/job.c \
1076         src/core/job.h \
1077         src/core/manager.c \
1078         src/core/manager.h \
1079         src/core/transaction.c \
1080         src/core/transaction.h \
1081         src/core/load-fragment.c \
1082         src/core/load-fragment.h \
1083         src/core/service.c \
1084         src/core/service.h \
1085         src/core/socket.c \
1086         src/core/socket.h \
1087         src/core/busname.c \
1088         src/core/busname.h \
1089         src/core/bus-endpoint.c \
1090         src/core/bus-endpoint.h \
1091         src/core/bus-policy.c \
1092         src/core/bus-policy.h \
1093         src/core/target.c \
1094         src/core/target.h \
1095         src/core/snapshot.c \
1096         src/core/snapshot.h \
1097         src/core/device.c \
1098         src/core/device.h \
1099         src/core/mount.c \
1100         src/core/mount.h \
1101         src/core/automount.c \
1102         src/core/automount.h \
1103         src/core/swap.c \
1104         src/core/swap.h \
1105         src/core/timer.c \
1106         src/core/timer.h \
1107         src/core/path.c \
1108         src/core/path.h \
1109         src/core/slice.c \
1110         src/core/slice.h \
1111         src/core/scope.c \
1112         src/core/scope.h \
1113         src/core/load-dropin.c \
1114         src/core/load-dropin.h \
1115         src/core/execute.c \
1116         src/core/execute.h \
1117         src/core/kill.c \
1118         src/core/kill.h \
1119         src/core/dbus.c \
1120         src/core/dbus.h \
1121         src/core/dbus-manager.c \
1122         src/core/dbus-manager.h \
1123         src/core/dbus-unit.c \
1124         src/core/dbus-unit.h \
1125         src/core/dbus-job.c \
1126         src/core/dbus-job.h \
1127         src/core/dbus-service.c \
1128         src/core/dbus-service.h \
1129         src/core/dbus-socket.c \
1130         src/core/dbus-socket.h \
1131         src/core/dbus-busname.c \
1132         src/core/dbus-busname.h \
1133         src/core/dbus-target.c \
1134         src/core/dbus-target.h \
1135         src/core/dbus-snapshot.c \
1136         src/core/dbus-snapshot.h \
1137         src/core/dbus-device.c \
1138         src/core/dbus-device.h \
1139         src/core/dbus-mount.c \
1140         src/core/dbus-mount.h \
1141         src/core/dbus-automount.c \
1142         src/core/dbus-automount.h \
1143         src/core/dbus-swap.c \
1144         src/core/dbus-swap.h \
1145         src/core/dbus-timer.c \
1146         src/core/dbus-timer.h \
1147         src/core/dbus-path.c \
1148         src/core/dbus-path.h \
1149         src/core/dbus-slice.c \
1150         src/core/dbus-slice.h \
1151         src/core/dbus-scope.c \
1152         src/core/dbus-scope.h \
1153         src/core/dbus-execute.c \
1154         src/core/dbus-execute.h \
1155         src/core/dbus-kill.c \
1156         src/core/dbus-kill.h \
1157         src/core/dbus-cgroup.c \
1158         src/core/dbus-cgroup.h \
1159         src/core/cgroup.c \
1160         src/core/cgroup.h \
1161         src/core/selinux-access.c \
1162         src/core/selinux-access.h \
1163         src/core/selinux-setup.c \
1164         src/core/selinux-setup.h \
1165         src/core/smack-setup.c \
1166         src/core/smack-setup.h \
1167         src/core/ima-setup.c \
1168         src/core/ima-setup.h \
1169         src/core/locale-setup.h \
1170         src/core/locale-setup.c \
1171         src/core/hostname-setup.c \
1172         src/core/hostname-setup.h \
1173         src/core/machine-id-setup.c \
1174         src/core/machine-id-setup.h \
1175         src/core/mount-setup.c \
1176         src/core/mount-setup.h \
1177         src/core/kmod-setup.c \
1178         src/core/kmod-setup.h \
1179         src/core/loopback-setup.h \
1180         src/core/loopback-setup.c \
1181         src/core/namespace.c \
1182         src/core/namespace.h \
1183         src/core/killall.h \
1184         src/core/killall.c \
1185         src/core/audit-fd.c \
1186         src/core/audit-fd.h \
1187         src/core/show-status.c \
1188         src/core/show-status.h \
1189         src/core/failure-action.c \
1190         src/core/failure-action.h
1191
1192 nodist_libsystemd_core_la_SOURCES = \
1193         src/core/load-fragment-gperf.c \
1194         src/core/load-fragment-gperf-nulstr.c
1195
1196 libsystemd_core_la_CFLAGS = \
1197         $(AM_CFLAGS) \
1198         $(PAM_CFLAGS) \
1199         $(AUDIT_CFLAGS) \
1200         $(KMOD_CFLAGS) \
1201         $(APPARMOR_CFLAGS) \
1202         $(SECCOMP_CFLAGS) \
1203         $(MOUNT_CFLAGS) \
1204         -pthread
1205
1206 libsystemd_core_la_LIBADD = \
1207         libsystemd-units.la \
1208         libsystemd-label.la \
1209         libudev-internal.la \
1210         libsystemd-shared.la \
1211         libsystemd-internal.la \
1212         $(PAM_LIBS) \
1213         $(AUDIT_LIBS) \
1214         $(KMOD_LIBS) \
1215         $(APPARMOR_LIBS) \
1216         $(SECCOMP_LIBS) \
1217         $(MOUNT_LIBS)
1218
1219 if HAVE_SECCOMP
1220 libsystemd_core_la_LIBADD += \
1221         libsystemd-seccomp.la
1222 endif
1223
1224 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1225         $(AM_V_at)$(MKDIR_P) $(dir $@)
1226         $(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 ";" }' < $< > $@
1227
1228 gperf_gperf_m4_sources = \
1229         src/core/load-fragment-gperf.gperf.m4
1230
1231 gperf_txt_sources = \
1232         src/shared/errno-list.txt \
1233         src/shared/af-list.txt \
1234         src/shared/arphrd-list.txt \
1235         src/shared/cap-list.txt
1236
1237 BUILT_SOURCES += \
1238         $(gperf_gperf_m4_sources:-gperf.gperf.m4=-gperf.c) \
1239         $(gperf_gperf_m4_sources:-gperf.gperf.m4=-gperf-nulstr.c) \
1240         $(gperf_gperf_sources:-gperf.gperf=-gperf.c) \
1241         $(gperf_txt_sources:-list.txt=-from-name.h) \
1242         $(gperf_txt_sources:-list.txt=-to-name.h)
1243
1244 CLEANFILES += \
1245         $(gperf_txt_sources:-list.txt=-from-name.gperf)
1246 DISTCLEANFILES = \
1247         $(gperf_txt_sources)
1248
1249 EXTRA_DIST += \
1250         $(gperf_gperf_m4_sources) \
1251         $(gperf_gperf_sources) \
1252         $(gperf_txt_sources:-list.txt=-from-name.gperf)
1253
1254 CLEANFILES += \
1255         $(gperf_txt_sources)
1256
1257 %-from-name.gperf: %-list.txt
1258         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
1259
1260 %-from-name.h: %-from-name.gperf
1261         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
1262
1263
1264 src/shared/errno-list.txt:
1265         $(AM_V_at)$(MKDIR_P) $(dir $@)
1266         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
1267
1268 src/shared/errno-to-name.h: src/shared/errno-list.txt
1269         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1270
1271
1272 src/shared/af-list.txt:
1273         $(AM_V_at)$(MKDIR_P) $(dir $@)
1274         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/socket.h - </dev/null | grep -v AF_UNSPEC | grep -v AF_MAX | $(AWK) '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $$2; }' >$@
1275
1276 src/shared/af-to-name.h: src/shared/af-list.txt
1277         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const af_names[] = { "} !/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1278
1279
1280 src/shared/arphrd-list.txt:
1281         $(AM_V_at)$(MKDIR_P) $(dir $@)
1282         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include net/if_arp.h - </dev/null | $(AWK) '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $$2; }' | sed -e 's/ARPHRD_//' >$@
1283
1284 src/shared/arphrd-to-name.h: src/shared/arphrd-list.txt
1285         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1286
1287 src/shared/arphrd-from-name.gperf: src/shared/arphrd-list.txt
1288         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct arphrd_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, ARPHRD_%s\n", $$1, $$1 }' <$< >$@
1289
1290
1291 src/shared/cap-list.txt:
1292         $(AM_V_at)$(MKDIR_P) $(dir $@)
1293         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/capability.h -include missing.h - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@
1294
1295 src/shared/cap-to-name.h: src/shared/cap-list.txt
1296         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@
1297
1298 src/shared/cap-from-name.gperf: src/shared/cap-list.txt
1299         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct capability_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
1300
1301 src/shared/cap-from-name.h: src/shared/cap-from-name.gperf
1302         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@
1303
1304
1305 src/resolve/dns_type-list.txt: src/resolve/dns-type.h
1306         $(AM_V_at)$(MKDIR_P) $(dir $@)
1307         $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@
1308
1309 src/resolve/dns_type-to-name.h: src/resolve/dns_type-list.txt
1310         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *dns_type_to_string(int type) {\n\tswitch(type) {" } {printf "        case DNS_TYPE_%s: return ", $$1; sub(/_/, "-"); printf "\"%s\";\n", $$1 } END{ print "\ndefault: return NULL;\n\t}\n}\n" }' <$< >$@
1311
1312 src/resolve/dns_type-from-name.gperf: src/resolve/dns_type-list.txt
1313         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct dns_type_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { s=$$1; sub(/_/, "-", s); printf "%s, ", $$s; printf "DNS_TYPE_%s\n", $$1 }' <$< >$@
1314
1315 # ------------------------------------------------------------------------------
1316 systemd_SOURCES = \
1317         src/core/main.c
1318
1319 systemd_CFLAGS = \
1320         $(AM_CFLAGS) \
1321         $(SECCOMP_CFLAGS)
1322
1323 systemd_LDADD = \
1324         libsystemd-core.la \
1325         $(RT_LIBS)
1326
1327 dist_pkgsysconf_DATA += \
1328         src/core/system.conf \
1329         src/core/user.conf
1330
1331 dist_dbuspolicy_DATA += \
1332         src/core/org.freedesktop.systemd1.conf
1333
1334 dist_dbussystemservice_DATA += \
1335         src/core/org.freedesktop.systemd1.service
1336
1337 polkitpolicy_in_in_files += \
1338         src/core/org.freedesktop.systemd1.policy.in.in
1339
1340 pkgconfiglib_DATA += \
1341         src/core/systemd.pc
1342
1343 nodist_rpmmacros_DATA = \
1344         src/core/macros.systemd
1345
1346 EXTRA_DIST += \
1347         src/core/systemd.pc.in \
1348         src/core/macros.systemd.in
1349
1350 # ------------------------------------------------------------------------------
1351
1352 manual_tests += \
1353         test-ns \
1354         test-loopback \
1355         test-hostname \
1356         test-daemon \
1357         test-cgroup \
1358         test-install \
1359         test-watchdog \
1360         test-log \
1361         test-ipcrm \
1362         test-btrfs
1363
1364 if HAVE_LIBIPTC
1365 manual_tests += \
1366         test-fw-util
1367 endif
1368
1369 if HAVE_KMOD
1370 manual_tests += \
1371         test-rtnl-manual
1372 endif
1373
1374 tests += \
1375         test-engine \
1376         test-cgroup-mask \
1377         test-job-type \
1378         test-env-replace \
1379         test-strbuf \
1380         test-strv \
1381         test-path \
1382         test-path-util \
1383         test-strxcpyx \
1384         test-unit-name \
1385         test-unit-file \
1386         test-utf8 \
1387         test-ellipsize \
1388         test-util \
1389         test-path-lookup \
1390         test-ring \
1391         test-barrier \
1392         test-pty \
1393         test-tmpfiles \
1394         test-namespace \
1395         test-date \
1396         test-sleep \
1397         test-replace-var \
1398         test-sched-prio \
1399         test-calendarspec \
1400         test-strip-tab-ansi \
1401         test-cgroup-util \
1402         test-fstab-util \
1403         test-prioq \
1404         test-fileio \
1405         test-time \
1406         test-hashmap \
1407         test-set \
1408         test-list \
1409         test-unaligned \
1410         test-tables \
1411         test-device-nodes \
1412         test-xml \
1413         test-json \
1414         test-architecture \
1415         test-socket-util \
1416         test-fdset \
1417         test-conf-files \
1418         test-capability \
1419         test-async \
1420         test-ratelimit \
1421         test-condition \
1422         test-uid-range \
1423         test-bus-policy \
1424         test-locale-util \
1425         test-execute \
1426         test-copy \
1427         test-cap-list \
1428         test-sigbus \
1429         test-verbs
1430
1431 EXTRA_DIST += \
1432         test/a.service \
1433         test/basic.target \
1434         test/b.service \
1435         test/c.service \
1436         test/daughter.service \
1437         test/d.service \
1438         test/end.service.in \
1439         test/e.service \
1440         test/f.service \
1441         test/grandchild.service \
1442         test/g.service \
1443         test/hello-after-sleep.target \
1444         test/hello.service \
1445         test/h.service \
1446         test/parent-deep.slice \
1447         test/parent.slice \
1448         test/paths.target \
1449         test/sched_idle_bad.service \
1450         test/sched_idle_ok.service \
1451         test/sched_rr_bad.service \
1452         test/sched_rr_change.service \
1453         test/sched_rr_ok.service \
1454         test/shutdown.target \
1455         test/sleep.service \
1456         test/sockets.target \
1457         test/son.service \
1458         test/sysinit.target \
1459         test/testsuite.target \
1460         test/timers.target \
1461         test/unstoppable.service \
1462         test/path-changed.service \
1463         test/path-directorynotempty.service \
1464         test/path-existsglob.service \
1465         test/path-exists.service \
1466         test/path-makedirectory.service \
1467         test/path-modified.service \
1468         test/path-mycustomunit.service \
1469         test/path-service.service \
1470         test/path-changed.path \
1471         test/path-directorynotempty.path \
1472         test/path-existsglob.path \
1473         test/path-exists.path \
1474         test/path-makedirectory.path \
1475         test/path-modified.path \
1476         test/path-unit.path \
1477         test/exec-environment-empty.service \
1478         test/exec-environment-multiple.service \
1479         test/exec-environment.service \
1480         test/exec-group.service \
1481         test/exec-ignoresigpipe-no.service \
1482         test/exec-ignoresigpipe-yes.service \
1483         test/exec-personality-x86-64.service \
1484         test/exec-personality-x86.service \
1485         test/exec-privatedevices-no.service \
1486         test/exec-privatedevices-yes.service \
1487         test/exec-privatetmp-no.service \
1488         test/exec-privatetmp-yes.service \
1489         test/exec-systemcallerrornumber.service \
1490         test/exec-systemcallfilter-failing2.service \
1491         test/exec-systemcallfilter-failing.service \
1492         test/exec-systemcallfilter-not-failing2.service \
1493         test/exec-systemcallfilter-not-failing.service \
1494         test/exec-user.service \
1495         test/exec-workingdirectory.service \
1496         test/exec-umask-0177.service \
1497         test/exec-umask-default.service \
1498         test/bus-policy/hello.conf \
1499         test/bus-policy/methods.conf \
1500         test/bus-policy/ownerships.conf \
1501         test/bus-policy/signals.conf \
1502         test/bus-policy/check-own-rules.conf \
1503         test/bus-policy/many-rules.conf \
1504         test/bus-policy/test.conf
1505
1506
1507 EXTRA_DIST += \
1508         src/test/test-helper.h
1509
1510 test_device_nodes_SOURCES = \
1511         src/test/test-device-nodes.c
1512
1513 test_device_nodes_LDADD = \
1514         libsystemd-shared.la
1515
1516 test_engine_SOURCES = \
1517         src/test/test-engine.c
1518
1519 test_engine_CFLAGS = \
1520         $(AM_CFLAGS) \
1521         $(SECCOMP_CFLAGS)
1522
1523 test_engine_LDADD = \
1524         libsystemd-core.la \
1525         $(RT_LIBS)
1526
1527 test_job_type_SOURCES = \
1528         src/test/test-job-type.c
1529
1530 test_job_type_CFLAGS = \
1531         $(AM_CFLAGS) \
1532         $(SECCOMP_CFLAGS)
1533
1534 test_job_type_LDADD = \
1535         libsystemd-core.la \
1536         $(RT_LIBS)
1537
1538 test_ns_SOURCES = \
1539         src/test/test-ns.c
1540
1541 test_ns_CFLAGS = \
1542         $(AM_CFLAGS) \
1543         $(SECCOMP_CFLAGS)
1544
1545 test_ns_LDADD = \
1546         libsystemd-core.la
1547
1548 test_loopback_SOURCES = \
1549         src/test/test-loopback.c
1550
1551 test_loopback_LDADD = \
1552         libsystemd-core.la
1553
1554 test_hostname_SOURCES = \
1555         src/test/test-hostname.c
1556
1557 test_hostname_LDADD = \
1558         libsystemd-core.la
1559
1560 if ENABLE_EFI
1561 manual_tests += \
1562         test-boot-timestamp
1563
1564 test_boot_timestamp_SOURCES = \
1565         src/test/test-boot-timestamps.c
1566
1567 test_boot_timestamp_LDADD = \
1568         libsystemd-shared.la
1569 endif
1570
1571 test_unit_name_SOURCES = \
1572         src/test/test-unit-name.c
1573
1574 test_unit_name_CFLAGS = \
1575         $(AM_CFLAGS) \
1576         $(SECCOMP_CFLAGS)
1577
1578 test_unit_name_LDADD = \
1579         libsystemd-core.la \
1580         $(RT_LIBS)
1581
1582 test_unit_file_SOURCES = \
1583         src/test/test-unit-file.c
1584
1585 test_unit_file_CFLAGS = \
1586         $(AM_CFLAGS) \
1587         $(SECCOMP_CFLAGS)
1588
1589 test_unit_file_LDADD = \
1590         libsystemd-core.la \
1591         $(RT_LIBS)
1592
1593 test_utf8_SOURCES = \
1594         src/test/test-utf8.c
1595
1596 test_utf8_LDADD = \
1597         libsystemd-shared.la
1598
1599 test_capability_SOURCES = \
1600         src/test/test-capability.c
1601
1602 test_capability_LDADD = \
1603         libsystemd-shared.la
1604
1605 test_async_SOURCES = \
1606         src/test/test-async.c
1607
1608 test_async_LDADD = \
1609         libsystemd-shared.la
1610
1611 test_locale_util_SOURCES = \
1612         src/test/test-locale-util.c
1613
1614 test_locale_util_LDADD = \
1615         libsystemd-shared.la
1616
1617 test_copy_SOURCES = \
1618         src/test/test-copy.c
1619
1620 test_copy_LDADD = \
1621         libsystemd-label.la \
1622         libsystemd-shared.la
1623
1624 test_sigbus_SOURCES = \
1625         src/test/test-sigbus.c
1626
1627 test_sigbus_LDADD = \
1628         libsystemd-shared.la
1629
1630 test_condition_SOURCES = \
1631         src/test/test-condition.c
1632
1633 test_condition_LDADD = \
1634         libsystemd-label.la \
1635         libsystemd-internal.la \
1636         libsystemd-shared.la
1637
1638 test_fdset_SOURCES = \
1639         src/test/test-fdset.c
1640
1641 test_fdset_LDADD = \
1642         libsystemd-shared.la \
1643         libsystemd-internal.la
1644
1645 test_fstab_util_SOURCES = \
1646         src/test/test-fstab-util.c
1647
1648 test_fstab_util_LDADD = \
1649         libsystemd-shared.la
1650
1651 test_ratelimit_SOURCES = \
1652         src/test/test-ratelimit.c
1653
1654 test_ratelimit_LDADD = \
1655         libsystemd-shared.la
1656
1657 test_util_SOURCES = \
1658         src/test/test-util.c
1659
1660 test_util_LDADD = \
1661         libsystemd-shared.la
1662
1663 test_path_lookup_SOURCES = \
1664         src/test/test-path-lookup.c
1665
1666 test_path_lookup_LDADD = \
1667         -lm \
1668         libsystemd-units.la \
1669         libsystemd-shared.la
1670
1671 test_uid_range_SOURCES = \
1672         src/test/test-uid-range.c
1673
1674 test_uid_range_LDADD = \
1675         libsystemd-shared.la
1676
1677 test_cap_list_SOURCES = \
1678         src/test/test-cap-list.c
1679
1680 test_cap_list_LDADD = \
1681         libsystemd-shared.la
1682
1683 test_socket_util_SOURCES = \
1684         src/test/test-socket-util.c
1685
1686 test_socket_util_LDADD = \
1687         libsystemd-shared.la
1688
1689 test_ring_SOURCES = \
1690         src/test/test-ring.c
1691
1692 test_ring_LDADD = \
1693         libsystemd-shared.la
1694
1695 test_barrier_SOURCES = \
1696         src/test/test-barrier.c
1697
1698 test_barrier_LDADD = \
1699         libsystemd-shared.la
1700
1701 test_pty_SOURCES = \
1702         src/test/test-pty.c
1703
1704 test_pty_LDADD = \
1705         libsystemd-core.la
1706
1707 test_tmpfiles_SOURCES = \
1708         src/test/test-tmpfiles.c
1709
1710 test_tmpfiles_LDADD = \
1711         libsystemd-shared.la
1712
1713 test_namespace_SOURCES = \
1714         src/test/test-namespace.c
1715
1716 test_verbs_SOURCES = \
1717         src/test/test-verbs.c
1718
1719 test_verbs_LDADD = \
1720         libsystemd-shared.la
1721
1722 test_namespace_LDADD = \
1723         libsystemd-core.la
1724
1725 BUILT_SOURCES += \
1726         src/test/test-hashmap-ordered.c
1727
1728 src/test/test-hashmap-ordered.c: src/test/test-hashmap-plain.c
1729         $(AM_V_at)$(MKDIR_P) $(dir $@)
1730         $(AM_V_GEN)$(AWK) 'BEGIN { print "/* GENERATED FILE */\n#define ORDERED" } \
1731                            { if (!match($$0, "^#include"))          \
1732                                  gsub(/hashmap/, "ordered_hashmap"); \
1733                              gsub(/HASHMAP/, "ORDERED_HASHMAP");     \
1734                              gsub(/Hashmap/, "OrderedHashmap");      \
1735                              print }' <$< >$@
1736
1737 nodist_test_hashmap_SOURCES = \
1738         src/test/test-hashmap-ordered.c
1739
1740 test_hashmap_SOURCES = \
1741         src/test/test-hashmap.c \
1742         src/test/test-hashmap-plain.c
1743
1744 test_hashmap_LDADD = \
1745         libsystemd-shared.la
1746
1747 test_set_SOURCES = \
1748         src/test/test-set.c
1749
1750 test_set_LDADD = \
1751         libsystemd-shared.la
1752
1753 test_xml_SOURCES = \
1754         src/test/test-xml.c
1755
1756 test_xml_LDADD = \
1757         libsystemd-shared.la
1758
1759 test_json_SOURCES = \
1760         src/test/test-json.c
1761
1762 test_json_LDADD = \
1763         libsystemd-shared.la
1764
1765 test_list_SOURCES = \
1766         src/test/test-list.c
1767
1768 test_list_LDADD = \
1769         libsystemd-shared.la
1770
1771 test_unaligned_LDADD = \
1772         libsystemd-shared.la
1773
1774 test_unaligned_SOURCES = \
1775         src/test/test-unaligned.c
1776
1777 test_tables_SOURCES = \
1778         src/test/test-tables.c \
1779         src/shared/test-tables.h \
1780         src/bus-proxyd/bus-xml-policy.c \
1781         src/bus-proxyd/bus-xml-policy.h \
1782         src/journal/journald-server.c \
1783         src/journal/journald-server.h
1784
1785 test_tables_CPPFLAGS = \
1786         $(AM_CPPFLAGS) \
1787         -I$(top_srcdir)/src/bus-proxyd
1788
1789 test_tables_CFLAGS = \
1790         $(AM_CFLAGS) \
1791         $(SECCOMP_CFLAGS)
1792
1793 test_tables_LDADD = \
1794         libsystemd-logs.la \
1795         libsystemd-journal-internal.la \
1796         libsystemd-journal-core.la \
1797         libsystemd-core.la \
1798         libudev-core.la \
1799         $(RT_LIBS)
1800
1801 test_prioq_SOURCES = \
1802         src/test/test-prioq.c
1803
1804 test_prioq_LDADD = \
1805         libsystemd-shared.la
1806
1807 test_fileio_SOURCES = \
1808         src/test/test-fileio.c
1809
1810 test_fileio_LDADD = \
1811         libsystemd-shared.la
1812
1813 test_time_SOURCES = \
1814         src/test/test-time.c
1815
1816 test_time_LDADD = \
1817         libsystemd-shared.la
1818
1819 test_architecture_SOURCES = \
1820         src/test/test-architecture.c
1821
1822 test_architecture_LDADD = \
1823         libsystemd-shared.la
1824
1825 test_log_SOURCES = \
1826         src/test/test-log.c
1827
1828 test_log_LDADD = \
1829         libsystemd-shared.la
1830
1831 test_ipcrm_SOURCES = \
1832         src/test/test-ipcrm.c
1833
1834 test_ipcrm_LDADD = \
1835         libsystemd-shared.la \
1836         -lrt
1837
1838 test_btrfs_SOURCES = \
1839         src/test/test-btrfs.c
1840
1841 test_btrfs_LDADD = \
1842         libsystemd-label.la \
1843         libsystemd-shared.la
1844
1845 if HAVE_LIBIPTC
1846 test_fw_util_SOURCES = \
1847         src/test/test-fw-util.c
1848
1849 test_fw_util_CFLAGS = \
1850         $(AM_CFLAGS) \
1851         $(LIBIPTC_CFLAGS)
1852
1853 test_fw_util_LDADD = \
1854         libsystemd-fw.la \
1855         libsystemd-shared.la \
1856         $(LIBIPTC_LIBS)
1857 endif
1858
1859 test_rtnl_manual_SOURCES = \
1860         src/test/test-rtnl-manual.c
1861
1862 test_rtnl_manual_CFLAGS = \
1863         $(AM_CFLAGS) \
1864         $(KMOD_CFLAGS)
1865
1866 test_rtnl_manual_LDADD = \
1867         libsystemd-internal.la \
1868         libsystemd-shared.la \
1869         $(KMOD_LIBS)
1870
1871 test_ellipsize_SOURCES = \
1872         src/test/test-ellipsize.c
1873
1874 test_ellipsize_LDADD = \
1875         libsystemd-shared.la
1876
1877 test_date_SOURCES = \
1878         src/test/test-date.c
1879
1880 test_date_LDADD = \
1881         libsystemd-shared.la
1882
1883 test_sleep_SOURCES = \
1884         src/test/test-sleep.c
1885
1886 test_sleep_LDADD = \
1887         libsystemd-core.la
1888
1889 test_replace_var_SOURCES = \
1890         src/test/test-replace-var.c
1891
1892 test_replace_var_LDADD = \
1893         libsystemd-shared.la
1894
1895 test_calendarspec_SOURCES = \
1896         src/test/test-calendarspec.c
1897
1898 test_calendarspec_LDADD = \
1899         libsystemd-shared.la
1900
1901 test_strip_tab_ansi_SOURCES = \
1902         src/test/test-strip-tab-ansi.c
1903
1904 test_strip_tab_ansi_LDADD = \
1905         libsystemd-shared.la
1906
1907 test_daemon_SOURCES = \
1908         src/test/test-daemon.c
1909
1910 test_daemon_LDADD = \
1911         libsystemd-internal.la \
1912         libsystemd-shared.la
1913
1914 test_cgroup_SOURCES = \
1915         src/test/test-cgroup.c
1916
1917 test_cgroup_LDADD = \
1918         libsystemd-label.la \
1919         libsystemd-shared.la \
1920         libsystemd-internal.la
1921
1922 test_cgroup_mask_SOURCES = \
1923         src/test/test-cgroup-mask.c
1924
1925 test_cgroup_mask_CPPFLAGS = \
1926         $(AM_CPPFLAGS)
1927
1928 test_cgroup_mask_CFLAGS = \
1929         $(AM_CFLAGS) \
1930         $(SECCOMP_CFLAGS)
1931
1932 test_cgroup_mask_LDADD = \
1933         libsystemd-core.la \
1934         $(RT_LIBS)
1935
1936 test_cgroup_util_SOURCES = \
1937         src/test/test-cgroup-util.c
1938
1939 test_cgroup_util_LDADD = \
1940         libsystemd-label.la \
1941         libsystemd-internal.la \
1942         libsystemd-shared.la
1943
1944 test_env_replace_SOURCES = \
1945         src/test/test-env-replace.c
1946
1947 test_env_replace_LDADD = \
1948         libsystemd-shared.la
1949
1950 test_strbuf_SOURCES = \
1951         src/test/test-strbuf.c
1952
1953 test_strbuf_LDADD = \
1954         libsystemd-shared.la
1955
1956 test_strv_SOURCES = \
1957         src/test/test-strv.c
1958
1959 test_strv_LDADD = \
1960         libsystemd-units.la \
1961         libsystemd-internal.la \
1962         libsystemd-shared.la
1963
1964 test_path_util_SOURCES = \
1965         src/test/test-path-util.c
1966
1967 test_path_util_LDADD = \
1968         libsystemd-shared.la
1969
1970 test_path_SOURCES = \
1971         src/test/test-path.c
1972
1973 test_path_CFLAGS = \
1974         $(AM_CFLAGS)
1975
1976 test_path_LDADD = \
1977         libsystemd-core.la
1978
1979 test_execute_SOURCES = \
1980         src/test/test-execute.c
1981
1982 test_execute_CFLAGS = \
1983         $(AM_CFLAGS)
1984
1985 test_execute_LDADD = \
1986         libsystemd-core.la
1987
1988 test_strxcpyx_SOURCES = \
1989         src/test/test-strxcpyx.c
1990
1991 test_strxcpyx_LDADD = \
1992         libsystemd-shared.la
1993
1994 test_install_SOURCES = \
1995         src/test/test-install.c
1996
1997 test_install_LDADD = \
1998         libsystemd-units.la \
1999         libsystemd-label.la \
2000         libsystemd-shared.la \
2001         libsystemd-internal.la
2002
2003 test_watchdog_SOURCES = \
2004         src/test/test-watchdog.c
2005
2006 test_watchdog_LDADD = \
2007         libsystemd-shared.la
2008
2009 test_sched_prio_SOURCES = \
2010         src/test/test-sched-prio.c
2011
2012 test_sched_prio_CPPFLAGS = \
2013         $(AM_CPPFLAGS)
2014
2015 test_sched_prio_CFLAGS = \
2016         $(AM_CFLAGS) \
2017         $(SECCOMP_CFLAGS)
2018
2019 test_sched_prio_LDADD = \
2020         libsystemd-core.la \
2021         $(RT_LIBS)
2022
2023 test_conf_files_SOURCES = \
2024         src/test/test-conf-files.c
2025
2026 test_conf_files_LDADD = \
2027         libsystemd-shared.la
2028
2029 test_bus_policy_SOURCES = \
2030         src/bus-proxyd/test-bus-xml-policy.c
2031
2032 test_bus_policy_LDADD = \
2033         libsystemd-proxy.la \
2034         libsystemd-internal.la \
2035         libsystemd-shared.la
2036
2037 # ------------------------------------------------------------------------------
2038 ## .PHONY so it always rebuilds it
2039 .PHONY: coverage lcov-run lcov-report coverage-sync
2040
2041 # run lcov from scratch, always
2042 coverage: all
2043         $(MAKE) lcov-run
2044         $(MAKE) lcov-report
2045
2046 coverage_dir = coverage
2047 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
2048
2049 if ENABLE_COVERAGE
2050 # reset run coverage tests
2051 lcov-run:
2052         @rm -rf $(coverage_dir)
2053         lcov $(coverage_opts) --zerocounters
2054         -$(MAKE) check
2055
2056 # generate report based on current coverage data
2057 lcov-report:
2058         $(MKDIR_P) $(coverage_dir)
2059         lcov $(coverage_opts) --compat-libtool --capture --no-external \
2060                 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
2061         lcov --remove $(coverage_dir)/.lcov.info --output-file $(coverage_dir)/.lcov-clean.info 'test-*'
2062         genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov-clean.info
2063         @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
2064
2065 # lcov doesn't work properly with vpath builds, make sure that bad
2066 # output is not uploaded by mistake.
2067 coverage-sync: coverage
2068         test "$(builddir)" = "$(srcdir)"
2069         rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
2070
2071 else
2072 lcov-run lcov-report:
2073         echo "Need to reconfigure with --enable-coverage"
2074 endif
2075
2076 # ------------------------------------------------------------------------------
2077 systemd_analyze_SOURCES = \
2078         src/analyze/analyze.c \
2079         src/analyze/analyze-verify.c \
2080         src/analyze/analyze-verify.h
2081
2082 systemd_verify_CFLAGS = \
2083         $(AM_CFLAGS) \
2084         $(SECCOMP_CFLAGS)
2085
2086 systemd_analyze_LDADD = \
2087         libsystemd-core.la \
2088         libsystemd-internal.la \
2089         libsystemd-shared.la \
2090         $(RT_LIBS)
2091
2092 # ------------------------------------------------------------------------------
2093 systemd_initctl_SOURCES = \
2094         src/initctl/initctl.c
2095
2096 systemd_initctl_LDADD = \
2097         libsystemd-internal.la \
2098         libsystemd-shared.la
2099
2100 # ------------------------------------------------------------------------------
2101 systemd_update_utmp_SOURCES = \
2102         src/update-utmp/update-utmp.c
2103
2104 systemd_update_utmp_CFLAGS = \
2105         $(AM_CFLAGS) \
2106         $(AUDIT_CFLAGS)
2107
2108 systemd_update_utmp_LDADD = \
2109         libsystemd-internal.la \
2110         libsystemd-shared.la \
2111         $(AUDIT_LIBS)
2112
2113 # ------------------------------------------------------------------------------
2114 systemd_update_done_SOURCES = \
2115         src/update-done/update-done.c
2116
2117 systemd_update_done_LDADD = \
2118         libsystemd-internal.la \
2119         libsystemd-label.la \
2120         libsystemd-shared.la
2121
2122 # ------------------------------------------------------------------------------
2123 systemd_shutdownd_SOURCES = \
2124         src/shutdownd/shutdownd.c
2125
2126 systemd_shutdownd_LDADD = \
2127         libsystemd-label.la \
2128         libsystemd-internal.la \
2129         libsystemd-shared.la
2130
2131 dist_doc_DATA += \
2132         src/systemd/sd-shutdown.h
2133
2134 # ------------------------------------------------------------------------------
2135 systemd_shutdown_SOURCES = \
2136         src/core/umount.c \
2137         src/core/umount.h \
2138         src/core/shutdown.c \
2139         src/core/mount-setup.c \
2140         src/core/mount-setup.h \
2141         src/core/killall.h \
2142         src/core/killall.c
2143
2144 systemd_shutdown_LDADD = \
2145         libsystemd-label.la \
2146         libudev-internal.la \
2147         libsystemd-shared.la
2148
2149 # ------------------------------------------------------------------------------
2150 if HAVE_KMOD
2151 systemd_modules_load_SOURCES = \
2152         src/modules-load/modules-load.c
2153
2154 systemd_modules_load_CFLAGS = \
2155         $(AM_CFLAGS) \
2156         $(KMOD_CFLAGS)
2157
2158 systemd_modules_load_LDADD = \
2159         libsystemd-shared.la \
2160         $(KMOD_LIBS)
2161
2162 rootlibexec_PROGRAMS += \
2163         systemd-modules-load
2164
2165 nodist_systemunit_DATA += \
2166         units/systemd-modules-load.service
2167
2168 SYSINIT_TARGET_WANTS += \
2169         systemd-modules-load.service
2170
2171 if ENABLE_TMPFILES
2172 nodist_systemunit_DATA += \
2173         units/kmod-static-nodes.service
2174
2175 SYSINIT_TARGET_WANTS += \
2176         kmod-static-nodes.service
2177 endif
2178 endif
2179
2180 EXTRA_DIST += \
2181         units/systemd-modules-load.service.in \
2182         units/kmod-static-nodes.service.in
2183
2184 # ------------------------------------------------------------------------------
2185 if ENABLE_TMPFILES
2186 systemd_tmpfiles_SOURCES = \
2187         src/tmpfiles/tmpfiles.c
2188
2189 systemd_tmpfiles_LDADD = \
2190         libsystemd-units.la \
2191         libsystemd-label.la \
2192         libsystemd-internal.la \
2193         libsystemd-shared.la
2194
2195 if HAVE_ACL
2196 systemd_tmpfiles_LDADD += \
2197         libsystemd-acl.la
2198 endif
2199
2200 rootbin_PROGRAMS += \
2201         systemd-tmpfiles
2202
2203 dist_systemunit_DATA += \
2204         units/systemd-tmpfiles-clean.timer
2205
2206 nodist_systemunit_DATA += \
2207         units/systemd-tmpfiles-setup-dev.service \
2208         units/systemd-tmpfiles-setup.service \
2209         units/systemd-tmpfiles-clean.service
2210
2211 nodist_tmpfiles_DATA = \
2212         tmpfiles.d/systemd.conf \
2213         tmpfiles.d/etc.conf
2214
2215 dist_tmpfiles_DATA = \
2216         tmpfiles.d/systemd-nologin.conf \
2217         tmpfiles.d/tmp.conf \
2218         tmpfiles.d/x11.conf \
2219         tmpfiles.d/var.conf
2220
2221 if HAVE_SYSV_COMPAT
2222 dist_tmpfiles_DATA += \
2223         tmpfiles.d/legacy.conf
2224 endif
2225
2226 SYSINIT_TARGET_WANTS += \
2227         systemd-tmpfiles-setup-dev.service \
2228         systemd-tmpfiles-setup.service
2229
2230 dist_zshcompletion_DATA += \
2231         shell-completion/zsh/_systemd-tmpfiles
2232
2233 TIMERS_TARGET_WANTS += \
2234         systemd-tmpfiles-clean.timer
2235
2236 INSTALL_DIRS += \
2237         $(tmpfilesdir) \
2238         $(sysconfdir)/tmpfiles.d
2239 endif
2240
2241 EXTRA_DIST += \
2242         tmpfiles.d/systemd.conf.m4 \
2243         tmpfiles.d/etc.conf.m4 \
2244         units/systemd-tmpfiles-setup-dev.service.in \
2245         units/systemd-tmpfiles-setup.service.in \
2246         units/systemd-tmpfiles-clean.service.in
2247
2248 # ------------------------------------------------------------------------------
2249 if ENABLE_SYSUSERS
2250 systemd_sysusers_SOURCES = \
2251         src/sysusers/sysusers.c
2252
2253 systemd_sysusers_LDADD = \
2254         libsystemd-units.la \
2255         libsystemd-label.la \
2256         libsystemd-internal.la \
2257         libsystemd-shared.la
2258
2259 rootbin_PROGRAMS += \
2260         systemd-sysusers
2261
2262 nodist_systemunit_DATA += \
2263         units/systemd-sysusers.service
2264
2265 SYSINIT_TARGET_WANTS += \
2266         systemd-sysusers.service
2267
2268 nodist_sysusers_DATA = \
2269         sysusers.d/systemd.conf \
2270         sysusers.d/basic.conf
2271
2272 EXTRA_DIST += \
2273         units/systemd-sysusers.service.in \
2274         sysusers.d/systemd.conf.m4 \
2275         sysusers.d/basic.conf.in
2276
2277 INSTALL_DIRS += \
2278         $(sysusersdir)
2279 endif
2280
2281 # ------------------------------------------------------------------------------
2282 dist_factory_etc_DATA = \
2283         factory/etc/nsswitch.conf
2284
2285 if HAVE_PAM
2286 dist_factory_pam_DATA = \
2287         factory/etc/pam.d/system-auth \
2288         factory/etc/pam.d/other
2289 endif
2290
2291 # ------------------------------------------------------------------------------
2292 if ENABLE_FIRSTBOOT
2293 systemd_firstboot_SOURCES = \
2294         src/firstboot/firstboot.c
2295
2296 systemd_firstboot_LDADD = \
2297         libsystemd-units.la \
2298         libsystemd-label.la \
2299         libsystemd-internal.la \
2300         libsystemd-shared.la \
2301         -lcrypt
2302
2303 rootbin_PROGRAMS += \
2304         systemd-firstboot
2305
2306 nodist_systemunit_DATA += \
2307         units/systemd-firstboot.service
2308
2309 EXTRA_DIST += \
2310         units/systemd-firstboot.service.in
2311
2312 SYSINIT_TARGET_WANTS += \
2313         systemd-firstboot.service
2314 endif
2315
2316 # ------------------------------------------------------------------------------
2317 systemd_machine_id_setup_SOURCES = \
2318         src/machine-id-setup/machine-id-setup-main.c \
2319         src/core/machine-id-setup.c \
2320         src/core/machine-id-setup.h
2321
2322 systemd_machine_id_setup_LDADD = \
2323         libsystemd-label.la \
2324         libsystemd-internal.la \
2325         libsystemd-shared.la
2326
2327 # ------------------------------------------------------------------------------
2328 systemd_sysctl_SOURCES = \
2329         src/sysctl/sysctl.c
2330
2331 systemd_sysctl_LDADD = \
2332         libsystemd-shared.la
2333
2334 # ------------------------------------------------------------------------------
2335 systemd_sleep_SOURCES = \
2336         src/sleep/sleep.c
2337
2338 systemd_sleep_LDADD = \
2339         libsystemd-shared.la
2340
2341 # ------------------------------------------------------------------------------
2342 systemd_fsck_SOURCES = \
2343         src/fsck/fsck.c
2344
2345 systemd_fsck_LDADD = \
2346         libsystemd-internal.la \
2347         libudev-internal.la \
2348         libsystemd-shared.la
2349
2350 # ------------------------------------------------------------------------------
2351 systemd_fsckd_SOURCES = \
2352         src/fsckd/fsckd.c \
2353         src/fsckd/fsckd.h \
2354         $(NULL)
2355
2356 systemd_fsckd_LDADD = \
2357         libsystemd-internal.la \
2358         libsystemd-label.la \
2359         libsystemd-shared.la \
2360         libudev-internal.la \
2361         $(NULL)
2362
2363 # ------------------------------------------------------------------------------
2364 systemd_machine_id_commit_SOURCES = \
2365         src/machine-id-commit/machine-id-commit.c \
2366         src/core/machine-id-setup.c \
2367         src/core/machine-id-setup.h
2368
2369 systemd_machine_id_commit_LDADD = \
2370         libsystemd-label.la \
2371         libsystemd-internal.la \
2372         libsystemd-shared.la
2373
2374 SYSINIT_TARGET_WANTS += \
2375         systemd-machine-id-commit.service
2376
2377 # ------------------------------------------------------------------------------
2378 systemd_ac_power_SOURCES = \
2379         src/ac-power/ac-power.c
2380
2381 systemd_ac_power_LDADD = \
2382         libudev-internal.la \
2383         libsystemd-shared.la
2384
2385 # ------------------------------------------------------------------------------
2386 systemd_detect_virt_SOURCES = \
2387         src/detect-virt/detect-virt.c
2388
2389 systemd_detect_virt_LDADD = \
2390         libsystemd-shared.la
2391
2392 INSTALL_EXEC_HOOKS += \
2393         systemd-detect-virt-install-hook
2394
2395 # ------------------------------------------------------------------------------
2396 systemd_delta_SOURCES = \
2397         src/delta/delta.c
2398
2399 systemd_delta_LDADD = \
2400         libsystemd-shared.la
2401
2402 # ------------------------------------------------------------------------------
2403 systemd_getty_generator_SOURCES = \
2404         src/getty-generator/getty-generator.c
2405
2406 systemd_getty_generator_LDADD = \
2407         libsystemd-label.la \
2408         libsystemd-shared.la
2409
2410 # ------------------------------------------------------------------------------
2411 systemd_debug_generator_SOURCES = \
2412         src/debug-generator/debug-generator.c
2413
2414 systemd_debug_generator_LDADD = \
2415         libsystemd-label.la \
2416         libsystemd-shared.la
2417
2418 # ------------------------------------------------------------------------------
2419 systemd_fstab_generator_SOURCES = \
2420         src/fstab-generator/fstab-generator.c \
2421         src/core/mount-setup.c
2422
2423 systemd_fstab_generator_LDADD = \
2424         libsystemd-label.la \
2425         libsystemd-shared.la
2426
2427 # ------------------------------------------------------------------------------
2428 systemd_system_update_generator_SOURCES = \
2429         src/system-update-generator/system-update-generator.c
2430
2431 systemd_system_update_generator_LDADD = \
2432         libsystemd-label.la \
2433         libsystemd-shared.la
2434
2435 # ------------------------------------------------------------------------------
2436 if ENABLE_HIBERNATE
2437 systemgenerator_PROGRAMS += \
2438         systemd-hibernate-resume-generator
2439
2440 rootlibexec_PROGRAMS += \
2441         systemd-hibernate-resume
2442
2443 systemd_hibernate_resume_SOURCES = \
2444         src/hibernate-resume/hibernate-resume.c
2445
2446 systemd_hibernate_resume_LDADD = \
2447         libsystemd-internal.la \
2448         libsystemd-shared.la
2449
2450 systemd_hibernate_resume_generator_SOURCES = \
2451         src/hibernate-resume/hibernate-resume-generator.c
2452
2453 systemd_hibernate_resume_generator_LDADD = \
2454         libsystemd-label.la \
2455         libsystemd-shared.la
2456
2457 EXTRA_DIST += \
2458         units/systemd-hibernate.service.in \
2459         units/systemd-hibernate-resume@.service.in \
2460         units/systemd-hybrid-sleep.service.in
2461
2462 dist_systemunit_DATA += \
2463         units/hibernate.target \
2464         units/hybrid-sleep.target
2465
2466 nodist_systemunit_DATA += \
2467         units/systemd-hibernate.service \
2468         units/systemd-hibernate-resume@.service \
2469         units/systemd-hybrid-sleep.service
2470 endif
2471
2472 # ------------------------------------------------------------------------------
2473 if ENABLE_EFI
2474 systemgenerator_PROGRAMS +=  \
2475         systemd-efi-boot-generator
2476
2477 systemd_efi_boot_generator_SOURCES = \
2478         src/efi-boot-generator/efi-boot-generator.c
2479
2480 systemd_efi_boot_generator_LDADD = \
2481         libsystemd-label.la \
2482         libsystemd-shared.la
2483
2484 # ------------------------------------------------------------------------------
2485 if HAVE_BLKID
2486 bootctl_SOURCES = \
2487         src/boot/bootctl.c
2488
2489 bootctl_CPPFLAGS = \
2490         $(AM_CPPFLAGS) \
2491         -DEFI_MACHINE_TYPE_NAME=\"$(EFI_MACHINE_TYPE_NAME)\" \
2492         -DBOOTLIBDIR=\"$(bootlibdir)\"
2493
2494 bootctl_CFLAGS = \
2495         $(AM_CFLAGS) \
2496         $(BLKID_CFLAGS)
2497
2498 bootctl_LDADD = \
2499         libsystemd-shared.la \
2500         libsystemd-internal.la \
2501         $(BLKID_LIBS)
2502
2503 bin_PROGRAMS += \
2504         bootctl
2505
2506 dist_bashcompletion_DATA += \
2507         shell-completion/bash/bootctl
2508
2509 dist_zshcompletion_DATA += \
2510         shell-completion/zsh/_bootctl
2511 endif
2512
2513 # ------------------------------------------------------------------------------
2514 if HAVE_GNUEFI
2515 efi_cppflags = \
2516         $(EFI_CPPFLAGS) \
2517         -I$(top_builddir) -include config.h \
2518         -I$(EFI_INC_DIR)/efi \
2519         -I$(EFI_INC_DIR)/efi/$(EFI_ARCH) \
2520         -DEFI_MACHINE_TYPE_NAME=\"$(EFI_MACHINE_TYPE_NAME)\"
2521
2522 efi_cflags = \
2523         $(EFI_CFLAGS) \
2524         -Wall \
2525         -Wextra \
2526         -std=gnu90 \
2527         -nostdinc \
2528         -ggdb -O0 \
2529         -fpic \
2530         -fshort-wchar \
2531         -nostdinc \
2532         -ffreestanding \
2533         -fno-strict-aliasing \
2534         -fno-stack-protector \
2535         -Wsign-compare \
2536         -Wno-missing-field-initializers \
2537         -mno-sse \
2538         -mno-mmx
2539
2540 if ARCH_X86_64
2541 efi_cflags += \
2542         -mno-red-zone \
2543         -DEFI_FUNCTION_WRAPPER \
2544         -DGNU_EFI_USE_MS_ABI
2545 endif
2546
2547 efi_ldflags = \
2548         $(EFI_LDFLAGS) \
2549         -T $(EFI_LDS_DIR)/elf_$(EFI_ARCH)_efi.lds \
2550         -shared \
2551         -Bsymbolic \
2552         -nostdlib \
2553         -znocombreloc \
2554         -L $(EFI_LIB_DIR) \
2555         $(EFI_LDS_DIR)/crt0-efi-$(EFI_ARCH).o
2556
2557 # ------------------------------------------------------------------------------
2558 systemd_boot_headers = \
2559         src/boot/efi/util.h \
2560         src/boot/efi/console.h \
2561         src/boot/efi/graphics.h \
2562         src/boot/efi/pefile.h
2563
2564 systemd_boot_sources = \
2565         src/boot/efi/util.c \
2566         src/boot/efi/console.c \
2567         src/boot/efi/graphics.c \
2568         src/boot/efi/pefile.c \
2569         src/boot/efi/boot.c
2570
2571 systemd_boot_objects = $(addprefix $(top_builddir)/,$(systemd_boot_sources:.c=.o))
2572 systemd_boot_solib = $(top_builddir)/src/boot/efi/systemd_boot.so
2573 systemd_boot = systemd-boot$(EFI_MACHINE_TYPE_NAME).efi
2574
2575 bootlib_DATA = $(systemd_boot)
2576 CLEANFILES += $(systemd_boot_objects) $(systemd_boot_solib) $(systemd_boot)
2577 EXTRA_DIST += $(systemd_boot_sources) $(systemd_boot_headers)
2578
2579 $(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(systemd_boot_headers))
2580         @$(MKDIR_P) $(top_builddir)/src/boot/efi/
2581         $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
2582
2583 $(systemd_boot_solib): $(systemd_boot_objects)
2584         $(AM_V_CCLD)$(LD) $(efi_ldflags) $(systemd_boot_objects) \
2585                 -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
2586         nm -D -u $@ | grep ' U ' && exit 1 || :
2587
2588 $(systemd_boot): $(systemd_boot_solib)
2589         $(AM_V_GEN) objcopy -j .text -j .sdata -j .data -j .dynamic \
2590           -j .dynsym -j .rel -j .rela -j .reloc \
2591           --target=efi-app-$(EFI_ARCH) $< $@
2592
2593 # ------------------------------------------------------------------------------
2594 stub_headers = \
2595         src/boot/efi/util.h \
2596         src/boot/efi/pefile.h \
2597         src/boot/efi/graphics.h \
2598         src/boot/efi/splash.h \
2599         src/boot/efi/linux.h
2600
2601 stub_sources = \
2602         src/boot/efi/util.c \
2603         src/boot/efi/pefile.c \
2604         src/boot/efi/graphics.c \
2605         src/boot/efi/splash.c \
2606         src/boot/efi/linux.c \
2607         src/boot/efi/stub.c
2608
2609 stub_objects = $(addprefix $(top_builddir)/,$(stub_sources:.c=.o))
2610 stub_solib = $(top_builddir)/src/boot/efi/stub.so
2611 stub = linux$(EFI_MACHINE_TYPE_NAME).efi.stub
2612
2613 bootlib_DATA += $(stub)
2614 CLEANFILES += $(stub_objects) $(stub_solib) $(stub)
2615 EXTRA_DIST += $(stub_sources) $(stub_headers)
2616
2617 $(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(stub_headers))
2618         @$(MKDIR_P) $(top_builddir)/src/boot/efi/
2619         $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
2620
2621 $(stub_solib): $(stub_objects)
2622         $(AM_V_CCLD)$(LD) $(efi_ldflags) $(stub_objects) \
2623                 -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
2624         nm -D -u $@ | grep ' U ' && exit 1 || :
2625
2626 $(stub): $(stub_solib)
2627         $(AM_V_GEN) objcopy -j .text -j .sdata -j .data -j .dynamic \
2628           -j .dynsym -j .rel -j .rela -j .reloc \
2629           --target=efi-app-$(EFI_ARCH) $< $@
2630
2631 # ------------------------------------------------------------------------------
2632 CLEANFILES += test-efi-disk.img
2633 EXTRA_DIST += test/test-efi-create-disk.sh
2634
2635 test-efi-disk.img: $(systemd_boot) $(stub) test/test-efi-create-disk.sh
2636         $(AM_V_GEN)test/test-efi-create-disk.sh
2637
2638 test-efi: test-efi-disk.img
2639         $(QEMU) -machine accel=kvm -m 1024 -bios $(QEMU_BIOS) -snapshot test-efi-disk.img
2640 endif
2641 endif
2642
2643 # ------------------------------------------------------------------------------
2644 if HAVE_BLKID
2645 systemgenerator_PROGRAMS +=  \
2646         systemd-gpt-auto-generator
2647
2648 systemd_gpt_auto_generator_SOURCES = \
2649         src/gpt-auto-generator/gpt-auto-generator.c \
2650         src/shared/blkid-util.h
2651
2652 systemd_gpt_auto_generator_LDADD = \
2653         libsystemd-label.la \
2654         libsystemd-internal.la \
2655         libudev-internal.la \
2656         libsystemd-shared.la \
2657         $(BLKID_LIBS)
2658
2659 systemd_gpt_auto_generator_CFLAGS = \
2660         $(AM_CFLAGS) \
2661         $(BLKID_CFLAGS)
2662 endif
2663
2664 # ------------------------------------------------------------------------------
2665 if ENABLE_KDBUS
2666 systemgenerator_PROGRAMS +=  \
2667         systemd-dbus1-generator
2668
2669 systemd_dbus1_generator_SOURCES = \
2670         src/dbus1-generator/dbus1-generator.c
2671
2672 systemd_dbus1_generator_LDADD = \
2673         libsystemd-label.la \
2674         libsystemd-internal.la \
2675         libsystemd-shared.la
2676
2677 dbus1-generator-install-hook:
2678         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
2679         $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2680         $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2681
2682 dbus1-generator-uninstall-hook:
2683         rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2684
2685 dist_xinitrc_SCRIPTS = \
2686         xorg/50-systemd-user.sh
2687
2688 INSTALL_EXEC_HOOKS += dbus1-generator-install-hook
2689 UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook
2690 endif
2691
2692 # ------------------------------------------------------------------------------
2693 systemd_sysv_generator_SOURCES = \
2694         src/sysv-generator/sysv-generator.c
2695
2696 systemd_sysv_generator_LDADD = \
2697         libsystemd-core.la \
2698         libsystemd-label.la \
2699         libsystemd-shared.la
2700
2701 # ------------------------------------------------------------------------------
2702 systemd_rc_local_generator_SOURCES = \
2703         src/rc-local-generator/rc-local-generator.c
2704
2705 systemd_rc_local_generator_LDADD = \
2706         libsystemd-label.la \
2707         libsystemd-shared.la
2708
2709 # ------------------------------------------------------------------------------
2710 systemd_remount_fs_SOURCES = \
2711         src/remount-fs/remount-fs.c \
2712         src/core/mount-setup.c \
2713         src/core/mount-setup.h
2714
2715 systemd_remount_fs_LDADD = \
2716         libsystemd-label.la \
2717         libsystemd-shared.la
2718
2719 # ------------------------------------------------------------------------------
2720 systemd_cgroups_agent_SOURCES = \
2721         src/cgroups-agent/cgroups-agent.c
2722
2723 systemd_cgroups_agent_LDADD = \
2724         libsystemd-internal.la \
2725         libsystemd-shared.la
2726
2727 # ------------------------------------------------------------------------------
2728 systemd_escape_SOURCES = \
2729         src/escape/escape.c
2730
2731 systemd_escape_LDADD = \
2732         libsystemd-shared.la
2733
2734 # -----------------------------------------------------------------------------
2735 systemctl_SOURCES = \
2736         src/systemctl/systemctl.c
2737
2738 systemctl_LDADD = \
2739         libsystemd-units.la \
2740         libsystemd-label.la \
2741         libsystemd-internal.la \
2742         libsystemd-logs.la \
2743         libsystemd-journal-internal.la \
2744         libsystemd-shared.la
2745
2746 # ------------------------------------------------------------------------------
2747 systemd_notify_SOURCES = \
2748         src/notify/notify.c
2749
2750 systemd_notify_LDADD = \
2751         libsystemd-internal.la \
2752         libsystemd-shared.la
2753
2754 # ------------------------------------------------------------------------------
2755 systemd_path_SOURCES = \
2756         src/path/path.c
2757
2758 systemd_path_LDADD = \
2759         libsystemd-internal.la \
2760         libsystemd-shared.la
2761
2762 # ------------------------------------------------------------------------------
2763 systemd_ask_password_SOURCES = \
2764         src/ask-password/ask-password.c
2765
2766 systemd_ask_password_LDADD = \
2767         libsystemd-label.la \
2768         libsystemd-shared.la
2769
2770 # ------------------------------------------------------------------------------
2771 systemd_reply_password_SOURCES = \
2772         src/reply-password/reply-password.c
2773
2774 systemd_reply_password_LDADD = \
2775         libsystemd-shared.la
2776
2777 # ------------------------------------------------------------------------------
2778 systemd_cgls_SOURCES = \
2779         src/cgls/cgls.c
2780
2781 systemd_cgls_LDADD = \
2782         libsystemd-internal.la \
2783         libsystemd-shared.la
2784
2785 # ------------------------------------------------------------------------------
2786 systemd_cgtop_SOURCES = \
2787         src/cgtop/cgtop.c
2788
2789 systemd_cgtop_LDADD = \
2790         libsystemd-shared.la
2791
2792 # ------------------------------------------------------------------------------
2793 systemd_nspawn_SOURCES = \
2794         src/nspawn/nspawn.c \
2795         src/core/mount-setup.c \
2796         src/core/mount-setup.h \
2797         src/core/loopback-setup.c \
2798         src/core/loopback-setup.h
2799
2800 systemd_nspawn_CFLAGS = \
2801         $(AM_CFLAGS) \
2802         $(SECCOMP_CFLAGS) \
2803         $(BLKID_CFLAGS)
2804
2805 systemd_nspawn_LDADD = \
2806         libsystemd-label.la \
2807         libsystemd-internal.la \
2808         libudev-internal.la \
2809         libsystemd-shared.la \
2810         $(BLKID_LIBS)
2811
2812 if HAVE_SECCOMP
2813 systemd_nspawn_LDADD += \
2814         libsystemd-seccomp.la \
2815         $(SECCOMP_LIBS)
2816 endif
2817
2818 if HAVE_LIBIPTC
2819 systemd_nspawn_LDADD += \
2820         libsystemd-fw.la
2821 endif
2822
2823 # ------------------------------------------------------------------------------
2824 systemd_run_SOURCES = \
2825         src/run/run.c
2826
2827 systemd_run_LDADD = \
2828         libsystemd-label.la \
2829         libsystemd-internal.la \
2830         libsystemd-shared.la
2831
2832 # ------------------------------------------------------------------------------
2833 noinst_LTLIBRARIES += \
2834         libsystemd-proxy.la
2835
2836 libsystemd_proxy_la_SOURCES = \
2837         src/bus-proxyd/bus-xml-policy.c \
2838         src/bus-proxyd/bus-xml-policy.h \
2839         src/bus-proxyd/driver.c \
2840         src/bus-proxyd/driver.h \
2841         src/bus-proxyd/proxy.c \
2842         src/bus-proxyd/proxy.h \
2843         src/bus-proxyd/synthesize.c \
2844         src/bus-proxyd/synthesize.h
2845
2846 libsystemd_proxy_la_CFLAGS = \
2847         $(AM_CFLAGS) \
2848         -pthread
2849
2850 libsystemd_proxy_la_LIBADD = \
2851         libsystemd-internal.la \
2852         libsystemd-shared.la
2853
2854 systemd_bus_proxyd_SOURCES = \
2855         src/bus-proxyd/bus-proxyd.c
2856
2857 systemd_bus_proxyd_CFLAGS = \
2858         $(AM_CFLAGS) \
2859         -pthread
2860
2861 systemd_bus_proxyd_LDADD = \
2862         libsystemd-proxy.la \
2863         libsystemd-internal.la \
2864         libsystemd-shared.la
2865
2866 systemd_stdio_bridge_SOURCES = \
2867         src/bus-proxyd/stdio-bridge.c
2868
2869 systemd_stdio_bridge_LDADD = \
2870         libsystemd-proxy.la \
2871         libsystemd-internal.la \
2872         libsystemd-shared.la
2873
2874 if ENABLE_KDBUS
2875 nodist_systemunit_DATA += \
2876         units/systemd-bus-proxyd.service
2877
2878 dist_systemunit_DATA += \
2879         units/systemd-bus-proxyd.socket
2880
2881 nodist_userunit_DATA += \
2882         units/user/systemd-bus-proxyd.service
2883
2884 dist_userunit_DATA += \
2885         units/user/systemd-bus-proxyd.socket
2886 endif
2887
2888 EXTRA_DIST += \
2889         units/systemd-bus-proxyd.service.m4.in \
2890         units/user/systemd-bus-proxyd.service.in
2891
2892 if HAVE_SMACK
2893 bus-proxyd-set-cap-hook:
2894         -$(SETCAP) cap_mac_admin+ei $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd
2895
2896 INSTALL_EXEC_HOOKS += bus-proxyd-set-cap-hook
2897 endif
2898
2899 # ------------------------------------------------------------------------------
2900 systemd_tty_ask_password_agent_SOURCES = \
2901         src/tty-ask-password-agent/tty-ask-password-agent.c
2902
2903 systemd_tty_ask_password_agent_LDADD = \
2904         libsystemd-label.la \
2905         libsystemd-shared.la
2906
2907 # ------------------------------------------------------------------------------
2908 libsystemd_internal_la_SOURCES = \
2909         src/systemd/sd-bus.h \
2910         src/systemd/sd-bus-protocol.h \
2911         src/systemd/sd-bus-vtable.h \
2912         src/systemd/sd-utf8.h \
2913         src/systemd/sd-event.h \
2914         src/systemd/sd-rtnl.h \
2915         src/systemd/sd-resolve.h \
2916         src/systemd/sd-login.h \
2917         src/systemd/sd-id128.h \
2918         src/systemd/sd-daemon.h \
2919         src/systemd/sd-path.h \
2920         src/systemd/sd-network.h \
2921         src/systemd/sd-hwdb.h \
2922         src/systemd/sd-device.h \
2923         src/libsystemd/sd-bus/sd-bus.c \
2924         src/libsystemd/sd-bus/bus-control.c \
2925         src/libsystemd/sd-bus/bus-control.h \
2926         src/libsystemd/sd-bus/bus-error.c \
2927         src/libsystemd/sd-bus/bus-error.h \
2928         src/libsystemd/sd-bus/bus-common-errors.h \
2929         src/libsystemd/sd-bus/bus-common-errors.c \
2930         src/libsystemd/sd-bus/bus-internal.c \
2931         src/libsystemd/sd-bus/bus-internal.h \
2932         src/libsystemd/sd-bus/bus-socket.c \
2933         src/libsystemd/sd-bus/bus-socket.h \
2934         src/libsystemd/sd-bus/bus-kernel.c \
2935         src/libsystemd/sd-bus/bus-kernel.h \
2936         src/libsystemd/sd-bus/bus-container.c \
2937         src/libsystemd/sd-bus/bus-container.h \
2938         src/libsystemd/sd-bus/bus-message.c \
2939         src/libsystemd/sd-bus/bus-message.h \
2940         src/libsystemd/sd-bus/bus-creds.c \
2941         src/libsystemd/sd-bus/bus-creds.h \
2942         src/libsystemd/sd-bus/bus-signature.c \
2943         src/libsystemd/sd-bus/bus-signature.h \
2944         src/libsystemd/sd-bus/bus-type.c \
2945         src/libsystemd/sd-bus/bus-type.h \
2946         src/libsystemd/sd-bus/bus-match.c \
2947         src/libsystemd/sd-bus/bus-match.h \
2948         src/libsystemd/sd-bus/bus-bloom.c \
2949         src/libsystemd/sd-bus/bus-bloom.h \
2950         src/libsystemd/sd-bus/bus-introspect.c \
2951         src/libsystemd/sd-bus/bus-introspect.h \
2952         src/libsystemd/sd-bus/bus-objects.c \
2953         src/libsystemd/sd-bus/bus-objects.h \
2954         src/libsystemd/sd-bus/bus-gvariant.c \
2955         src/libsystemd/sd-bus/bus-gvariant.h \
2956         src/libsystemd/sd-bus/bus-convenience.c \
2957         src/libsystemd/sd-bus/bus-track.c \
2958         src/libsystemd/sd-bus/bus-track.h \
2959         src/libsystemd/sd-bus/bus-util.c \
2960         src/libsystemd/sd-bus/bus-util.h \
2961         src/libsystemd/sd-bus/bus-slot.c \
2962         src/libsystemd/sd-bus/bus-slot.h \
2963         src/libsystemd/sd-bus/bus-protocol.h \
2964         src/libsystemd/sd-bus/kdbus.h \
2965         src/libsystemd/sd-utf8/sd-utf8.c \
2966         src/libsystemd/sd-event/sd-event.c \
2967         src/libsystemd/sd-event/event-util.h \
2968         src/libsystemd/sd-rtnl/sd-rtnl.c \
2969         src/libsystemd/sd-rtnl/rtnl-internal.h \
2970         src/libsystemd/sd-rtnl/rtnl-message.c \
2971         src/libsystemd/sd-rtnl/rtnl-types.h \
2972         src/libsystemd/sd-rtnl/rtnl-types.c \
2973         src/libsystemd/sd-rtnl/rtnl-util.h \
2974         src/libsystemd/sd-rtnl/rtnl-util.c \
2975         src/libsystemd/sd-rtnl/local-addresses.h \
2976         src/libsystemd/sd-rtnl/local-addresses.c \
2977         src/libsystemd/sd-id128/sd-id128.c \
2978         src/libsystemd/sd-daemon/sd-daemon.c \
2979         src/libsystemd/sd-login/sd-login.c \
2980         src/libsystemd/sd-path/sd-path.c \
2981         src/libsystemd/sd-network/sd-network.c \
2982         src/libsystemd/sd-network/network-util.h \
2983         src/libsystemd/sd-network/network-util.c \
2984         src/libsystemd/sd-hwdb/sd-hwdb.c \
2985         src/libsystemd/sd-hwdb/hwdb-util.h \
2986         src/libsystemd/sd-hwdb/hwdb-intenal.h \
2987         src/libsystemd/sd-device/device-internal.h \
2988         src/libsystemd/sd-device/device-util.h \
2989         src/libsystemd/sd-device/sd-device.c \
2990         src/libsystemd/sd-device/device-private.c \
2991         src/libsystemd/sd-device/device-private.h
2992
2993 nodist_libsystemd_internal_la_SOURCES = \
2994         src/libsystemd/libsystemd.sym
2995
2996 libsystemd_internal_la_CFLAGS = \
2997         $(AM_CFLAGS) \
2998         -pthread
2999
3000 libsystemd_internal_la_LIBADD = \
3001         $(RT_LIBS)
3002
3003 libsystemd_resolve_la_SOURCES = \
3004         src/libsystemd/sd-resolve/sd-resolve.c \
3005         src/libsystemd/sd-resolve/resolve-util.h
3006
3007 libsystemd_resolve_la_CFLAGS = \
3008         $(AM_CFLAGS) \
3009         -pthread
3010
3011 libsystemd_resolve_la_LIBADD = \
3012         -lresolv
3013
3014 noinst_LTLIBRARIES += \
3015         libsystemd-internal.la \
3016         libsystemd-resolve.la
3017
3018 libsystemd_dump_la_SOURCES = \
3019         src/libsystemd/sd-bus/bus-dump.c \
3020         src/libsystemd/sd-bus/bus-dump.h
3021
3022 noinst_LTLIBRARIES += \
3023         libsystemd-dump.la
3024
3025 EXTRA_DIST += \
3026         src/libsystemd/libsystemd.sym.m4 \
3027         src/libsystemd/libsystemd.pc.in \
3028         src/libsystemd/sd-bus/DIFFERENCES \
3029         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
3030
3031 BUILT_SOURCES += \
3032         src/libsystemd/libsystemd.sym
3033
3034 libsystemd_la_SOURCES = \
3035         $(libsystemd_internal_la_SOURCES) \
3036         $(libsystemd_resolve_la_SOURCES) \
3037         $(libsystemd_journal_internal_la_SOURCES)
3038
3039 nodist_libsystemd_la_SOURCES = \
3040         $(nodist_libsystemd_internal_la_SOURCES)
3041
3042 libsystemd_la_CFLAGS = \
3043         $(libsystemd_internal_la_CFLAGS) \
3044         $(libsystemd_resolve_la_CFLAGS) \
3045         $(libsystemd_journal_internal_la_CFLAGS)
3046
3047 libsystemd_la_LDFLAGS = \
3048         $(AM_LDFLAGS) \
3049         -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
3050         -Wl,--version-script=$(top_builddir)/src/libsystemd/libsystemd.sym
3051
3052 libsystemd_la_LIBADD = \
3053         libsystemd-shared.la \
3054         $(libsystemd_internal_la_LIBADD) \
3055         $(libsystemd_journal_internal_la_LIBADD) \
3056         $(libsystemd_resolve_la_LIBADD)
3057
3058 libsystemd-install-hook:
3059         libname=libsystemd.so && $(move-to-rootlibdir)
3060
3061 libsystemd-uninstall-hook:
3062         rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
3063
3064 INSTALL_EXEC_HOOKS += libsystemd-install-hook
3065 UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
3066
3067 pkgconfiglib_DATA += \
3068         src/libsystemd/libsystemd.pc
3069
3070 pkginclude_HEADERS += \
3071         src/systemd/sd-login.h \
3072         src/systemd/sd-id128.h \
3073         src/systemd/sd-daemon.h
3074
3075 if ENABLE_KDBUS
3076 pkginclude_HEADERS += \
3077         src/systemd/sd-bus.h \
3078         src/systemd/sd-bus-protocol.h \
3079         src/systemd/sd-bus-vtable.h \
3080         src/systemd/sd-utf8.h \
3081         src/systemd/sd-event.h \
3082         src/systemd/sd-rtnl.h \
3083         src/systemd/sd-resolve.h \
3084         src/systemd/sd-path.h
3085 endif
3086
3087 lib_LTLIBRARIES += \
3088         libsystemd.la
3089
3090 tests += \
3091         test-bus-marshal \
3092         test-bus-signature \
3093         test-bus-chat \
3094         test-bus-cleanup \
3095         test-bus-server \
3096         test-bus-match \
3097         test-bus-kernel \
3098         test-bus-kernel-bloom \
3099         test-bus-kernel-benchmark \
3100         test-bus-zero-copy \
3101         test-bus-introspect \
3102         test-bus-objects \
3103         test-bus-error \
3104         test-bus-creds \
3105         test-bus-gvariant \
3106         test-event \
3107         test-rtnl \
3108         test-local-addresses \
3109         test-resolve
3110
3111 bin_PROGRAMS += \
3112         busctl
3113
3114 test_bus_marshal_SOURCES = \
3115         src/libsystemd/sd-bus/test-bus-marshal.c
3116
3117 test_bus_marshal_LDADD = \
3118         libsystemd-dump.la \
3119         libsystemd-internal.la \
3120         libsystemd-shared.la \
3121         $(GLIB_LIBS) \
3122         $(DBUS_LIBS)
3123
3124 test_bus_marshal_CFLAGS = \
3125         $(AM_CFLAGS) \
3126         $(GLIB_CFLAGS) \
3127         $(DBUS_CFLAGS)
3128
3129 test_bus_signature_SOURCES = \
3130         src/libsystemd/sd-bus/test-bus-signature.c
3131
3132 test_bus_signature_LDADD = \
3133         libsystemd-internal.la \
3134         libsystemd-shared.la
3135
3136 test_bus_chat_SOURCES = \
3137         src/libsystemd/sd-bus/test-bus-chat.c
3138
3139 test_bus_chat_CFLAGS = \
3140         $(AM_CFLAGS) \
3141         -pthread
3142
3143 test_bus_chat_LDADD = \
3144         libsystemd-internal.la \
3145         libsystemd-shared.la
3146
3147 test_bus_cleanup_SOURCES = \
3148         src/libsystemd/sd-bus/test-bus-cleanup.c
3149
3150 test_bus_cleanup_CFLAGS = \
3151         $(AM_CFLAGS) \
3152         $(SECCOMP_CFLAGS)
3153
3154 test_bus_cleanup_LDADD = \
3155         libsystemd-internal.la \
3156         libsystemd-shared.la
3157
3158 test_bus_server_SOURCES = \
3159         src/libsystemd/sd-bus/test-bus-server.c
3160
3161 test_bus_server_CFLAGS = \
3162         $(AM_CFLAGS) \
3163         -pthread
3164
3165 test_bus_server_LDADD = \
3166         libsystemd-internal.la \
3167         libsystemd-shared.la
3168
3169 test_bus_objects_SOURCES = \
3170         src/libsystemd/sd-bus/test-bus-objects.c
3171
3172 test_bus_objects_CFLAGS = \
3173         $(AM_CFLAGS) \
3174         -pthread
3175
3176 test_bus_objects_LDADD = \
3177         libsystemd-dump.la \
3178         libsystemd-internal.la \
3179         libsystemd-shared.la
3180
3181 test_bus_error_SOURCES = \
3182         src/libsystemd/sd-bus/test-bus-error.c
3183
3184 test_bus_error_LDADD = \
3185         libsystemd-internal.la \
3186         libsystemd-shared.la
3187
3188 test_bus_gvariant_SOURCES = \
3189         src/libsystemd/sd-bus/test-bus-gvariant.c
3190
3191 test_bus_gvariant_LDADD = \
3192         libsystemd-dump.la \
3193         libsystemd-internal.la \
3194         libsystemd-shared.la \
3195         $(GLIB_LIBS)
3196
3197 test_bus_gvariant_CFLAGS = \
3198         $(AM_CFLAGS) \
3199         $(GLIB_CFLAGS)
3200
3201 test_bus_creds_SOURCES = \
3202         src/libsystemd/sd-bus/test-bus-creds.c
3203
3204 test_bus_creds_LDADD = \
3205         libsystemd-dump.la \
3206         libsystemd-internal.la \
3207         libsystemd-shared.la
3208
3209 test_bus_match_SOURCES = \
3210         src/libsystemd/sd-bus/test-bus-match.c
3211
3212 test_bus_match_LDADD = \
3213         libsystemd-internal.la \
3214         libsystemd-shared.la
3215
3216 test_bus_kernel_SOURCES = \
3217         src/libsystemd/sd-bus/test-bus-kernel.c
3218
3219 test_bus_kernel_LDADD = \
3220         libsystemd-dump.la \
3221         libsystemd-internal.la \
3222         libsystemd-shared.la
3223
3224 test_bus_kernel_bloom_SOURCES = \
3225         src/libsystemd/sd-bus/test-bus-kernel-bloom.c
3226
3227 test_bus_kernel_bloom_LDADD = \
3228         libsystemd-internal.la \
3229         libsystemd-shared.la
3230
3231 test_bus_kernel_benchmark_SOURCES = \
3232         src/libsystemd/sd-bus/test-bus-kernel-benchmark.c
3233
3234 test_bus_kernel_benchmark_LDADD = \
3235         libsystemd-internal.la \
3236         libsystemd-shared.la
3237
3238 test_bus_zero_copy_SOURCES = \
3239         src/libsystemd/sd-bus/test-bus-zero-copy.c
3240
3241 test_bus_zero_copy_LDADD = \
3242         libsystemd-dump.la \
3243         libsystemd-internal.la \
3244         libsystemd-shared.la
3245
3246 test_bus_introspect_SOURCES = \
3247         src/libsystemd/sd-bus/test-bus-introspect.c
3248
3249 test_bus_introspect_LDADD = \
3250         libsystemd-internal.la \
3251         libsystemd-shared.la
3252
3253 test_event_SOURCES = \
3254         src/libsystemd/sd-event/test-event.c
3255
3256 test_event_LDADD = \
3257         libsystemd-internal.la \
3258         libsystemd-shared.la
3259
3260 test_rtnl_SOURCES = \
3261         src/libsystemd/sd-rtnl/test-rtnl.c
3262
3263 test_rtnl_LDADD = \
3264         libsystemd-internal.la \
3265         libsystemd-shared.la
3266
3267 test_local_addresses_SOURCES = \
3268         src/libsystemd/sd-rtnl/test-local-addresses.c
3269
3270 test_local_addresses_LDADD = \
3271         libsystemd-internal.la \
3272         libsystemd-shared.la
3273
3274 test_resolve_SOURCES = \
3275         src/libsystemd/sd-resolve/test-resolve.c
3276
3277 test_resolve_LDADD = \
3278         libsystemd-resolve.la \
3279         libsystemd-internal.la \
3280         libsystemd-shared.la
3281
3282 test_resolve_CFLAGS = \
3283         $(AM_CFLAGS) \
3284         -pthread
3285
3286 busctl_SOURCES = \
3287         src/libsystemd/sd-bus/busctl.c \
3288         src/libsystemd/sd-bus/busctl-introspect.c \
3289         src/libsystemd/sd-bus/busctl-introspect.h
3290
3291 busctl_LDADD = \
3292         libsystemd-dump.la \
3293         libsystemd-internal.la \
3294         libsystemd-shared.la
3295
3296 # ------------------------------------------------------------------------------
3297 noinst_LTLIBRARIES += \
3298         libsystemd-network.la
3299
3300 libsystemd_network_la_CFLAGS = \
3301         $(AM_CFLAGS) \
3302         $(KMOD_CFLAGS)
3303
3304 libsystemd_network_la_SOURCES = \
3305         src/systemd/sd-dhcp-client.h \
3306         src/systemd/sd-dhcp-server.h \
3307         src/systemd/sd-dhcp-lease.h \
3308         src/systemd/sd-ipv4ll.h \
3309         src/systemd/sd-icmp6-nd.h \
3310         src/systemd/sd-dhcp6-client.h \
3311         src/systemd/sd-dhcp6-lease.h \
3312         src/systemd/sd-pppoe.h \
3313         src/systemd/sd-lldp.h \
3314         src/libsystemd-network/sd-dhcp-client.c \
3315         src/libsystemd-network/sd-dhcp-server.c \
3316         src/libsystemd-network/dhcp-network.c \
3317         src/libsystemd-network/dhcp-option.c \
3318         src/libsystemd-network/dhcp-packet.c \
3319         src/libsystemd-network/dhcp-internal.h \
3320         src/libsystemd-network/dhcp-server-internal.h \
3321         src/libsystemd-network/dhcp-protocol.h \
3322         src/libsystemd-network/dhcp-lease-internal.h \
3323         src/libsystemd-network/sd-dhcp-lease.c \
3324         src/libsystemd-network/sd-ipv4ll.c \
3325         src/libsystemd-network/ipv4ll-network.c \
3326         src/libsystemd-network/ipv4ll-packet.c \
3327         src/libsystemd-network/ipv4ll-internal.h \
3328         src/libsystemd-network/sd-pppoe.c \
3329         src/libsystemd-network/network-internal.c \
3330         src/libsystemd-network/network-internal.h \
3331         src/libsystemd-network/sd-icmp6-nd.c \
3332         src/libsystemd-network/sd-dhcp6-client.c \
3333         src/libsystemd-network/dhcp6-internal.h \
3334         src/libsystemd-network/dhcp6-protocol.h \
3335         src/libsystemd-network/dhcp6-network.c \
3336         src/libsystemd-network/dhcp6-option.c \
3337         src/libsystemd-network/dhcp6-lease-internal.h \
3338         src/libsystemd-network/sd-dhcp6-lease.c \
3339         src/libsystemd-network/dhcp-identifier.h \
3340         src/libsystemd-network/dhcp-identifier.c \
3341         src/libsystemd-network/lldp.h \
3342         src/libsystemd-network/lldp-tlv.h \
3343         src/libsystemd-network/lldp-tlv.c \
3344         src/libsystemd-network/lldp-network.h \
3345         src/libsystemd-network/lldp-network.c \
3346         src/libsystemd-network/lldp-port.h \
3347         src/libsystemd-network/lldp-port.c \
3348         src/libsystemd-network/lldp-internal.h \
3349         src/libsystemd-network/lldp-internal.c \
3350         src/libsystemd-network/lldp-util.h \
3351         src/libsystemd-network/sd-lldp.c
3352
3353 libsystemd_network_la_LIBADD = \
3354         libudev-internal.la \
3355         libsystemd-label.la \
3356         libsystemd-internal.la \
3357         libsystemd-shared.la \
3358         $(KMOD_LIBS)
3359
3360 test_dhcp_option_SOURCES = \
3361         src/libsystemd-network/dhcp-protocol.h \
3362         src/libsystemd-network/dhcp-internal.h \
3363         src/libsystemd-network/test-dhcp-option.c
3364
3365 test_dhcp_option_LDADD = \
3366         libsystemd-network.la \
3367         libsystemd-internal.la \
3368         libsystemd-shared.la
3369
3370 test_dhcp_client_SOURCES = \
3371         src/systemd/sd-dhcp-client.h \
3372         src/libsystemd-network/dhcp-protocol.h \
3373         src/libsystemd-network/dhcp-internal.h \
3374         src/libsystemd-network/test-dhcp-client.c
3375
3376 test_dhcp_client_LDADD = \
3377         libsystemd-network.la \
3378         libsystemd-label.la \
3379         libsystemd-internal.la \
3380         libsystemd-shared.la
3381
3382 test_dhcp_server_SOURCES = \
3383         src/libsystemd-network/test-dhcp-server.c
3384
3385 test_dhcp_server_LDADD = \
3386         libsystemd-network.la \
3387         libsystemd-internal.la \
3388         libsystemd-shared.la
3389
3390 test_ipv4ll_SOURCES = \
3391         src/systemd/sd-ipv4ll.h \
3392         src/libsystemd-network/ipv4ll-internal.h \
3393         src/libsystemd-network/test-ipv4ll.c
3394
3395 test_ipv4ll_LDADD = \
3396         libsystemd-network.la \
3397         libsystemd-label.la \
3398         libsystemd-internal.la \
3399         libsystemd-shared.la
3400
3401 test_pppoe_SOURCES = \
3402         src/systemd/sd-pppoe.h \
3403         src/libsystemd-network/test-pppoe.c
3404
3405 test_pppoe_LDADD = \
3406         libsystemd-network.la \
3407         libsystemd-shared.la
3408
3409 test_icmp6_rs_SOURCES = \
3410         src/systemd/sd-dhcp6-client.h \
3411         src/systemd/sd-icmp6-nd.h \
3412         src/libsystemd-network/dhcp6-internal.h \
3413         src/libsystemd-network/test-icmp6-rs.c \
3414         src/libsystemd-network/dhcp-identifier.h \
3415         src/libsystemd-network/dhcp-identifier.c
3416
3417 test_icmp6_rs_LDADD = \
3418         libsystemd-network.la \
3419         libsystemd-internal.la \
3420         libsystemd-shared.la
3421
3422 test_dhcp6_client_SOURCES = \
3423         src/systemd/sd-dhcp6-client.h \
3424         src/libsystemd-network/dhcp6-internal.h \
3425         src/libsystemd-network/test-dhcp6-client.c \
3426         src/libsystemd-network/dhcp-identifier.h \
3427         src/libsystemd-network/dhcp-identifier.c
3428
3429 test_dhcp6_client_LDADD = \
3430         libsystemd-network.la \
3431         libsystemd-internal.la \
3432         libsystemd-shared.la
3433
3434 test_lldp_SOURCES = \
3435        src/libsystemd-network/lldp.h \
3436        src/libsystemd-network/lldp-tlv.h \
3437        src/libsystemd-network/lldp-tlv.c \
3438        src/libsystemd-network/test-lldp.c
3439
3440 test_lldp_LDADD = \
3441         libsystemd-network.la \
3442         libsystemd-internal.la \
3443         libsystemd-shared.la
3444
3445 tests += \
3446         test-dhcp-option \
3447         test-dhcp-client \
3448         test-dhcp-server \
3449         test-ipv4ll \
3450         test-icmp6-rs \
3451         test-dhcp6-client \
3452         test-lldp
3453
3454 manual_tests += \
3455         test-pppoe
3456
3457 # ------------------------------------------------------------------------------
3458 if ENABLE_TERMINAL
3459 noinst_LTLIBRARIES += \
3460         libsystemd-terminal.la
3461
3462 rootlibexec_PROGRAMS += \
3463         systemd-consoled
3464
3465 noinst_PROGRAMS += \
3466         systemd-evcat \
3467         systemd-modeset \
3468         systemd-subterm
3469
3470 dist_pkgdata_DATA += \
3471        src/libsystemd-terminal/unifont-glyph-array.bin
3472
3473 nodist_userunit_DATA += \
3474         units/user/systemd-consoled.service
3475
3476 USER_DEFAULT_TARGET_WANTS += \
3477         systemd-consoled.service
3478
3479 tests += \
3480         test-term-page \
3481         test-term-parser \
3482         test-unifont
3483 endif
3484
3485 EXTRA_DIST += \
3486         units/user/systemd-consoled.service.in
3487
3488 libsystemd_terminal_la_CFLAGS = \
3489         $(AM_CFLAGS) \
3490         $(TERMINAL_CFLAGS)
3491
3492 libsystemd_terminal_la_SOURCES = \
3493         src/libsystemd-terminal/grdev.h \
3494         src/libsystemd-terminal/grdev-internal.h \
3495         src/libsystemd-terminal/grdev.c \
3496         src/libsystemd-terminal/grdev-drm.c \
3497         src/libsystemd-terminal/idev.h \
3498         src/libsystemd-terminal/idev-internal.h \
3499         src/libsystemd-terminal/idev.c \
3500         src/libsystemd-terminal/idev-evdev.c \
3501         src/libsystemd-terminal/idev-keyboard.c \
3502         src/libsystemd-terminal/sysview.h \
3503         src/libsystemd-terminal/sysview-internal.h \
3504         src/libsystemd-terminal/sysview.c \
3505         src/libsystemd-terminal/term.h \
3506         src/libsystemd-terminal/term-internal.h \
3507         src/libsystemd-terminal/term-charset.c \
3508         src/libsystemd-terminal/term-page.c \
3509         src/libsystemd-terminal/term-parser.c \
3510         src/libsystemd-terminal/term-screen.c \
3511         src/libsystemd-terminal/term-wcwidth.c \
3512         src/libsystemd-terminal/unifont.h \
3513         src/libsystemd-terminal/unifont-def.h \
3514         src/libsystemd-terminal/unifont.c
3515
3516 libsystemd_terminal_la_LIBADD = \
3517         libudev-internal.la \
3518         libsystemd-internal.la \
3519         libsystemd-shared.la \
3520         $(TERMINAL_LIBS)
3521
3522 systemd_consoled_CFLAGS = \
3523         $(AM_CFLAGS) \
3524         $(TERMINAL_CFLAGS)
3525
3526 systemd_consoled_SOURCES = \
3527         src/console/consoled.h \
3528         src/console/consoled.c \
3529         src/console/consoled-display.c \
3530         src/console/consoled-manager.c \
3531         src/console/consoled-session.c \
3532         src/console/consoled-terminal.c \
3533         src/console/consoled-workspace.c
3534
3535 systemd_consoled_LDADD = \
3536         libsystemd-terminal.la \
3537         libsystemd-internal.la \
3538         libsystemd-shared.la \
3539         $(TERMINAL_LIBS)
3540
3541 systemd_evcat_CFLAGS = \
3542         $(AM_CFLAGS) \
3543         $(TERMINAL_CFLAGS)
3544
3545 systemd_evcat_SOURCES = \
3546         src/libsystemd-terminal/evcat.c
3547
3548 systemd_evcat_LDADD = \
3549         libsystemd-terminal.la \
3550         libsystemd-internal.la \
3551         libsystemd-shared.la \
3552         $(TERMINAL_LIBS)
3553
3554 systemd_modeset_CFLAGS = \
3555         $(AM_CFLAGS) \
3556         $(TERMINAL_CFLAGS)
3557
3558 systemd_modeset_SOURCES = \
3559         src/libsystemd-terminal/modeset.c
3560
3561 systemd_modeset_LDADD = \
3562         libsystemd-terminal.la \
3563         libsystemd-internal.la \
3564         libsystemd-shared.la \
3565         $(TERMINAL_LIBS)
3566
3567 systemd_subterm_SOURCES = \
3568         src/libsystemd-terminal/subterm.c
3569
3570 systemd_subterm_LDADD = \
3571         libsystemd-terminal.la \
3572         libsystemd-internal.la \
3573         libsystemd-shared.la
3574
3575 test_term_page_SOURCES = \
3576         src/libsystemd-terminal/test-term-page.c
3577
3578 test_term_page_LDADD = \
3579         libsystemd-terminal.la \
3580         libsystemd-internal.la \
3581         libsystemd-shared.la
3582
3583 test_term_parser_SOURCES = \
3584         src/libsystemd-terminal/test-term-parser.c
3585
3586 test_term_parser_LDADD = \
3587         libsystemd-terminal.la \
3588         libsystemd-internal.la \
3589         libsystemd-shared.la
3590
3591 test_unifont_SOURCES = \
3592         src/libsystemd-terminal/test-unifont.c
3593
3594 test_unifont_LDADD = \
3595         libsystemd-terminal.la \
3596         libsystemd-internal.la \
3597         libsystemd-shared.la
3598
3599 src/libsystemd-terminal/unifont-glyph-array.bin: tools/compile-unifont.py $(UNIFONT)
3600         $(AM_V_GEN)$(PYTHON) $< <$(UNIFONT) >$@
3601
3602 # ------------------------------------------------------------------------------
3603 if ENABLE_GTK_DOC
3604 SUBDIRS += \
3605         docs/libudev
3606
3607 noinst_DATA += \
3608         docs/html/libudev \
3609         docs/html/gudev
3610 endif
3611
3612 include_HEADERS += \
3613         src/libudev/libudev.h
3614
3615 lib_LTLIBRARIES += \
3616         libudev.la
3617
3618 libudev_la_SOURCES =\
3619         src/libudev/libudev.sym \
3620         src/libudev/libudev-private.h \
3621         src/libudev/libudev.c \
3622         src/libudev/libudev-list.c \
3623         src/libudev/libudev-util.c \
3624         src/libudev/libudev-device.c \
3625         src/libudev/libudev-enumerate.c \
3626         src/libudev/libudev-monitor.c \
3627         src/libudev/libudev-queue.c \
3628         src/libudev/libudev-hwdb.c
3629
3630 libudev_la_CFLAGS = \
3631         $(AM_CFLAGS) \
3632         -fvisibility=hidden
3633
3634 libudev_la_LDFLAGS = \
3635         $(AM_LDFLAGS) \
3636         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
3637         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
3638
3639 libudev_la_LIBADD = \
3640         libsystemd-internal.la \
3641         libsystemd-shared.la
3642
3643 pkgconfiglib_DATA += \
3644         src/libudev/libudev.pc
3645
3646 EXTRA_DIST += \
3647         src/libudev/libudev.pc.in
3648
3649 CLEANFILES += \
3650         docs/html/libudev \
3651         docs/html/gudev
3652
3653 docs/html/libudev:
3654         $(AM_V_at)$(MKDIR_P) $(dir $@)
3655         $(AM_V_LN)$(LN_S) -f ../libudev/html $@
3656
3657 docs/html/gudev:
3658         $(AM_V_at)$(MKDIR_P) $(dir $@)
3659         $(AM_V_LN)$(LN_S) -f ../gudev/html $@
3660
3661 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
3662 libudev-install-hook:
3663         libname=libudev.so && $(move-to-rootlibdir)
3664
3665 libudev-uninstall-hook:
3666         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
3667
3668 INSTALL_EXEC_HOOKS += libudev-install-hook
3669 UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
3670
3671 # ------------------------------------------------------------------------------
3672 noinst_LTLIBRARIES += \
3673         libudev-internal.la
3674
3675 libudev_internal_la_SOURCES =\
3676         $(libudev_la_SOURCES) \
3677         src/libudev/libudev-device-private.c
3678
3679 libudev_internal_la_CFLAGS = \
3680         $(AM_CFLAGS) \
3681         -fvisibility=default
3682
3683 # ------------------------------------------------------------------------------
3684 INSTALL_DIRS += \
3685         $(sysconfdir)/udev/rules.d
3686
3687 dist_network_DATA = \
3688         network/99-default.link \
3689         network/80-container-host0.network \
3690         network/80-container-ve.network
3691
3692 dist_udevrules_DATA += \
3693         rules/42-usb-hid-pm.rules \
3694         rules/50-udev-default.rules \
3695         rules/60-block.rules \
3696         rules/60-drm.rules \
3697         rules/60-keyboard.rules \
3698         rules/60-persistent-storage-tape.rules \
3699         rules/60-persistent-input.rules \
3700         rules/60-persistent-alsa.rules \
3701         rules/60-persistent-storage.rules \
3702         rules/60-serial.rules \
3703         rules/64-btrfs.rules \
3704         rules/70-mouse.rules \
3705         rules/70-touchpad.rules \
3706         rules/75-net-description.rules \
3707         rules/78-sound-card.rules \
3708         rules/80-net-setup-link.rules
3709
3710 nodist_udevrules_DATA += \
3711         rules/99-systemd.rules
3712
3713 udevconfdir = $(sysconfdir)/udev
3714 dist_udevconf_DATA = \
3715         src/udev/udev.conf
3716
3717 sharepkgconfigdir = $(datadir)/pkgconfig
3718 sharepkgconfig_DATA = \
3719         src/udev/udev.pc
3720
3721 EXTRA_DIST += \
3722         rules/99-systemd.rules.in \
3723         src/udev/udev.pc.in
3724
3725 EXTRA_DIST += \
3726         units/systemd-udevd.service.in \
3727         units/systemd-udev-trigger.service.in \
3728         units/systemd-udev-settle.service.in
3729
3730 SOCKETS_TARGET_WANTS += \
3731         systemd-udevd-control.socket \
3732         systemd-udevd-kernel.socket
3733
3734 SYSINIT_TARGET_WANTS += \
3735         systemd-udevd.service \
3736         systemd-udev-trigger.service
3737
3738 rootbin_PROGRAMS += \
3739         udevadm
3740
3741 rootlibexec_PROGRAMS += \
3742         systemd-udevd
3743
3744 noinst_LTLIBRARIES += \
3745         libudev-core.la
3746
3747 src/udev/keyboard-keys-list.txt:
3748         $(AM_V_at)$(MKDIR_P) $(dir $@)
3749         $(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/' > $@
3750
3751 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys-list.txt
3752         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
3753
3754 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
3755         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
3756
3757 src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys-list.txt
3758         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
3759
3760 gperf_txt_sources += \
3761         src/udev/keyboard-keys-list.txt
3762
3763 libudev_core_la_SOURCES = \
3764         src/udev/udev.h \
3765         src/udev/udev-event.c \
3766         src/udev/udev-watch.c \
3767         src/udev/udev-node.c \
3768         src/udev/udev-rules.c \
3769         src/udev/udev-ctrl.c \
3770         src/udev/udev-builtin.c \
3771         src/udev/udev-builtin-btrfs.c \
3772         src/udev/udev-builtin-hwdb.c \
3773         src/udev/udev-builtin-input_id.c \
3774         src/udev/udev-builtin-keyboard.c \
3775         src/udev/udev-builtin-net_id.c \
3776         src/udev/udev-builtin-net_setup_link.c \
3777         src/udev/udev-builtin-path_id.c \
3778         src/udev/udev-builtin-usb_id.c \
3779         src/udev/net/link-config.h \
3780         src/udev/net/link-config.c \
3781         src/udev/net/ethtool-util.h \
3782         src/udev/net/ethtool-util.c
3783
3784 nodist_libudev_core_la_SOURCES = \
3785         src/udev/keyboard-keys-from-name.h \
3786         src/udev/keyboard-keys-to-name.h \
3787         src/udev/net/link-config-gperf.c
3788
3789 gperf_gperf_sources = \
3790         src/udev/net/link-config-gperf.gperf
3791
3792 libudev_core_la_CFLAGS = \
3793         $(AM_CFLAGS) \
3794         $(BLKID_CFLAGS) \
3795         $(KMOD_CFLAGS)
3796
3797 libudev_core_la_LIBADD = \
3798         libudev-internal.la \
3799         libsystemd-label.la \
3800         libsystemd-internal.la \
3801         libsystemd-network.la \
3802         libsystemd-shared.la \
3803         $(BLKID_LIBS) \
3804         $(KMOD_LIBS)
3805
3806 if HAVE_KMOD
3807 libudev_core_la_SOURCES += \
3808         src/udev/udev-builtin-kmod.c
3809
3810 dist_udevrules_DATA += \
3811         rules/80-drivers.rules
3812 endif
3813
3814 if HAVE_BLKID
3815 libudev_core_la_SOURCES += \
3816         src/udev/udev-builtin-blkid.c
3817 endif
3818
3819 if HAVE_ACL
3820 libudev_core_la_SOURCES += \
3821         src/udev/udev-builtin-uaccess.c \
3822         src/login/logind-acl.c \
3823         src/libsystemd/sd-login/sd-login.c \
3824         src/systemd/sd-login.h
3825
3826 libudev_core_la_LIBADD += \
3827         libsystemd-acl.la
3828 endif
3829
3830 systemd_udevd_SOURCES = \
3831         src/udev/udevd.c
3832
3833 systemd_udevd_LDADD = \
3834         libudev-core.la
3835
3836 udevadm_SOURCES = \
3837         src/udev/udevadm.c \
3838         src/udev/udevadm-info.c \
3839         src/udev/udevadm-control.c \
3840         src/udev/udevadm-monitor.c \
3841         src/udev/udevadm-hwdb.c \
3842         src/udev/udevadm-settle.c \
3843         src/udev/udevadm-trigger.c \
3844         src/udev/udevadm-test.c \
3845         src/udev/udevadm-test-builtin.c \
3846         src/udev/udevadm-util.c \
3847         src/udev/udevadm-util.h
3848
3849 udevadm_LDADD = \
3850         libudev-core.la
3851
3852 # ------------------------------------------------------------------------------
3853 if ENABLE_HWDB
3854 INSTALL_DIRS += \
3855         $(sysconfdir)/udev/hwdb.d
3856
3857 systemd_hwdb_SOURCES = \
3858         src/libsystemd/sd-hwdb/hwdb-internal.h \
3859         src/hwdb/hwdb.c
3860
3861 systemd_hwdb_LDADD = \
3862         libsystemd-shared.la \
3863         libsystemd-internal.la \
3864         libudev-internal.la
3865
3866 rootbin_PROGRAMS += \
3867         systemd-hwdb
3868
3869 dist_udevhwdb_DATA = \
3870         hwdb/20-pci-vendor-model.hwdb \
3871         hwdb/20-pci-classes.hwdb \
3872         hwdb/20-usb-vendor-model.hwdb \
3873         hwdb/20-usb-classes.hwdb \
3874         hwdb/20-sdio-vendor-model.hwdb \
3875         hwdb/20-sdio-classes.hwdb \
3876         hwdb/20-bluetooth-vendor-product.hwdb \
3877         hwdb/20-acpi-vendor.hwdb \
3878         hwdb/20-OUI.hwdb \
3879         hwdb/20-net-ifname.hwdb \
3880         hwdb/60-keyboard.hwdb \
3881         hwdb/70-mouse.hwdb \
3882         hwdb/70-touchpad.hwdb
3883
3884 EXTRA_DIST += \
3885         units/systemd-hwdb-update.service.in \
3886         hwdb/ids-update.pl \
3887         hwdb/sdio.ids
3888
3889 SYSINIT_TARGET_WANTS += \
3890         systemd-hwdb-update.service
3891
3892 # Update hwdb on installation. Do not bother if installing
3893 # in DESTDIR, since this is likely for packaging purposes.
3894 hwdb-update-hook:
3895         -test -n "$(DESTDIR)" || $(rootbindir)/systemd-hwdb update
3896
3897 INSTALL_DATA_HOOKS += \
3898         hwdb-update-hook
3899
3900 hwdb-remove-hook:
3901         -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
3902 endif
3903
3904 # ------------------------------------------------------------------------------
3905 TESTS += \
3906         test/udev-test.pl \
3907         $(NULL)
3908
3909 if HAVE_PYTHON
3910 TESTS += \
3911         test/rule-syntax-check.py \
3912         $(NULL)
3913
3914 if HAVE_SYSV_COMPAT
3915 TESTS += \
3916         test/sysv-generator-test.py \
3917         $(NULL)
3918 endif
3919 endif
3920
3921 manual_tests += \
3922         test-libudev \
3923         test-udev
3924
3925 test_libudev_SOURCES = \
3926         src/test/test-libudev.c
3927
3928 test_libudev_LDADD = \
3929         libsystemd-label.la \
3930         libudev-internal.la \
3931         libsystemd-shared.la \
3932         libsystemd-internal.la
3933
3934 test_udev_SOURCES = \
3935         src/test/test-udev.c
3936
3937 test_udev_LDADD = \
3938         libudev-core.la  \
3939         $(BLKID_LIBS) \
3940         $(KMOD_LIBS) \
3941         $(SELINUX_LIBS)
3942
3943 if HAVE_ACL
3944 test_udev_LDADD += \
3945         libsystemd-acl.la
3946 endif
3947
3948 check_DATA += \
3949         test/sys
3950
3951 # packed sysfs test tree
3952 test/sys:
3953         $(AM_V_at)$(MKDIR_P) $(dir $@)
3954         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
3955
3956 test-sys-distclean:
3957         -rm -rf test/sys
3958 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
3959
3960 EXTRA_DIST += \
3961         test/sys.tar.xz \
3962         test/udev-test.pl \
3963         test/rule-syntax-check.py \
3964         test/sysv-generator-test.py \
3965         $(NULL)
3966
3967
3968 # ------------------------------------------------------------------------------
3969 ata_id_SOURCES = \
3970         src/udev/ata_id/ata_id.c
3971
3972 ata_id_LDADD = \
3973         libudev-internal.la \
3974         libsystemd-shared.la
3975
3976 udevlibexec_PROGRAMS += \
3977         ata_id
3978
3979 # ------------------------------------------------------------------------------
3980 cdrom_id_SOURCES = \
3981         src/udev/cdrom_id/cdrom_id.c
3982
3983 cdrom_id_LDADD = \
3984         libudev-internal.la \
3985         libsystemd-shared.la
3986
3987 udevlibexec_PROGRAMS += \
3988         cdrom_id
3989
3990 dist_udevrules_DATA += \
3991         rules/60-cdrom_id.rules
3992
3993 # ------------------------------------------------------------------------------
3994 collect_SOURCES = \
3995         src/udev/collect/collect.c
3996
3997 collect_LDADD = \
3998         libudev-internal.la \
3999         libsystemd-shared.la
4000
4001 udevlibexec_PROGRAMS += \
4002         collect
4003
4004 # ------------------------------------------------------------------------------
4005 scsi_id_SOURCES =\
4006         src/udev/scsi_id/scsi_id.c \
4007         src/udev/scsi_id/scsi_serial.c \
4008         src/udev/scsi_id/scsi.h \
4009         src/udev/scsi_id/scsi_id.h
4010
4011 scsi_id_LDADD = \
4012         libudev-internal.la \
4013         libsystemd-shared.la
4014
4015 udevlibexec_PROGRAMS += \
4016         scsi_id
4017
4018 EXTRA_DIST += \
4019         src/udev/scsi_id/README
4020
4021 # ------------------------------------------------------------------------------
4022 v4l_id_SOURCES = \
4023         src/udev/v4l_id/v4l_id.c
4024
4025 v4l_id_LDADD = \
4026         libudev-internal.la \
4027         libsystemd-shared.la
4028
4029 udevlibexec_PROGRAMS += \
4030         v4l_id
4031
4032 dist_udevrules_DATA += \
4033         rules/60-persistent-v4l.rules
4034
4035 # ------------------------------------------------------------------------------
4036 accelerometer_SOURCES = \
4037         src/udev/accelerometer/accelerometer.c
4038
4039 accelerometer_LDADD = \
4040         libudev-internal.la \
4041         libsystemd-shared.la
4042
4043 udevlibexec_PROGRAMS += \
4044         accelerometer
4045
4046 dist_udevrules_DATA += \
4047         rules/61-accelerometer.rules
4048
4049 # ------------------------------------------------------------------------------
4050 if ENABLE_GUDEV
4051 if ENABLE_GTK_DOC
4052 SUBDIRS += \
4053         docs/gudev
4054 endif
4055
4056 libgudev_includedir = \
4057         $(includedir)/gudev-1.0/gudev
4058
4059 libgudev_include_HEADERS = \
4060         src/gudev/gudev.h \
4061         src/gudev/gudevenums.h \
4062         src/gudev/gudevenumtypes.h \
4063         src/gudev/gudevtypes.h \
4064         src/gudev/gudevclient.h \
4065         src/gudev/gudevdevice.h \
4066         src/gudev/gudevenumerator.h
4067
4068 lib_LTLIBRARIES += libgudev-1.0.la
4069
4070 pkgconfiglib_DATA += \
4071         src/gudev/gudev-1.0.pc
4072
4073 libgudev_1_0_la_SOURCES = \
4074         src/gudev/libgudev-1.0.sym \
4075         src/gudev/gudevenums.h \
4076         src/gudev/gudevenumtypes.h \
4077         src/gudev/gudevenumtypes.h\
4078         src/gudev/gudevtypes.h \
4079         src/gudev/gudevclient.h \
4080         src/gudev/gudevclient.c \
4081         src/gudev/gudevdevice.h \
4082         src/gudev/gudevdevice.c \
4083         src/gudev/gudevenumerator.h \
4084         src/gudev/gudevenumerator.c \
4085         src/gudev/gudevprivate.h
4086
4087 nodist_libgudev_1_0_la_SOURCES = \
4088         src/gudev/gudevmarshal.h \
4089         src/gudev/gudevmarshal.c \
4090         src/gudev/gudevenumtypes.h \
4091         src/gudev/gudevenumtypes.c
4092
4093 BUILT_SOURCES += \
4094         $(nodist_libgudev_1_0_la_SOURCES)
4095
4096 libgudev_1_0_la_CPPFLAGS = \
4097         $(AM_CPPFLAGS) \
4098         -I$(top_builddir)/src\
4099         -I$(top_srcdir)/src\
4100         -I$(top_builddir)/src/gudev \
4101         -I$(top_srcdir)/src/gudev \
4102         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
4103         -D_GUDEV_COMPILATION \
4104         -DG_LOG_DOMAIN=\"GUdev\"
4105
4106 libgudev_1_0_la_CFLAGS = \
4107         $(AM_CFLAGS) \
4108         -fvisibility=default \
4109         $(GLIB_CFLAGS)
4110
4111 libgudev_1_0_la_LIBADD = \
4112         libudev.la \
4113         $(GLIB_LIBS)
4114
4115 libgudev_1_0_la_LDFLAGS = \
4116         $(AM_LDFLAGS) \
4117         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
4118         -export-dynamic \
4119         -no-undefined \
4120         -Wl,--version-script=$(top_srcdir)/src/gudev/libgudev-1.0.sym
4121
4122 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
4123         $(AM_V_at)$(MKDIR_P) $(dir $@)
4124         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
4125
4126 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
4127         $(AM_V_at)$(MKDIR_P) $(dir $@)
4128         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
4129         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
4130
4131 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
4132         $(AM_V_at)$(MKDIR_P) $(dir $@)
4133         $(AM_V_GEN)glib-mkenums --template $^ > $@
4134
4135 if HAVE_INTROSPECTION
4136 -include $(INTROSPECTION_MAKEFILE)
4137
4138 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
4139
4140 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
4141
4142 src_gudev_GUdev_1_0_gir_CFLAGS = \
4143         $(AM_CFLAGS) \
4144         $(INCLUDES) \
4145         -D_GUDEV_COMPILATION \
4146         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
4147         -I$(top_srcdir)/src \
4148         -I$(top_builddir)/src \
4149         -I$(top_srcdir)/src/gudev \
4150         -I$(top_builddir)/src/gudev
4151
4152 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
4153
4154 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
4155         --pkg-export=gudev-1.0 \
4156         --warn-all
4157
4158 src_gudev_GUdev_1_0_gir_FILES = \
4159         src/gudev/gudev.h \
4160         src/gudev/gudevtypes.h \
4161         src/gudev/gudevenums.h \
4162         src/gudev/gudevenumtypes.h \
4163         src/gudev/gudevclient.h \
4164         src/gudev/gudevdevice.h \
4165         src/gudev/gudevenumerator.h \
4166         src/gudev/gudevclient.c \
4167         src/gudev/gudevdevice.c \
4168         src/gudev/gudevenumerator.c
4169
4170 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
4171 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
4172
4173 girdir = $(datadir)/gir-1.0
4174 gir_DATA = \
4175         src/gudev/GUdev-1.0.gir
4176
4177 typelibsdir = $(libdir)/girepository-1.0
4178 typelibs_DATA = \
4179         src/gudev/GUdev-1.0.typelib
4180
4181 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
4182 endif # HAVE_INTROSPECTION
4183 endif
4184
4185 EXTRA_DIST += \
4186         src/gudev/gudev-1.0.pc.in \
4187         src/gudev/gudevmarshal.list \
4188         src/gudev/gudevenumtypes.h.template \
4189         src/gudev/gudevenumtypes.c.template \
4190         src/gudev/gjs-example.js \
4191         src/gudev/seed-example-enum.js \
4192         src/gudev/seed-example.js
4193
4194 # ------------------------------------------------------------------------------
4195 mtd_probe_SOURCES =  \
4196         src/udev/mtd_probe/mtd_probe.c \
4197         src/udev/mtd_probe/mtd_probe.h \
4198         src/udev/mtd_probe/probe_smartmedia.c
4199
4200 dist_udevrules_DATA += \
4201         rules/75-probe_mtd.rules
4202
4203 udevlibexec_PROGRAMS += \
4204         mtd_probe
4205
4206 # ------------------------------------------------------------------------------
4207 test_id128_SOURCES = \
4208         src/test/test-id128.c
4209
4210 test_id128_LDADD = \
4211         libsystemd-internal.la \
4212         libsystemd-shared.la
4213
4214 tests += \
4215         test-id128
4216
4217 # ------------------------------------------------------------------------------
4218
4219 rootlibexec_PROGRAMS += \
4220         systemd-activate
4221
4222 systemd_activate_SOURCES = \
4223         src/activate/activate.c
4224
4225 systemd_activate_LDADD = \
4226         libsystemd-label.la \
4227         libsystemd-internal.la \
4228         libsystemd-shared.la
4229
4230 # ------------------------------------------------------------------------------
4231 systemd_journald_SOURCES = \
4232         src/journal/journald.c \
4233         src/journal/journald-server.h
4234
4235 systemd_journald_LDADD = \
4236         libsystemd-journal-core.la \
4237         libsystemd-internal.la \
4238         libsystemd-shared.la
4239
4240 systemd_cat_SOURCES = \
4241         src/journal/cat.c
4242
4243 systemd_cat_LDADD = \
4244         libsystemd-journal-core.la
4245
4246 if HAVE_MICROHTTPD
4247 rootlibexec_PROGRAMS += \
4248         systemd-journal-remote
4249
4250 systemd_journal_remote_SOURCES = \
4251         src/journal-remote/journal-remote-parse.h \
4252         src/journal-remote/journal-remote-parse.c \
4253         src/journal-remote/journal-remote-write.h \
4254         src/journal-remote/journal-remote-write.c \
4255         src/journal-remote/journal-remote.h \
4256         src/journal-remote/journal-remote.c
4257
4258 systemd_journal_remote_LDADD = \
4259         libsystemd-internal.la \
4260         libsystemd-journal-core.la
4261
4262 systemd_journal_remote_SOURCES += \
4263         src/journal-remote/microhttpd-util.h \
4264         src/journal-remote/microhttpd-util.c
4265
4266 systemd_journal_remote_CFLAGS = \
4267         $(AM_CFLAGS) \
4268         $(MICROHTTPD_CFLAGS)
4269
4270 systemd_journal_remote_LDADD += \
4271         $(MICROHTTPD_LIBS)
4272
4273 if ENABLE_SYSUSERS
4274 dist_sysusers_DATA += \
4275         sysusers.d/systemd-remote.conf
4276 endif
4277
4278 if ENABLE_TMPFILES
4279 dist_tmpfiles_DATA += \
4280         tmpfiles.d/systemd-remote.conf
4281 endif
4282
4283 if HAVE_GNUTLS
4284 systemd_journal_remote_LDADD += \
4285         $(GNUTLS_LIBS)
4286
4287 # systemd-journal-remote make sense mostly with full crypto stack
4288 dist_systemunit_DATA += \
4289         units/systemd-journal-remote.socket
4290
4291 nodist_systemunit_DATA += \
4292         units/systemd-journal-remote.service
4293
4294 EXTRA_DIST += \
4295         units/systemd-journal-remote.service.in
4296
4297 journal-remote-install-hook: journal-install-hook
4298         -$(MKDIR_P) $(DESTDIR)/var/log/journal/remote
4299         -chown 0:0 $(DESTDIR)/var/log/journal/remote
4300         -chmod 755 $(DESTDIR)/var/log/journal/remote
4301
4302 INSTALL_EXEC_HOOKS += journal-remote-install-hook
4303
4304 endif
4305
4306 nodist_pkgsysconf_DATA += \
4307         src/journal-remote/journal-remote.conf
4308
4309 EXTRA_DIST += \
4310         src/journal-remote/journal-remote.conf.in
4311
4312 endif
4313
4314 if HAVE_LIBCURL
4315 rootlibexec_PROGRAMS += \
4316         systemd-journal-upload
4317
4318 systemd_journal_upload_SOURCES = \
4319         src/journal-remote/journal-upload.h \
4320         src/journal-remote/journal-upload.c \
4321         src/journal-remote/journal-upload-journal.c
4322
4323 systemd_journal_upload_CFLAGS = \
4324         $(AM_CFLAGS) \
4325         $(LIBCURL_CFLAGS)
4326
4327 systemd_journal_upload_LDADD = \
4328         libsystemd-internal.la \
4329         libsystemd-journal-internal.la \
4330         libsystemd-shared.la \
4331         $(LIBCURL_LIBS)
4332
4333 nodist_systemunit_DATA += \
4334         units/systemd-journal-upload.service
4335
4336 EXTRA_DIST += \
4337         units/systemd-journal-upload.service.in
4338
4339 nodist_pkgsysconf_DATA += \
4340         src/journal-remote/journal-upload.conf
4341
4342 EXTRA_DIST += \
4343         src/journal-remote/journal-upload.conf.in
4344 endif
4345
4346 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4347 journalctl_CFLAGS = \
4348         $(AM_CFLAGS)
4349
4350 journalctl_SOURCES = \
4351         src/journal/journalctl.c
4352
4353 journalctl_LDADD = \
4354         libsystemd-journal-internal.la \
4355         libsystemd-internal.la \
4356         libsystemd-logs.la \
4357         libsystemd-shared.la
4358
4359 if HAVE_ACL
4360 journalctl_LDADD += \
4361         libsystemd-acl.la
4362 endif
4363
4364 if HAVE_QRENCODE
4365 journalctl_SOURCES += \
4366         src/journal/journal-qrcode.c \
4367         src/journal/journal-qrcode.h
4368
4369 journalctl_CFLAGS += \
4370         $(QRENCODE_CFLAGS)
4371
4372 journalctl_LDADD += \
4373         $(QRENCODE_LIBS)
4374 endif
4375
4376 test_journal_SOURCES = \
4377         src/journal/test-journal.c
4378
4379 test_journal_LDADD = \
4380         libsystemd-journal-core.la
4381
4382 test_journal_send_SOURCES = \
4383         src/journal/test-journal-send.c
4384
4385 test_journal_send_LDADD = \
4386         libsystemd-journal-core.la
4387
4388 test_journal_syslog_SOURCES = \
4389         src/journal/test-journal-syslog.c
4390
4391 test_journal_syslog_LDADD = \
4392         libsystemd-journal-core.la
4393
4394 test_journal_match_SOURCES = \
4395         src/journal/test-journal-match.c
4396
4397 test_journal_match_LDADD = \
4398         libsystemd-journal-core.la
4399
4400 test_journal_enum_SOURCES = \
4401         src/journal/test-journal-enum.c
4402
4403 test_journal_enum_LDADD = \
4404         libsystemd-journal-core.la
4405
4406 test_journal_stream_SOURCES = \
4407         src/journal/test-journal-stream.c
4408
4409 test_journal_stream_LDADD = \
4410         libsystemd-journal-core.la
4411
4412 test_journal_flush_SOURCES = \
4413         src/journal/test-journal-flush.c
4414
4415 test_journal_flush_LDADD = \
4416         libsystemd-journal-core.la
4417
4418 test_journal_init_SOURCES = \
4419         src/journal/test-journal-init.c
4420
4421 test_journal_init_LDADD = \
4422         libsystemd-journal-core.la
4423
4424 test_journal_verify_SOURCES = \
4425         src/journal/test-journal-verify.c
4426
4427 test_journal_verify_LDADD = \
4428         libsystemd-journal-core.la
4429
4430 test_journal_interleaving_SOURCES = \
4431         src/journal/test-journal-interleaving.c
4432
4433 test_journal_interleaving_LDADD = \
4434         libsystemd-journal-core.la
4435
4436 test_mmap_cache_SOURCES = \
4437         src/journal/test-mmap-cache.c
4438
4439 test_mmap_cache_LDADD = \
4440         libsystemd-journal-core.la
4441
4442 test_catalog_SOURCES = \
4443         src/journal/test-catalog.c
4444
4445 test_catalog_CPPFLAGS = \
4446         $(AM_CPPFLAGS) \
4447         -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
4448
4449 test_catalog_LDADD = \
4450         libsystemd-journal-core.la
4451
4452 test_compress_SOURCES = \
4453         src/journal/test-compress.c
4454
4455 test_compress_LDADD = \
4456         libsystemd-journal-internal.la \
4457         libsystemd-shared.la
4458
4459 test_compress_benchmark_SOURCES = \
4460         src/journal/test-compress-benchmark.c
4461
4462 test_compress_benchmark_LDADD = \
4463         libsystemd-journal-internal.la \
4464         libsystemd-shared.la
4465
4466 libsystemd_journal_core_la_SOURCES = \
4467         src/journal/journald-kmsg.c \
4468         src/journal/journald-kmsg.h \
4469         src/journal/journald-syslog.c \
4470         src/journal/journald-syslog.h \
4471         src/journal/journald-stream.c \
4472         src/journal/journald-stream.h \
4473         src/journal/journald-server.c \
4474         src/journal/journald-server.h \
4475         src/journal/journald-console.c \
4476         src/journal/journald-console.h \
4477         src/journal/journald-wall.c \
4478         src/journal/journald-wall.h \
4479         src/journal/journald-native.c \
4480         src/journal/journald-native.h \
4481         src/journal/journald-audit.c \
4482         src/journal/journald-audit.h \
4483         src/journal/journald-rate-limit.c \
4484         src/journal/journald-rate-limit.h \
4485         src/journal/journal-internal.h
4486
4487 nodist_libsystemd_journal_core_la_SOURCES = \
4488         src/journal/journald-gperf.c
4489
4490 libsystemd_journal_core_la_LIBADD = \
4491         libsystemd-journal-internal.la \
4492         libudev-internal.la \
4493         libsystemd-label.la \
4494         libsystemd-internal.la \
4495         libsystemd-shared.la
4496
4497 if HAVE_ACL
4498 libsystemd_journal_core_la_LIBADD += \
4499         libsystemd-acl.la
4500 endif
4501
4502 noinst_LTLIBRARIES += \
4503         libsystemd-journal-core.la
4504
4505 journal-install-hook:
4506         -$(MKDIR_P) $(DESTDIR)/var/log/journal
4507         -chown 0:0 $(DESTDIR)/var/log/journal
4508         -chmod 755 $(DESTDIR)/var/log/journal
4509         -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
4510         -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
4511
4512 journal-uninstall-hook:
4513         -rmdir $(DESTDIR)/var/log/journal/remote
4514         -rmdir $(DESTDIR)/var/log/journal/
4515
4516 INSTALL_EXEC_HOOKS += journal-install-hook
4517 UNINSTALL_EXEC_HOOKS += journal-uninstall-hook
4518
4519 # ------------------------------------------------------------------------------
4520 # Update catalog on installation. Do not bother if installing
4521 # in DESTDIR, since this is likely for packaging purposes.
4522 catalog-update-hook:
4523         -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
4524
4525 INSTALL_DATA_HOOKS += \
4526         catalog-update-hook
4527
4528 catalog-remove-hook:
4529         -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
4530
4531 UNINSTALL_DATA_HOOKS += \
4532         catalog-remove-hook
4533
4534 manual_tests += \
4535         test-journal-enum
4536
4537 tests += \
4538         test-journal \
4539         test-journal-send \
4540         test-journal-syslog \
4541         test-journal-match \
4542         test-journal-stream \
4543         test-journal-init \
4544         test-journal-verify \
4545         test-journal-interleaving \
4546         test-journal-flush \
4547         test-mmap-cache \
4548         test-catalog
4549
4550 if HAVE_COMPRESSION
4551 tests += \
4552         test-compress \
4553         test-compress-benchmark
4554 endif
4555
4556 pkginclude_HEADERS += \
4557         src/systemd/sd-journal.h \
4558         src/systemd/sd-messages.h \
4559         src/systemd/_sd-common.h
4560
4561 libsystemd_journal_internal_la_SOURCES = \
4562         src/journal/sd-journal.c \
4563         src/systemd/sd-journal.h \
4564         src/systemd/_sd-common.h \
4565         src/journal/journal-file.c \
4566         sr