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