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