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