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