chiark / gitweb /
architecture: Add tilegx
[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=2
43 LIBGUDEV_REVISION=0
44 LIBGUDEV_AGE=2
45
46 LIBSYSTEMD_LOGIN_CURRENT=9
47 LIBSYSTEMD_LOGIN_REVISION=3
48 LIBSYSTEMD_LOGIN_AGE=9
49
50 LIBSYSTEMD_DAEMON_CURRENT=0
51 LIBSYSTEMD_DAEMON_REVISION=12
52 LIBSYSTEMD_DAEMON_AGE=0
53
54 LIBSYSTEMD_ID128_CURRENT=0
55 LIBSYSTEMD_ID128_REVISION=28
56 LIBSYSTEMD_ID128_AGE=0
57
58 LIBSYSTEMD_JOURNAL_CURRENT=11
59 LIBSYSTEMD_JOURNAL_REVISION=5
60 LIBSYSTEMD_JOURNAL_AGE=11
61
62 LIBSYSTEMD_CURRENT=0
63 LIBSYSTEMD_REVISION=1
64 LIBSYSTEMD_AGE=0
65
66 # Dirs of external packages
67 dbuspolicydir=@dbuspolicydir@
68 dbussessionservicedir=@dbussessionservicedir@
69 dbussystemservicedir=@dbussystemservicedir@
70 pamlibdir=@pamlibdir@
71 pamconfdir=@pamconfdir@
72 pkgconfigdatadir=$(datadir)/pkgconfig
73 pkgconfiglibdir=$(libdir)/pkgconfig
74 polkitpolicydir=$(datadir)/polkit-1/actions
75 bashcompletiondir=@bashcompletiondir@
76 zshcompletiondir=@zshcompletiondir@
77 rpmmacrosdir=$(prefix)/lib/rpm/macros.d
78 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
79 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
80 varlogdir=$(localstatedir)/log
81 systemdstatedir=$(localstatedir)/lib/systemd
82 catalogstatedir=$(systemdstatedir)/catalog
83
84 # Our own, non-special dirs
85 pkgsysconfdir=$(sysconfdir)/systemd
86 userunitdir=$(prefix)/lib/systemd/user
87 userpresetdir=$(prefix)/lib/systemd/user-preset
88 tmpfilesdir=$(prefix)/lib/tmpfiles.d
89 sysctldir=$(prefix)/lib/sysctl.d
90 networkdir=$(rootprefix)/lib/systemd/network
91 pkgincludedir=$(includedir)/systemd
92 systemgeneratordir=$(rootlibexecdir)/system-generators
93 usergeneratordir=$(prefix)/lib/systemd/user-generators
94 systemshutdowndir=$(rootlibexecdir)/system-shutdown
95 systemsleepdir=$(rootlibexecdir)/system-sleep
96 systemunitdir=$(rootprefix)/lib/systemd/system
97 systempresetdir=$(rootprefix)/lib/systemd/system-preset
98 udevlibexecdir=$(rootprefix)/lib/udev
99 udevhomedir=$(udevlibexecdir)
100 udevrulesdir=$(udevlibexecdir)/rules.d
101 udevhwdbdir=$(udevlibexecdir)/hwdb.d
102 catalogdir=$(prefix)/lib/systemd/catalog
103 kernelinstalldir = $(prefix)/lib/kernel/install.d
104
105 # And these are the special ones for /
106 rootprefix=@rootprefix@
107 rootbindir=$(rootprefix)/bin
108 rootlibexecdir=$(rootprefix)/lib/systemd
109
110 CLEANFILES = $(BUILT_SOURCES)
111 DISTCLEANFILES =
112 EXTRA_DIST =
113 BUILT_SOURCES =
114 INSTALL_EXEC_HOOKS =
115 UNINSTALL_EXEC_HOOKS =
116 INSTALL_DATA_HOOKS =
117 UNINSTALL_DATA_HOOKS =
118 DISTCLEAN_LOCAL_HOOKS =
119 CLEAN_LOCAL_HOOKS =
120 pkginclude_HEADERS =
121 noinst_LTLIBRARIES =
122 lib_LTLIBRARIES =
123 include_HEADERS =
124 noinst_DATA =
125 pkgconfiglib_DATA =
126 polkitpolicy_in_in_files =
127 polkitpolicy_in_files =
128 polkitpolicy_files =
129 dist_udevrules_DATA =
130 nodist_udevrules_DATA =
131 dist_pkgsysconf_DATA =
132 dist_pkgdata_DATA =
133 dist_dbuspolicy_DATA =
134 dist_dbussystemservice_DATA =
135 check_PROGRAMS =
136 check_DATA =
137 tests=
138 manual_tests =
139 if ENABLE_TESTS
140 noinst_PROGRAMS = $(manual_tests) $(tests)
141 TESTS = $(tests)
142 else
143 noinst_PROGRAMS =
144 TESTS =
145 endif
146 udevlibexec_PROGRAMS =
147
148 .PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
149         $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
150         $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
151
152 AM_CPPFLAGS = \
153         -include $(top_builddir)/config.h \
154         -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
155         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
156         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
157         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
158         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
159         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
160         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
161         -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
162         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
163         -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
164         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
165         -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
166         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
167         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
168         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
169         -DROOTPREFIX=\"$(rootprefix)\" \
170         -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" \
171         -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \
172         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
173         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
174         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
175         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
176         -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
177         -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
178         -DX_SERVER=\"$(bindir)/X\" \
179         -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
180         -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
181         -DQUOTACHECK=\"$(QUOTACHECK)\" \
182         -DKEXEC=\"$(KEXEC)\" \
183         -I $(top_srcdir)/src \
184         -I $(top_builddir)/src/shared \
185         -I $(top_srcdir)/src/shared \
186         -I $(top_srcdir)/src/network \
187         -I $(top_srcdir)/src/login \
188         -I $(top_srcdir)/src/journal \
189         -I $(top_srcdir)/src/systemd \
190         -I $(top_builddir)/src/core \
191         -I $(top_srcdir)/src/core \
192         -I $(top_srcdir)/src/libudev \
193         -I $(top_srcdir)/src/udev \
194         -I $(top_srcdir)/src/udev/net \
195         -I $(top_builddir)/src/udev \
196         -I $(top_srcdir)/src/libsystemd/sd-bus \
197         -I $(top_srcdir)/src/libsystemd/sd-event \
198         -I $(top_srcdir)/src/libsystemd/sd-rtnl \
199         -I $(top_srcdir)/src/libsystemd-network \
200         $(OUR_CPPFLAGS)
201
202 AM_CFLAGS = $(OUR_CFLAGS)
203 AM_LDFLAGS = $(OUR_LDFLAGS)
204
205 # ------------------------------------------------------------------------------
206 define move-to-rootlibdir
207         if test "$(libdir)" != "$(rootlibdir)"; then \
208                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
209                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
210                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
211                 $(LN_S) -f $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
212                 mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
213         fi
214 endef
215
216 INSTALL_DIRS =
217
218 RUNLEVEL1_TARGET_WANTS =
219 RUNLEVEL2_TARGET_WANTS =
220 RUNLEVEL3_TARGET_WANTS =
221 RUNLEVEL4_TARGET_WANTS =
222 RUNLEVEL5_TARGET_WANTS =
223 SHUTDOWN_TARGET_WANTS =
224 LOCAL_FS_TARGET_WANTS =
225 MULTI_USER_TARGET_WANTS =
226 SYSINIT_TARGET_WANTS =
227 SOCKETS_TARGET_WANTS =
228 BUSNAMES_TARGET_WANTS =
229 TIMERS_TARGET_WANTS =
230 USER_SOCKETS_TARGET_WANTS =
231 USER_BUSNAMES_TARGET_WANTS =
232
233 SYSTEM_UNIT_ALIASES =
234 USER_UNIT_ALIASES =
235
236 GENERAL_ALIASES =
237
238 install-target-wants-hook:
239         what="$(RUNLEVEL1_TARGET_WANTS)" && wants=runlevel1.target && dir=$(systemunitdir) && $(add-wants)
240         what="$(RUNLEVEL2_TARGET_WANTS)" && wants=runlevel2.target && dir=$(systemunitdir) && $(add-wants)
241         what="$(RUNLEVEL3_TARGET_WANTS)" && wants=runlevel3.target && dir=$(systemunitdir) && $(add-wants)
242         what="$(RUNLEVEL4_TARGET_WANTS)" && wants=runlevel4.target && dir=$(systemunitdir) && $(add-wants)
243         what="$(RUNLEVEL5_TARGET_WANTS)" && wants=runlevel5.target && dir=$(systemunitdir) && $(add-wants)
244         what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && dir=$(systemunitdir) && $(add-wants)
245         what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && dir=$(systemunitdir) && $(add-wants)
246         what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
247         what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
248         what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
249         what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
250         what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
251         what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
252         what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
253         what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
254
255 define add-wants
256         [ -z "$$what" ] || ( \
257           dir=$(DESTDIR)$$dir/$$wants.wants && \
258           $(MKDIR_P) -m 0755 $$dir && \
259           cd $$dir && \
260           rm -f $$what && \
261           for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
262 endef
263
264 install-directories-hook:
265         $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
266
267 install-aliases-hook:
268         set -- $(SYSTEM_UNIT_ALIASES) && \
269                 dir=$(systemunitdir) && $(install-aliases)
270         set -- $(USER_UNIT_ALIASES) && \
271                 dir=$(userunitdir) && $(install-aliases)
272         set -- $(GENERAL_ALIASES) && \
273                 dir= && $(install-aliases)
274
275 define install-aliases
276         while [ -n "$$1" ]; do \
277                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
278                 rm -f $(DESTDIR)$$dir/$$2 && \
279                 $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
280                 shift 2 || exit $$?; \
281         done
282 endef
283
284 INSTALL_EXEC_HOOKS += \
285         install-target-wants-hook \
286         install-directories-hook \
287         install-aliases-hook
288
289 # ------------------------------------------------------------------------------
290 AM_V_M4 = $(AM_V_M4_$(V))
291 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
292 AM_V_M4_0 = @echo "  M4      " $@;
293
294 AM_V_XSLT = $(AM_V_XSLT_$(V))
295 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
296 AM_V_XSLT_0 = @echo "  XSLT    " $@;
297
298 AM_V_GPERF = $(AM_V_GPERF_$(V))
299 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
300 AM_V_GPERF_0 = @echo "  GPERF   " $@;
301
302 AM_V_LN = $(AM_V_LN_$(V))
303 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
304 AM_V_LN_0 = @echo "  LN      " $@;
305
306 # ------------------------------------------------------------------------------
307 rootbin_PROGRAMS = \
308         systemctl \
309         systemd-notify \
310         systemd-ask-password \
311         systemd-tty-ask-password-agent \
312         systemd-machine-id-setup
313
314 bin_PROGRAMS = \
315         systemd-cgls \
316         systemd-cgtop \
317         systemd-nspawn \
318         systemd-detect-virt \
319         systemd-delta \
320         systemd-analyze \
321         systemd-run
322
323 dist_bin_SCRIPTS = \
324         src/kernel-install/kernel-install
325
326 dist_kernelinstall_SCRIPTS = \
327         src/kernel-install/50-depmod.install \
328         src/kernel-install/90-loaderentry.install
329
330 rootlibexec_PROGRAMS = \
331         systemd \
332         systemd-cgroups-agent \
333         systemd-initctl \
334         systemd-update-utmp \
335         systemd-shutdownd \
336         systemd-shutdown \
337         systemd-remount-fs \
338         systemd-reply-password \
339         systemd-fsck \
340         systemd-ac-power \
341         systemd-sysctl \
342         systemd-sleep \
343         systemd-bus-proxyd \
344         systemd-socket-proxyd
345
346 systemgenerator_PROGRAMS = \
347         systemd-getty-generator \
348         systemd-fstab-generator \
349         systemd-system-update-generator
350
351 dist_bashcompletion_DATA = \
352         shell-completion/bash/busctl \
353         shell-completion/bash/journalctl \
354         shell-completion/bash/systemctl \
355         shell-completion/bash/systemd-analyze \
356         shell-completion/bash/systemd-delta \
357         shell-completion/bash/systemd-run \
358         shell-completion/bash/udevadm \
359         shell-completion/bash/kernel-install
360
361 dist_zshcompletion_DATA = \
362         shell-completion/zsh/_systemctl \
363         shell-completion/zsh/_journalctl \
364         shell-completion/zsh/_udevadm \
365         shell-completion/zsh/_kernel-install \
366         shell-completion/zsh/_systemd-nspawn \
367         shell-completion/zsh/_systemd-analyze \
368         shell-completion/zsh/_systemd-run \
369         shell-completion/zsh/_sd_hosts_or_user_at_host \
370         shell-completion/zsh/_systemd-delta \
371         shell-completion/zsh/_systemd
372
373 dist_sysctl_DATA = \
374         sysctl.d/50-default.conf
375
376 dist_systemunit_DATA = \
377         units/graphical.target \
378         units/multi-user.target \
379         units/emergency.service \
380         units/emergency.target \
381         units/sysinit.target \
382         units/basic.target \
383         units/getty.target \
384         units/halt.target \
385         units/kexec.target \
386         units/local-fs.target \
387         units/local-fs-pre.target \
388         units/initrd.target \
389         units/initrd-fs.target \
390         units/initrd-root-fs.target \
391         units/remote-fs.target \
392         units/remote-fs-pre.target \
393         units/network.target \
394         units/network-online.target \
395         units/nss-lookup.target \
396         units/nss-user-lookup.target \
397         units/hibernate.target \
398         units/hybrid-sleep.target \
399         units/poweroff.target \
400         units/reboot.target \
401         units/rescue.target \
402         units/rpcbind.target \
403         units/time-sync.target \
404         units/shutdown.target \
405         units/final.target \
406         units/umount.target \
407         units/sigpwr.target \
408         units/sleep.target \
409         units/sockets.target \
410         units/busnames.target \
411         units/timers.target \
412         units/paths.target \
413         units/suspend.target \
414         units/swap.target \
415         units/slices.target \
416         units/system.slice \
417         units/x-.slice \
418         units/systemd-initctl.socket \
419         units/systemd-shutdownd.socket \
420         units/syslog.socket \
421         units/dev-hugepages.mount \
422         units/dev-mqueue.mount \
423         units/sys-kernel-config.mount \
424         units/sys-kernel-debug.mount \
425         units/sys-fs-fuse-connections.mount \
426         units/tmp.mount \
427         units/printer.target \
428         units/sound.target \
429         units/bluetooth.target \
430         units/smartcard.target \
431         units/systemd-ask-password-wall.path \
432         units/systemd-ask-password-console.path \
433         units/systemd-udevd-control.socket \
434         units/systemd-udevd-kernel.socket \
435         units/system-update.target \
436         units/initrd-switch-root.target
437
438 nodist_systemunit_DATA = \
439         units/getty@.service \
440         units/serial-getty@.service \
441         units/console-shell.service \
442         units/console-getty.service \
443         units/container-getty@.service \
444         units/systemd-initctl.service \
445         units/systemd-shutdownd.service \
446         units/systemd-remount-fs.service \
447         units/systemd-update-utmp.service \
448         units/systemd-update-utmp-runlevel.service \
449         units/systemd-ask-password-wall.service \
450         units/systemd-ask-password-console.service \
451         units/systemd-sysctl.service \
452         units/emergency.service \
453         units/rescue.service \
454         units/user@.service \
455         units/systemd-hibernate.service \
456         units/systemd-hybrid-sleep.service \
457         units/systemd-suspend.service \
458         units/systemd-halt.service \
459         units/systemd-poweroff.service \
460         units/systemd-reboot.service \
461         units/systemd-kexec.service \
462         units/systemd-fsck@.service \
463         units/systemd-fsck-root.service \
464         units/systemd-udevd.service \
465         units/systemd-udev-trigger.service \
466         units/systemd-udev-settle.service \
467         units/debug-shell.service \
468         units/initrd-parse-etc.service \
469         units/initrd-cleanup.service \
470         units/initrd-udevadm-cleanup-db.service \
471         units/initrd-switch-root.service \
472         units/systemd-nspawn@.service
473
474 dist_userunit_DATA = \
475         units/user/basic.target \
476         units/user/default.target \
477         units/user/exit.target
478
479 nodist_userunit_DATA = \
480         units/user/systemd-exit.service
481
482 EXTRA_DIST += \
483         units/getty@.service.m4 \
484         units/serial-getty@.service.m4 \
485         units/console-shell.service.m4.in \
486         units/console-getty.service.m4.in \
487         units/container-getty@.service.m4.in \
488         units/rescue.service.m4.in \
489         units/systemd-initctl.service.in \
490         units/systemd-shutdownd.service.in \
491         units/systemd-remount-fs.service.in \
492         units/systemd-update-utmp.service.in \
493         units/systemd-update-utmp-runlevel.service.in \
494         units/systemd-ask-password-wall.service.in \
495         units/systemd-ask-password-console.service.in \
496         units/systemd-sysctl.service.in \
497         units/emergency.service.in \
498         units/systemd-halt.service.in \
499         units/systemd-poweroff.service.in \
500         units/systemd-reboot.service.in \
501         units/systemd-kexec.service.in \
502         units/user/systemd-exit.service.in \
503         units/systemd-fsck@.service.in \
504         units/systemd-fsck-root.service.in \
505         units/user@.service.in \
506         units/debug-shell.service.in \
507         units/systemd-hibernate.service.in \
508         units/systemd-hybrid-sleep.service.in \
509         units/systemd-suspend.service.in \
510         units/quotaon.service.in \
511         units/initrd-parse-etc.service.in \
512         units/initrd-cleanup.service.in \
513         units/initrd-udevadm-cleanup-db.service.in \
514         units/initrd-switch-root.service.in \
515         units/systemd-nspawn@.service.in
516
517 CLEANFILES += \
518         units/console-shell.service.m4 \
519         units/console-getty.service.m4 \
520         units/container-getty@.service.m4 \
521         units/rescue.service.m4 \
522         units/user@.service.m4
523
524 if HAVE_SYSV_COMPAT
525 nodist_systemunit_DATA += \
526         units/rc-local.service \
527         units/halt-local.service
528
529 systemgenerator_PROGRAMS += \
530         systemd-rc-local-generator
531 endif
532
533 EXTRA_DIST += \
534         units/rc-local.service.in \
535         units/halt-local.service.in
536
537 # automake is broken and can't handle files with a dash in front
538 # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14728#8
539 units-install-hook:
540         mv $(DESTDIR)$(systemunitdir)/x-.slice $(DESTDIR)/$(systemunitdir)/-.slice
541
542 units-uninstall-hook:
543         rm -f $(DESTDIR)/$(systemunitdir)/-.slice
544
545 INSTALL_DATA_HOOKS += units-install-hook
546 UNINSTALL_DATA_HOOKS += units-uninstall-hook
547
548 dist_doc_DATA = \
549         README \
550         NEWS \
551         LICENSE.LGPL2.1 \
552         LICENSE.GPL2 \
553         LICENSE.MIT \
554         DISTRO_PORTING
555
556 @INTLTOOL_POLICY_RULE@
557
558 # ------------------------------------------------------------------------------
559
560 MANPAGES =
561 MANPAGES_ALIAS =
562
563 include Makefile-man.am
564
565 .PHONY: man update-man-list
566 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
567
568 XML_FILES = \
569         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
570 HTML_FILES = \
571         ${XML_FILES:.xml=.html}
572 HTML_ALIAS = \
573         ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
574
575 if ENABLE_MANPAGES
576 man_MANS = \
577         $(MANPAGES) \
578         $(MANPAGES_ALIAS)
579
580 noinst_DATA += \
581         $(HTML_FILES) \
582         $(HTML_ALIAS)
583
584 CLEANFILES += \
585         $(man_MANS) \
586         $(HTML_FILES) \
587         $(HTML_ALIAS)
588
589 docs/html/man:
590         $(AM_V_at)$(MKDIR_P) $(dir $@)
591         $(AM_V_LN)$(LN_S) -f ../../man $@
592
593 noinst_DATA += \
594         docs/html/man
595
596 CLEANFILES += \
597         docs/html/man
598
599 if HAVE_PYTHON
600 man/index.html: man/systemd.index.html
601         $(AM_V_LN)$(LN_S) -f systemd.index.html $@
602
603 noinst_DATA += \
604         man/index.html
605
606 CLEANFILES += \
607         man/index.html
608
609 XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_builddir)/man/*.xml)
610 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
611 SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
612
613 update-man-list: $(top_srcdir)/tools/make-man-rules.py $(XML_GLOB)
614         $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
615         $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
616         @echo "Makefile-man.am has been regenerated"
617
618 man/systemd.index.xml: $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES)
619         $(AM_V_at)$(MKDIR_P) $(dir $@)
620         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
621
622 man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py $(SOURCE_XML_FILES)
623         $(AM_V_at)$(MKDIR_P) $(dir $@)
624         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
625
626 EXTRA_DIST += \
627         man/systemd.index.xml \
628         man/index.html \
629         man/systemd.directives.xml
630
631 CLEANFILES += \
632         man/systemd.index.xml \
633         man/systemd.directives.xml
634
635 endif
636
637 endif
638
639 EXTRA_DIST += \
640         $(XML_FILES) \
641         $(HTML_FILES) \
642         $(HTML_ALIAS) \
643         $(man_MANS) \
644         tools/make-man-index.py \
645         tools/make-directive-index.py \
646         tools/make-man-rules.py \
647         tools/xml_helper.py
648
649 # ------------------------------------------------------------------------------
650 noinst_LTLIBRARIES += \
651         libsystemd-shared.la
652
653 libsystemd_shared_la_SOURCES = \
654         src/shared/linux/auto_dev-ioctl.h \
655         src/shared/linux/fanotify.h \
656         src/shared/ioprio.h \
657         src/shared/missing.h \
658         src/shared/initreq.h \
659         src/shared/securebits.h \
660         src/shared/special.h \
661         src/shared/list.h \
662         src/shared/macro.h \
663         src/shared/def.h \
664         src/shared/sparse-endian.h \
665         src/shared/refcnt.h \
666         src/shared/udev-util.h \
667         src/shared/bus-errors.h \
668         src/shared/device-nodes.c \
669         src/shared/device-nodes.h \
670         src/shared/util.c \
671         src/shared/util.h \
672         src/shared/virt.c \
673         src/shared/virt.h \
674         src/shared/architecture.c \
675         src/shared/architecture.h \
676         src/shared/efivars.c \
677         src/shared/efivars.h \
678         src/shared/path-util.c \
679         src/shared/path-util.h \
680         src/shared/time-util.c \
681         src/shared/time-util.h \
682         src/shared/hashmap.c \
683         src/shared/hashmap.h \
684         src/shared/siphash24.c \
685         src/shared/siphash24.h \
686         src/shared/set.c \
687         src/shared/set.h \
688         src/shared/fdset.c \
689         src/shared/fdset.h \
690         src/shared/prioq.c \
691         src/shared/prioq.h \
692         src/shared/sleep-config.c \
693         src/shared/sleep-config.h \
694         src/shared/strv.c \
695         src/shared/strv.h \
696         src/shared/env-util.c \
697         src/shared/env-util.h \
698         src/shared/strbuf.c \
699         src/shared/strbuf.h \
700         src/shared/strxcpyx.c \
701         src/shared/strxcpyx.h \
702         src/shared/conf-parser.c \
703         src/shared/conf-parser.h \
704         src/shared/log.c \
705         src/shared/log.h \
706         src/shared/ratelimit.h \
707         src/shared/ratelimit.c \
708         src/shared/exit-status.c \
709         src/shared/exit-status.h \
710         src/shared/utf8.c \
711         src/shared/utf8.h \
712         src/shared/gunicode.c \
713         src/shared/gunicode.h \
714         src/shared/pager.c \
715         src/shared/pager.h \
716         src/shared/socket-util.c \
717         src/shared/socket-util.h \
718         src/shared/conf-files.c \
719         src/shared/conf-files.h \
720         src/shared/cgroup-util.c \
721         src/shared/cgroup-util.h \
722         src/shared/cgroup-show.c \
723         src/shared/cgroup-show.h \
724         src/shared/unit-name.c \
725         src/shared/unit-name.h \
726         src/shared/utmp-wtmp.c \
727         src/shared/utmp-wtmp.h \
728         src/shared/watchdog.c \
729         src/shared/watchdog.h \
730         src/shared/spawn-ask-password-agent.c \
731         src/shared/spawn-ask-password-agent.h \
732         src/shared/replace-var.c \
733         src/shared/replace-var.h \
734         src/shared/spawn-polkit-agent.c \
735         src/shared/spawn-polkit-agent.h \
736         src/shared/hwclock.c \
737         src/shared/hwclock.h \
738         src/shared/time-dst.c \
739         src/shared/time-dst.h \
740         src/shared/calendarspec.c \
741         src/shared/calendarspec.h \
742         src/shared/fileio.c \
743         src/shared/fileio.h \
744         src/shared/output-mode.h \
745         src/shared/MurmurHash2.c \
746         src/shared/MurmurHash2.h \
747         src/shared/acpi-fpdt.h \
748         src/shared/acpi-fpdt.c \
749         src/shared/boot-timestamps.h \
750         src/shared/boot-timestamps.c \
751         src/shared/mkdir.c \
752         src/shared/mkdir.h \
753         src/shared/smack-util.c \
754         src/shared/smack-util.h \
755         src/shared/apparmor-util.c \
756         src/shared/apparmor-util.h \
757         src/shared/ima-util.c \
758         src/shared/ima-util.h \
759         src/shared/ptyfwd.c \
760         src/shared/ptyfwd.h \
761         src/shared/net-util.c \
762         src/shared/net-util.h \
763         src/shared/errno-list.c \
764         src/shared/errno-list.h \
765         src/shared/af-list.c \
766         src/shared/af-list.h \
767         src/shared/audit.c \
768         src/shared/audit.h \
769         src/shared/xml.c \
770         src/shared/xml.h \
771         src/shared/condition-util.c \
772         src/shared/condition-util.h \
773         src/shared/bus-label.c \
774         src/shared/bus-label.h
775
776 nodist_libsystemd_shared_la_SOURCES = \
777         src/shared/errno-from-name.h \
778         src/shared/errno-to-name.h \
779         src/shared/af-from-name.h \
780         src/shared/af-to-name.h
781
782 libsystemd_shared_la_CFLAGS = \
783         $(AM_CFLAGS) \
784         $(SECCOMP_CFLAGS)
785
786 # ------------------------------------------------------------------------------
787 noinst_LTLIBRARIES += \
788         libsystemd-units.la
789
790 libsystemd_units_la_SOURCES = \
791         src/shared/install.c \
792         src/shared/install.h \
793         src/shared/install-printf.c \
794         src/shared/install-printf.h \
795         src/shared/path-lookup.c \
796         src/shared/path-lookup.h \
797         src/shared/specifier.c \
798         src/shared/specifier.h
799
800 # ------------------------------------------------------------------------------
801 noinst_LTLIBRARIES += \
802         libsystemd-label.la
803
804 libsystemd_label_la_SOURCES = \
805         src/shared/socket-label.c \
806         src/shared/label.c \
807         src/shared/label.h \
808         src/shared/selinux-util.c \
809         src/shared/selinux-util.h \
810         src/shared/mkdir-label.c \
811         src/shared/ask-password-api.c \
812         src/shared/ask-password-api.h \
813         src/shared/fileio-label.c \
814         src/shared/fileio-label.h \
815         src/shared/dev-setup.c \
816         src/shared/dev-setup.h
817
818 libsystemd_label_la_CFLAGS = \
819         $(AM_CFLAGS) \
820         $(SELINUX_CFLAGS)
821
822 libsystemd_label_la_LIBADD = \
823         $(SELINUX_LIBS)
824
825 # ------------------------------------------------------------------------------
826
827 if HAVE_SECCOMP
828 noinst_LTLIBRARIES += \
829         libsystemd-seccomp.la
830
831 libsystemd_seccomp_la_SOURCES = \
832         src/shared/seccomp-util.h \
833         src/shared/seccomp-util.c
834
835 libsystemd_seccomp_la_CFLAGS = \
836         $(AM_CFLAGS) \
837         $(SECCOMP_CFLAGS)
838
839 libsystemd_seccomp_la_LIBADD = \
840         $(SECCOMP_LIBS)
841 endif
842
843 # ------------------------------------------------------------------------------
844 noinst_LTLIBRARIES += \
845         libsystemd-logs.la
846
847 libsystemd_logs_la_SOURCES = \
848         src/shared/logs-show.c \
849         src/shared/logs-show.h
850
851 # ------------------------------------------------------------------------------
852 noinst_LTLIBRARIES += \
853         libsystemd-capability.la
854
855 libsystemd_capability_la_SOURCES = \
856         src/shared/capability.c \
857         src/shared/capability.h
858
859 libsystemd_capability_la_CFLAGS = \
860         $(AM_CFLAGS) \
861         $(CAP_CFLAGS)
862
863 libsystemd_capability_la_LIBADD = \
864         $(CAP_LIBS)
865
866 # ------------------------------------------------------------------------------
867 if HAVE_ACL
868 noinst_LTLIBRARIES += \
869         libsystemd-acl.la
870
871 libsystemd_acl_la_SOURCES = \
872         src/shared/acl-util.c \
873         src/shared/acl-util.h
874
875 libsystemd_acl_la_CFLAGS = \
876         $(AM_CFLAGS) \
877         $(ACL_CFLAGS)
878
879 libsystemd_acl_la_LIBADD = \
880         $(ACL_LIBS)
881 endif
882
883 # ------------------------------------------------------------------------------
884 noinst_LTLIBRARIES += \
885         libsystemd-core.la
886
887 libsystemd_core_la_SOURCES = \
888         src/core/unit.c \
889         src/core/unit.h \
890         src/core/unit-printf.c \
891         src/core/unit-printf.h \
892         src/core/job.c \
893         src/core/job.h \
894         src/core/manager.c \
895         src/core/manager.h \
896         src/core/transaction.c \
897         src/core/transaction.h \
898         src/core/load-fragment.c \
899         src/core/load-fragment.h \
900         src/core/service.c \
901         src/core/service.h \
902         src/core/socket.c \
903         src/core/socket.h \
904         src/core/busname.c \
905         src/core/busname.h \
906         src/core/target.c \
907         src/core/target.h \
908         src/core/snapshot.c \
909         src/core/snapshot.h \
910         src/core/device.c \
911         src/core/device.h \
912         src/core/mount.c \
913         src/core/mount.h \
914         src/core/automount.c \
915         src/core/automount.h \
916         src/core/swap.c \
917         src/core/swap.h \
918         src/core/timer.c \
919         src/core/timer.h \
920         src/core/path.c \
921         src/core/path.h \
922         src/core/slice.c \
923         src/core/slice.h \
924         src/core/scope.c \
925         src/core/scope.h \
926         src/core/load-dropin.c \
927         src/core/load-dropin.h \
928         src/core/execute.c \
929         src/core/execute.h \
930         src/core/kill.c \
931         src/core/kill.h \
932         src/core/dbus.c \
933         src/core/dbus.h \
934         src/core/dbus-manager.c \
935         src/core/dbus-manager.h \
936         src/core/dbus-unit.c \
937         src/core/dbus-unit.h \
938         src/core/dbus-job.c \
939         src/core/dbus-job.h \
940         src/core/dbus-service.c \
941         src/core/dbus-service.h \
942         src/core/dbus-socket.c \
943         src/core/dbus-socket.h \
944         src/core/dbus-busname.c \
945         src/core/dbus-busname.h \
946         src/core/dbus-target.c \
947         src/core/dbus-target.h \
948         src/core/dbus-snapshot.c \
949         src/core/dbus-snapshot.h \
950         src/core/dbus-device.c \
951         src/core/dbus-device.h \
952         src/core/dbus-mount.c \
953         src/core/dbus-mount.h \
954         src/core/dbus-automount.c \
955         src/core/dbus-automount.h \
956         src/core/dbus-swap.c \
957         src/core/dbus-swap.h \
958         src/core/dbus-timer.c \
959         src/core/dbus-timer.h \
960         src/core/dbus-path.c \
961         src/core/dbus-path.h \
962         src/core/dbus-slice.c \
963         src/core/dbus-slice.h \
964         src/core/dbus-scope.c \
965         src/core/dbus-scope.h \
966         src/core/dbus-execute.c \
967         src/core/dbus-execute.h \
968         src/core/dbus-kill.c \
969         src/core/dbus-kill.h \
970         src/core/dbus-cgroup.c \
971         src/core/dbus-cgroup.h \
972         src/core/dbus-client-track.c \
973         src/core/dbus-client-track.h \
974         src/core/cgroup.c \
975         src/core/cgroup.h \
976         src/core/selinux-access.c \
977         src/core/selinux-access.h \
978         src/core/selinux-setup.c \
979         src/core/selinux-setup.h \
980         src/core/smack-setup.c \
981         src/core/smack-setup.h \
982         src/core/ima-setup.c \
983         src/core/ima-setup.h \
984         src/core/locale-setup.h \
985         src/core/locale-setup.c \
986         src/core/hostname-setup.c \
987         src/core/hostname-setup.h \
988         src/core/machine-id-setup.c \
989         src/core/machine-id-setup.h \
990         src/core/mount-setup.c \
991         src/core/mount-setup.h \
992         src/core/loopback-setup.h \
993         src/core/loopback-setup.c \
994         src/core/condition.c \
995         src/core/condition.h \
996         src/core/namespace.c \
997         src/core/namespace.h \
998         src/core/tcpwrap.c \
999         src/core/tcpwrap.h \
1000         src/core/build.h \
1001         src/core/sysfs-show.h \
1002         src/core/switch-root.h \
1003         src/core/switch-root.c \
1004         src/core/killall.h \
1005         src/core/killall.c \
1006         src/core/audit-fd.c \
1007         src/core/audit-fd.h \
1008         src/core/async.c \
1009         src/core/async.h
1010
1011 if HAVE_KMOD
1012 libsystemd_core_la_SOURCES += \
1013         src/core/kmod-setup.c \
1014         src/core/kmod-setup.h
1015 endif
1016
1017 nodist_libsystemd_core_la_SOURCES = \
1018         src/core/load-fragment-gperf.c \
1019         src/core/load-fragment-gperf-nulstr.c
1020
1021 libsystemd_core_la_CFLAGS = \
1022         $(AM_CFLAGS) \
1023         $(LIBWRAP_CFLAGS) \
1024         $(PAM_CFLAGS) \
1025         $(AUDIT_CFLAGS) \
1026         $(CAP_CFLAGS) \
1027         $(KMOD_CFLAGS) \
1028         $(APPARMOR_CFLAGS) \
1029         $(SECCOMP_CFLAGS) \
1030         -pthread
1031
1032 libsystemd_core_la_LIBADD = \
1033         libsystemd-capability.la \
1034         libsystemd-units.la \
1035         libsystemd-label.la \
1036         libudev-internal.la \
1037         libsystemd-shared.la \
1038         libsystemd-internal.la \
1039         $(LIBWRAP_LIBS) \
1040         $(PAM_LIBS) \
1041         $(AUDIT_LIBS) \
1042         $(CAP_LIBS) \
1043         $(KMOD_LIBS) \
1044         $(APPARMOR_LIBS) \
1045         $(SECCOMP_LIBS)
1046
1047 if HAVE_SECCOMP
1048 libsystemd_core_la_LIBADD += \
1049         libsystemd-seccomp.la
1050 endif
1051
1052 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1053         $(AM_V_at)$(MKDIR_P) $(dir $@)
1054         $(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 ";" }' < $< > $@
1055
1056 EXTRA_DIST += \
1057         src/core/load-fragment-gperf.gperf.m4
1058
1059 CLEANFILES += \
1060         src/core/load-fragment-gperf.gperf \
1061         src/core/load-fragment-gperf.c \
1062         src/core/load-fragment-gperf-nulstr.c \
1063         src/shared/errno-list.txt \
1064         src/shared/errno-from-name.gperf \
1065         src/shared/af-list.txt \
1066         src/shared/af-from-name.gperf
1067
1068 BUILT_SOURCES += \
1069         src/shared/errno-from-name.h \
1070         src/shared/errno-to-name.h \
1071         src/shared/af-from-name.h \
1072         src/shared/af-to-name.h
1073
1074 src/shared/errno-list.txt:
1075         $(AM_V_at)$(MKDIR_P) $(dir $@)
1076         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - < /dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+[0-9]/ { print $$2; }'  > $@
1077
1078 src/shared/errno-from-name.gperf: src/shared/errno-list.txt
1079         $(AM_V_at)$(MKDIR_P) $(dir $@)
1080         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct errno_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' < $< > $@
1081
1082 src/shared/errno-from-name.h: src/shared/errno-from-name.gperf
1083         $(AM_V_at)$(MKDIR_P) $(dir $@)
1084         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_errno -H hash_errno_name -p -C < $< > $@
1085
1086 src/shared/errno-to-name.h: src/shared/errno-list.txt
1087         $(AM_V_at)$(MKDIR_P) $(dir $@)
1088         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
1089
1090 src/shared/af-list.txt:
1091         $(AM_V_at)$(MKDIR_P) $(dir $@)
1092         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/socket.h - < /dev/null | grep -v AF_UNSPEC | grep -v AF_MAX | $(AWK) '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $$2; }'  > $@
1093
1094 src/shared/af-from-name.gperf: src/shared/af-list.txt
1095         $(AM_V_at)$(MKDIR_P) $(dir $@)
1096         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct af_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' < $< > $@
1097
1098 src/shared/af-from-name.h: src/shared/af-from-name.gperf
1099         $(AM_V_at)$(MKDIR_P) $(dir $@)
1100         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_af -H hash_af_name -p -C < $< > $@
1101
1102 src/shared/af-to-name.h: src/shared/af-list.txt
1103         $(AM_V_at)$(MKDIR_P) $(dir $@)
1104         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const af_names[] = { "} !/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
1105
1106 # ------------------------------------------------------------------------------
1107 systemd_SOURCES = \
1108         src/core/main.c
1109
1110 systemd_CFLAGS = \
1111         $(AM_CFLAGS) \
1112         $(SECCOMP_CFLAGS)
1113
1114 systemd_LDADD = \
1115         libsystemd-core.la \
1116         $(RT_LIBS)
1117
1118 dist_pkgsysconf_DATA += \
1119         src/core/system.conf \
1120         src/core/user.conf
1121
1122 dist_dbuspolicy_DATA += \
1123         src/core/org.freedesktop.systemd1.conf
1124
1125 dist_dbussystemservice_DATA += \
1126         src/core/org.freedesktop.systemd1.service
1127
1128 polkitpolicy_in_in_files += \
1129         src/core/org.freedesktop.systemd1.policy.in.in
1130
1131 pkgconfigdata_DATA = \
1132         src/core/systemd.pc
1133
1134 nodist_rpmmacros_DATA = \
1135         src/core/macros.systemd
1136
1137 EXTRA_DIST += \
1138         src/core/systemd.pc.in \
1139         src/core/macros.systemd.in
1140
1141 CLEANFILES += \
1142         src/core/macros.systemd \
1143         src/core/org.freedesktop.systemd1.policy.in
1144
1145 # ------------------------------------------------------------------------------
1146 manual_tests += \
1147         test-engine \
1148         test-ns \
1149         test-loopback \
1150         test-hostname \
1151         test-daemon \
1152         test-cgroup \
1153         test-install \
1154         test-watchdog \
1155         test-log
1156
1157 tests += \
1158         test-job-type \
1159         test-env-replace \
1160         test-strbuf \
1161         test-strv \
1162         test-path-util \
1163         test-strxcpyx \
1164         test-unit-name \
1165         test-unit-file \
1166         test-utf8 \
1167         test-ellipsize \
1168         test-util \
1169         test-tmpfiles \
1170         test-namespace \
1171         test-date \
1172         test-sleep \
1173         test-replace-var \
1174         test-sched-prio \
1175         test-calendarspec \
1176         test-strip-tab-ansi \
1177         test-cgroup-util \
1178         test-cgroup-mask \
1179         test-prioq \
1180         test-fileio \
1181         test-time \
1182         test-hashmap \
1183         test-list \
1184         test-tables \
1185         test-device-nodes \
1186         test-xml \
1187         test-architecture
1188
1189 EXTRA_DIST += \
1190         test/sched_idle_bad.service \
1191         test/sched_idle_ok.service \
1192         test/sched_rr_bad.service \
1193         test/sched_rr_ok.service \
1194         test/sched_rr_change.service \
1195         test/son.service \
1196         test/daughter.service \
1197         test/parent.slice
1198
1199 EXTRA_DIST += \
1200         src/test/test-helper.h
1201
1202 test_device_nodes_SOURCES = \
1203         src/test/test-device-nodes.c
1204
1205 test_device_nodes_LDADD = \
1206         libsystemd-shared.la
1207
1208 test_engine_SOURCES = \
1209         src/test/test-engine.c
1210
1211 test_engine_CFLAGS = \
1212         $(AM_CFLAGS) \
1213         $(SECCOMP_CFLAGS)
1214
1215 test_engine_LDADD = \
1216         libsystemd-core.la \
1217         $(RT_LIBS)
1218
1219 test_job_type_SOURCES = \
1220         src/test/test-job-type.c
1221
1222 test_job_type_CFLAGS = \
1223         $(AM_CFLAGS) \
1224         $(SECCOMP_CFLAGS)
1225
1226 test_job_type_LDADD = \
1227         libsystemd-core.la \
1228         $(RT_LIBS)
1229
1230 test_ns_SOURCES = \
1231         src/test/test-ns.c
1232
1233 test_ns_CFLAGS = \
1234         $(AM_CFLAGS) \
1235         $(SECCOMP_CFLAGS)
1236
1237 test_ns_LDADD = \
1238         libsystemd-core.la
1239
1240 test_loopback_SOURCES = \
1241         src/test/test-loopback.c
1242
1243 test_loopback_LDADD = \
1244         libsystemd-core.la
1245
1246 test_hostname_SOURCES = \
1247         src/test/test-hostname.c
1248
1249 test_hostname_LDADD = \
1250         libsystemd-core.la
1251
1252 if ENABLE_EFI
1253 manual_tests += \
1254         test-boot-timestamp
1255
1256 test_boot_timestamp_SOURCES = \
1257         src/test/test-boot-timestamps.c
1258
1259 test_boot_timestamp_LDADD = \
1260         libsystemd-shared.la
1261 endif
1262
1263 test_unit_name_SOURCES = \
1264         src/test/test-unit-name.c
1265
1266 test_unit_name_CFLAGS = \
1267         $(AM_CFLAGS) \
1268         $(SECCOMP_CFLAGS)
1269
1270 test_unit_name_LDADD = \
1271         libsystemd-core.la \
1272         $(RT_LIBS)
1273
1274 test_unit_file_SOURCES = \
1275         src/test/test-unit-file.c
1276
1277 test_unit_file_CFLAGS = \
1278         $(AM_CFLAGS) \
1279         $(SECCOMP_CFLAGS)
1280
1281 test_unit_file_LDADD = \
1282         libsystemd-core.la \
1283         $(RT_LIBS)
1284
1285 test_utf8_SOURCES = \
1286         src/test/test-utf8.c
1287
1288 test_utf8_LDADD = \
1289         libsystemd-shared.la
1290
1291 test_util_SOURCES = \
1292         src/test/test-util.c
1293
1294 test_util_LDADD = \
1295         libsystemd-core.la
1296
1297 test_tmpfiles_SOURCES = \
1298         src/test/test-tmpfiles.c
1299
1300 test_tmpfiles_LDADD = \
1301         libsystemd-shared.la
1302
1303 test_namespace_SOURCES = \
1304         src/test/test-namespace.c
1305
1306 test_namespace_LDADD = \
1307         libsystemd-core.la
1308
1309 test_hashmap_SOURCES = \
1310         src/test/test-hashmap.c
1311
1312 test_hashmap_LDADD = \
1313         libsystemd-core.la
1314
1315 test_xml_SOURCES = \
1316         src/test/test-xml.c
1317
1318 test_xml_LDADD = \
1319         libsystemd-shared.la
1320
1321 test_list_SOURCES = \
1322         src/test/test-list.c
1323
1324 test_list_LDADD = \
1325         libsystemd-core.la
1326
1327 test_tables_SOURCES = \
1328         src/test/test-tables.c \
1329         src/shared/test-tables.h
1330
1331 test_tables_CFLAGS = \
1332         $(AM_CFLAGS) \
1333         $(SECCOMP_CFLAGS)
1334
1335 test_tables_LDADD = \
1336         libsystemd-logs.la \
1337         libsystemd-journal-internal.la \
1338         libsystemd-core.la \
1339         $(RT_LIBS)
1340
1341 test_prioq_SOURCES = \
1342         src/test/test-prioq.c
1343
1344 test_prioq_LDADD = \
1345         libsystemd-core.la
1346
1347 test_fileio_SOURCES = \
1348         src/test/test-fileio.c
1349
1350 test_fileio_LDADD = \
1351         libsystemd-core.la
1352
1353 test_time_SOURCES = \
1354         src/test/test-time.c
1355
1356 test_time_LDADD = \
1357         libsystemd-core.la
1358
1359 test_architecture_SOURCES = \
1360         src/test/test-architecture.c
1361
1362 test_architecture_LDADD = \
1363         libsystemd-shared.la
1364
1365 test_log_SOURCES = \
1366         src/test/test-log.c
1367
1368 test_log_LDADD = \
1369         libsystemd-core.la
1370
1371 test_ellipsize_SOURCES = \
1372         src/test/test-ellipsize.c
1373
1374 test_ellipsize_LDADD = \
1375         libsystemd-core.la
1376
1377 test_date_SOURCES = \
1378         src/test/test-date.c
1379
1380 test_date_LDADD = \
1381         libsystemd-core.la
1382
1383 test_sleep_SOURCES = \
1384         src/test/test-sleep.c
1385
1386 test_sleep_LDADD = \
1387         libsystemd-core.la
1388
1389 test_replace_var_SOURCES = \
1390         src/test/test-replace-var.c
1391
1392 test_replace_var_LDADD = \
1393         libsystemd-shared.la
1394
1395 test_calendarspec_SOURCES = \
1396         src/test/test-calendarspec.c
1397
1398 test_calendarspec_LDADD = \
1399         libsystemd-shared.la
1400
1401 test_strip_tab_ansi_SOURCES = \
1402         src/test/test-strip-tab-ansi.c
1403
1404 test_strip_tab_ansi_LDADD = \
1405         libsystemd-shared.la
1406
1407 test_daemon_SOURCES = \
1408         src/test/test-daemon.c
1409
1410 test_daemon_LDADD = \
1411         libsystemd-internal.la \
1412         libsystemd-shared.la
1413
1414 test_cgroup_SOURCES = \
1415         src/test/test-cgroup.c
1416
1417 test_cgroup_LDADD = \
1418         libsystemd-label.la \
1419         libsystemd-shared.la \
1420         libsystemd-internal.la
1421
1422 test_cgroup_mask_SOURCES = \
1423         src/test/test-cgroup-mask.c
1424
1425 test_cgroup_mask_CPPFLAGS = \
1426         $(AM_CPPFLAGS) \
1427         -DTEST_DIR=\"$(abs_top_srcdir)/test\"
1428
1429 test_cgroup_mask_CFLAGS = \
1430         $(AM_CFLAGS) \
1431         $(SECCOMP_CFLAGS)
1432
1433 test_cgroup_mask_LDADD = \
1434         libsystemd-core.la \
1435         $(RT_LIBS)
1436
1437 test_cgroup_util_SOURCES = \
1438         src/test/test-cgroup-util.c
1439
1440 test_cgroup_util_LDADD = \
1441         libsystemd-label.la \
1442         libsystemd-internal.la \
1443         libsystemd-shared.la
1444
1445 test_env_replace_SOURCES = \
1446         src/test/test-env-replace.c
1447
1448 test_env_replace_LDADD = \
1449         libsystemd-shared.la
1450
1451 test_strbuf_SOURCES = \
1452         src/test/test-strbuf.c
1453
1454 test_strbuf_LDADD = \
1455         libsystemd-shared.la
1456
1457 test_strv_SOURCES = \
1458         src/test/test-strv.c
1459
1460 test_strv_LDADD = \
1461         libsystemd-units.la \
1462         libsystemd-internal.la \
1463         libsystemd-shared.la
1464
1465 test_path_util_SOURCES = \
1466         src/test/test-path-util.c
1467
1468 test_path_util_LDADD = \
1469         libsystemd-shared.la
1470
1471 test_strxcpyx_SOURCES = \
1472         src/test/test-strxcpyx.c
1473
1474 test_strxcpyx_LDADD = \
1475         libsystemd-shared.la
1476
1477 test_install_SOURCES = \
1478         src/test/test-install.c
1479
1480 test_install_LDADD = \
1481         libsystemd-units.la \
1482         libsystemd-label.la \
1483         libsystemd-shared.la \
1484         libsystemd-internal.la
1485
1486 test_watchdog_SOURCES = \
1487         src/test/test-watchdog.c
1488
1489 test_watchdog_LDADD = \
1490         libsystemd-shared.la
1491
1492 test_sched_prio_SOURCES = \
1493         src/test/test-sched-prio.c
1494
1495 test_sched_prio_CPPFLAGS = \
1496         $(AM_CPPFLAGS) \
1497         -DTEST_DIR=\"$(abs_top_srcdir)/test\"
1498
1499 test_sched_prio_CFLAGS = \
1500         $(AM_CFLAGS) \
1501         $(SECCOMP_CFLAGS)
1502
1503 test_sched_prio_LDADD = \
1504         libsystemd-core.la \
1505         $(RT_LIBS)
1506
1507 # ------------------------------------------------------------------------------
1508 ## .PHONY so it always rebuilds it
1509 .PHONY: coverage lcov-run lcov-report coverage-sync
1510
1511 # run lcov from scratch, always
1512 coverage:
1513         $(MAKE) lcov-run
1514         $(MAKE) lcov-report
1515
1516 coverage_dir = coverage
1517 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
1518
1519 if ENABLE_COVERAGE
1520 # reset run coverage tests
1521 lcov-run:
1522         @rm -rf $(coverage_dir)
1523         lcov $(coverage_opts) --zerocounters
1524         -$(MAKE) check
1525
1526 # generate report based on current coverage data
1527 lcov-report:
1528         $(MKDIR_P) $(coverage_dir)
1529         lcov $(coverage_opts) --compat-libtool --capture --no-external \
1530                 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
1531         genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov.info
1532         @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
1533
1534 # lcov doesn't work properly with vpath builds, make sure that bad
1535 # output is not uploaded by mistake.
1536 coverage-sync: coverage
1537         test "$(builddir)" = "$(srcdir)"
1538         rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
1539
1540 else
1541 lcov-run lcov-report:
1542         echo "Need to reconfigure with --enable-coverage"
1543 endif
1544
1545 # ------------------------------------------------------------------------------
1546 systemd_analyze_SOURCES = \
1547         src/analyze/analyze.c
1548
1549 systemd_analyze_LDADD = \
1550         libsystemd-internal.la \
1551         libsystemd-shared.la
1552
1553 # ------------------------------------------------------------------------------
1554 systemd_initctl_SOURCES = \
1555         src/initctl/initctl.c
1556
1557 systemd_initctl_LDADD = \
1558         libsystemd-internal.la \
1559         libsystemd-shared.la
1560
1561 # ------------------------------------------------------------------------------
1562 systemd_update_utmp_SOURCES = \
1563         src/update-utmp/update-utmp.c
1564
1565 systemd_update_utmp_CFLAGS = \
1566         $(AM_CFLAGS) \
1567         $(AUDIT_CFLAGS)
1568
1569 systemd_update_utmp_LDADD = \
1570         libsystemd-internal.la \
1571         libsystemd-shared.la \
1572         $(AUDIT_LIBS)
1573
1574 # ------------------------------------------------------------------------------
1575 systemd_shutdownd_SOURCES = \
1576         src/shutdownd/shutdownd.c
1577
1578 systemd_shutdownd_LDADD = \
1579         libsystemd-label.la \
1580         libsystemd-internal.la \
1581         libsystemd-shared.la
1582
1583 dist_doc_DATA += \
1584         src/systemd/sd-shutdown.h
1585
1586 # ------------------------------------------------------------------------------
1587 systemd_shutdown_SOURCES = \
1588         src/core/umount.c \
1589         src/core/umount.h \
1590         src/core/shutdown.c \
1591         src/core/mount-setup.c \
1592         src/core/mount-setup.h \
1593         src/core/killall.h \
1594         src/core/killall.c
1595
1596 systemd_shutdown_LDADD = \
1597         libsystemd-label.la \
1598         libudev-internal.la \
1599         libsystemd-shared.la
1600
1601 # ------------------------------------------------------------------------------
1602 if HAVE_KMOD
1603 systemd_modules_load_SOURCES = \
1604         src/modules-load/modules-load.c
1605
1606 systemd_modules_load_CFLAGS = \
1607         $(AM_CFLAGS) \
1608         $(KMOD_CFLAGS)
1609
1610 systemd_modules_load_LDADD = \
1611         libsystemd-shared.la \
1612         $(KMOD_LIBS)
1613
1614 rootlibexec_PROGRAMS += \
1615         systemd-modules-load
1616
1617 nodist_systemunit_DATA += \
1618         units/systemd-modules-load.service
1619
1620 SYSINIT_TARGET_WANTS += \
1621         systemd-modules-load.service
1622
1623 if ENABLE_TMPFILES
1624 nodist_systemunit_DATA += \
1625         units/kmod-static-nodes.service
1626
1627 SYSINIT_TARGET_WANTS += \
1628         kmod-static-nodes.service
1629 endif
1630 endif
1631
1632 EXTRA_DIST += \
1633         units/systemd-modules-load.service.in \
1634         units/kmod-static-nodes.service.in
1635
1636 # ------------------------------------------------------------------------------
1637 if ENABLE_TMPFILES
1638 systemd_tmpfiles_SOURCES = \
1639         src/tmpfiles/tmpfiles.c
1640
1641 systemd_tmpfiles_LDADD = \
1642         libsystemd-units.la \
1643         libsystemd-label.la \
1644         libsystemd-capability.la \
1645         libsystemd-internal.la \
1646         libsystemd-shared.la
1647
1648 rootbin_PROGRAMS += \
1649         systemd-tmpfiles
1650
1651 dist_systemunit_DATA += \
1652         units/systemd-tmpfiles-clean.timer
1653
1654 nodist_systemunit_DATA += \
1655         units/systemd-tmpfiles-setup-dev.service \
1656         units/systemd-tmpfiles-setup.service \
1657         units/systemd-tmpfiles-clean.service
1658
1659 dist_tmpfiles_DATA = \
1660         tmpfiles.d/systemd.conf \
1661         tmpfiles.d/systemd-nologin.conf \
1662         tmpfiles.d/tmp.conf \
1663         tmpfiles.d/x11.conf
1664
1665 if HAVE_SYSV_COMPAT
1666 dist_tmpfiles_DATA += \
1667         tmpfiles.d/legacy.conf
1668 endif
1669
1670 SYSINIT_TARGET_WANTS += \
1671         systemd-tmpfiles-setup-dev.service \
1672         systemd-tmpfiles-setup.service
1673
1674 dist_zshcompletion_DATA += \
1675         shell-completion/zsh/_systemd-tmpfiles
1676
1677 TIMERS_TARGET_WANTS += \
1678         systemd-tmpfiles-clean.timer
1679
1680 INSTALL_DIRS += \
1681         $(tmpfilesdir) \
1682         $(sysconfdir)/tmpfiles.d
1683 endif
1684
1685 EXTRA_DIST += \
1686         units/systemd-tmpfiles-setup-dev.service.in \
1687         units/systemd-tmpfiles-setup.service.in \
1688         units/systemd-tmpfiles-clean.service.in
1689
1690 # ------------------------------------------------------------------------------
1691 systemd_machine_id_setup_SOURCES = \
1692         src/machine-id-setup/machine-id-setup-main.c \
1693         src/core/machine-id-setup.c \
1694         src/core/machine-id-setup.h
1695
1696 systemd_machine_id_setup_LDADD = \
1697         libsystemd-label.la \
1698         libsystemd-internal.la \
1699         libsystemd-shared.la
1700
1701 # ------------------------------------------------------------------------------
1702 systemd_sysctl_SOURCES = \
1703         src/sysctl/sysctl.c
1704
1705 systemd_sysctl_LDADD = \
1706         libsystemd-shared.la
1707
1708 # ------------------------------------------------------------------------------
1709 systemd_sleep_SOURCES = \
1710         src/sleep/sleep.c
1711
1712 systemd_sleep_LDADD = \
1713         libsystemd-shared.la
1714
1715 # ------------------------------------------------------------------------------
1716 systemd_fsck_SOURCES = \
1717         src/fsck/fsck.c
1718
1719 systemd_fsck_LDADD = \
1720         libsystemd-internal.la \
1721         libudev-internal.la \
1722         libsystemd-shared.la
1723
1724 # ------------------------------------------------------------------------------
1725 systemd_ac_power_SOURCES = \
1726         src/ac-power/ac-power.c
1727
1728 systemd_ac_power_LDADD = \
1729         libudev-internal.la \
1730         libsystemd-shared.la
1731
1732 # ------------------------------------------------------------------------------
1733 systemd_detect_virt_SOURCES = \
1734         src/detect-virt/detect-virt.c
1735
1736 systemd_detect_virt_LDADD = \
1737         libsystemd-shared.la
1738
1739 systemd-detect-virt-install-hook:
1740         -$(SETCAP) cap_dac_override,cap_sys_ptrace=ep $(DESTDIR)$(bindir)/systemd-detect-virt
1741
1742 INSTALL_EXEC_HOOKS += \
1743         systemd-detect-virt-install-hook
1744
1745 # ------------------------------------------------------------------------------
1746 systemd_delta_SOURCES = \
1747         src/delta/delta.c
1748
1749 systemd_delta_LDADD = \
1750         libsystemd-shared.la
1751
1752 # ------------------------------------------------------------------------------
1753 systemd_getty_generator_SOURCES = \
1754         src/getty-generator/getty-generator.c
1755
1756 systemd_getty_generator_LDADD = \
1757         libsystemd-label.la \
1758         libsystemd-shared.la
1759
1760 # ------------------------------------------------------------------------------
1761 systemd_fstab_generator_SOURCES = \
1762         src/fstab-generator/fstab-generator.c \
1763         src/core/mount-setup.c
1764
1765 systemd_fstab_generator_LDADD = \
1766         libsystemd-label.la \
1767         libsystemd-shared.la
1768
1769 # ------------------------------------------------------------------------------
1770 systemd_system_update_generator_SOURCES = \
1771         src/system-update-generator/system-update-generator.c
1772
1773 systemd_system_update_generator_LDADD = \
1774         libsystemd-label.la \
1775         libsystemd-shared.la
1776
1777 if ENABLE_EFI
1778 # ------------------------------------------------------------------------------
1779 systemgenerator_PROGRAMS +=  \
1780         systemd-efi-boot-generator
1781
1782 systemd_efi_boot_generator_SOURCES = \
1783         src/efi-boot-generator/efi-boot-generator.c
1784
1785 systemd_efi_boot_generator_LDADD = \
1786         libsystemd-label.la \
1787         libsystemd-shared.la
1788
1789 # ------------------------------------------------------------------------------
1790 bootctl_SOURCES = \
1791         src/boot/boot.h \
1792         src/boot/boot-loader.h \
1793         src/boot/bootctl.c \
1794         src/boot/boot-loader.c \
1795         src/boot/boot-efi.c
1796
1797 bootctl_LDADD = \
1798         libsystemd-shared.la \
1799         libsystemd-internal.la
1800
1801 bin_PROGRAMS += \
1802         bootctl
1803
1804 dist_bashcompletion_DATA += \
1805         shell-completion/bash/bootctl
1806
1807 dist_zshcompletion_DATA += \
1808         shell-completion/zsh/_bootctl
1809
1810 endif
1811
1812 # ------------------------------------------------------------------------------
1813 if HAVE_BLKID
1814 systemgenerator_PROGRAMS +=  \
1815         systemd-gpt-auto-generator
1816
1817 systemd_gpt_auto_generator_SOURCES = \
1818         src/gpt-auto-generator/gpt-auto-generator.c
1819
1820 systemd_gpt_auto_generator_LDADD = \
1821         libsystemd-label.la \
1822         libsystemd-internal.la \
1823         libudev-internal.la \
1824         libsystemd-shared.la \
1825         $(BLKID_LIBS)
1826
1827 systemd_gpt_auto_generator_CFLAGS = \
1828         $(AM_CFLAGS) \
1829         $(BLKID_CFLAGS)
1830 endif
1831
1832 # ------------------------------------------------------------------------------
1833 if ENABLE_KDBUS
1834 systemgenerator_PROGRAMS +=  \
1835         systemd-dbus1-generator
1836
1837 systemd_dbus1_generator_SOURCES = \
1838         src/dbus1-generator/dbus1-generator.c
1839
1840 systemd_dbus1_generator_LDADD = \
1841         libsystemd-label.la \
1842         libsystemd-shared.la \
1843         libsystemd-internal.la
1844
1845 dbus1-generator-install-hook:
1846         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
1847         $(AM_V_LN)$(LN_S) -f $(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
1848
1849 dbus1-generator-uninstall-hook:
1850         rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
1851
1852 INSTALL_EXEC_HOOKS += dbus1-generator-install-hook
1853 UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook
1854 endif
1855
1856 # ------------------------------------------------------------------------------
1857 systemd_rc_local_generator_SOURCES = \
1858         src/rc-local-generator/rc-local-generator.c
1859
1860 systemd_rc_local_generator_LDADD = \
1861         libsystemd-label.la \
1862         libsystemd-shared.la
1863
1864 # ------------------------------------------------------------------------------
1865 systemd_remount_fs_SOURCES = \
1866         src/remount-fs/remount-fs.c \
1867         src/core/mount-setup.c \
1868         src/core/mount-setup.h
1869
1870 systemd_remount_fs_LDADD = \
1871         libsystemd-label.la \
1872         libsystemd-shared.la
1873
1874 # ------------------------------------------------------------------------------
1875 systemd_cgroups_agent_SOURCES = \
1876         src/cgroups-agent/cgroups-agent.c
1877
1878 systemd_cgroups_agent_LDADD = \
1879         libsystemd-internal.la \
1880         libsystemd-shared.la
1881
1882 # ------------------------------------------------------------------------------
1883 systemctl_SOURCES = \
1884         src/systemctl/systemctl.c
1885
1886 systemctl_LDADD = \
1887         libsystemd-units.la \
1888         libsystemd-label.la \
1889         libsystemd-internal.la \
1890         libsystemd-logs.la \
1891         libsystemd-journal-internal.la \
1892         libsystemd-shared.la
1893
1894 # ------------------------------------------------------------------------------
1895 systemd_notify_SOURCES = \
1896         src/notify/notify.c \
1897         src/readahead/sd-readahead.c
1898
1899 systemd_notify_LDADD = \
1900         libsystemd-internal.la \
1901         libsystemd-shared.la
1902
1903 # ------------------------------------------------------------------------------
1904 systemd_ask_password_SOURCES = \
1905         src/ask-password/ask-password.c
1906
1907 systemd_ask_password_LDADD = \
1908         libsystemd-label.la \
1909         libsystemd-shared.la
1910
1911 # ------------------------------------------------------------------------------
1912 systemd_reply_password_SOURCES = \
1913         src/reply-password/reply-password.c
1914
1915 systemd_reply_password_LDADD = \
1916         libsystemd-shared.la
1917
1918 # ------------------------------------------------------------------------------
1919 systemd_cgls_SOURCES = \
1920         src/cgls/cgls.c
1921
1922 systemd_cgls_LDADD = \
1923         libsystemd-shared.la
1924
1925 # ------------------------------------------------------------------------------
1926 systemd_cgtop_SOURCES = \
1927         src/cgtop/cgtop.c
1928
1929 systemd_cgtop_LDADD = \
1930         libsystemd-shared.la
1931
1932 # ------------------------------------------------------------------------------
1933 systemd_nspawn_SOURCES = \
1934         src/nspawn/nspawn.c \
1935         src/core/mount-setup.c \
1936         src/core/mount-setup.h \
1937         src/core/loopback-setup.c \
1938         src/core/loopback-setup.h
1939
1940 systemd_nspawn_CFLAGS = \
1941         $(AM_CFLAGS) \
1942         $(SECCOMP_CFLAGS)
1943
1944 systemd_nspawn_LDADD = \
1945         libsystemd-label.la \
1946         libsystemd-capability.la \
1947         libsystemd-internal.la \
1948         libudev-internal.la \
1949         libsystemd-shared.la
1950
1951 if HAVE_SECCOMP
1952 systemd_nspawn_LDADD += \
1953         libsystemd-seccomp.la \
1954         $(SECCOMP_LIBS)
1955 endif
1956
1957 # ------------------------------------------------------------------------------
1958 systemd_run_SOURCES = \
1959         src/run/run.c
1960
1961 systemd_run_LDADD = \
1962         libsystemd-label.la \
1963         libsystemd-capability.la \
1964         libsystemd-internal.la \
1965         libsystemd-shared.la
1966
1967 # ------------------------------------------------------------------------------
1968 systemd_bus_proxyd_SOURCES = \
1969         src/bus-proxyd/bus-proxyd.c
1970
1971 systemd_bus_proxyd_LDADD = \
1972         libsystemd-internal.la \
1973         libsystemd-shared.la
1974
1975 bus-proxyd-install-hook:
1976         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir)
1977         $(AM_V_LN)$(LN_S) -f ../lib/systemd/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
1978
1979 bus-proxyd-uninstall-hook:
1980         rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
1981
1982 INSTALL_EXEC_HOOKS += bus-proxyd-install-hook
1983 UNINSTALL_EXEC_HOOKS += bus-proxyd-uninstall-hook
1984
1985 if ENABLE_KDBUS
1986 nodist_systemunit_DATA += \
1987         units/systemd-bus-proxyd@.service
1988
1989 dist_systemunit_DATA += \
1990         units/systemd-bus-proxyd.socket
1991
1992 dist_userunit_DATA += \
1993         units/user/systemd-bus-proxyd.socket \
1994         units/user/systemd-bus-proxyd@.service
1995 endif
1996
1997 EXTRA_DIST += \
1998         units/systemd-bus-proxyd@.service.in
1999
2000 # ------------------------------------------------------------------------------
2001 systemd_tty_ask_password_agent_SOURCES = \
2002         src/tty-ask-password-agent/tty-ask-password-agent.c
2003
2004 systemd_tty_ask_password_agent_LDADD = \
2005         libsystemd-label.la \
2006         libsystemd-shared.la
2007
2008 # ------------------------------------------------------------------------------
2009 libsystemd_internal_la_SOURCES = \
2010         src/systemd/sd-bus.h \
2011         src/systemd/sd-bus-protocol.h \
2012         src/systemd/sd-bus-vtable.h \
2013         src/systemd/sd-memfd.h \
2014         src/systemd/sd-utf8.h \
2015         src/systemd/sd-event.h \
2016         src/systemd/sd-rtnl.h \
2017         src/systemd/sd-resolve.h \
2018         src/systemd/sd-login.h \
2019         src/systemd/sd-id128.h \
2020         src/systemd/sd-daemon.h \
2021         src/libsystemd/sd-bus/sd-bus.c \
2022         src/libsystemd/sd-bus/bus-control.c \
2023         src/libsystemd/sd-bus/bus-control.h \
2024         src/libsystemd/sd-bus/bus-error.c \
2025         src/libsystemd/sd-bus/bus-error.h \
2026         src/libsystemd/sd-bus/bus-internal.c \
2027         src/libsystemd/sd-bus/bus-internal.h \
2028         src/libsystemd/sd-bus/bus-socket.c \
2029         src/libsystemd/sd-bus/bus-socket.h \
2030         src/libsystemd/sd-bus/bus-kernel.c \
2031         src/libsystemd/sd-bus/bus-kernel.h \
2032         src/libsystemd/sd-bus/bus-container.c \
2033         src/libsystemd/sd-bus/bus-container.h \
2034         src/libsystemd/sd-bus/bus-message.c \
2035         src/libsystemd/sd-bus/bus-message.h \
2036         src/libsystemd/sd-bus/bus-creds.c \
2037         src/libsystemd/sd-bus/bus-creds.h \
2038         src/libsystemd/sd-bus/bus-signature.c \
2039         src/libsystemd/sd-bus/bus-signature.h \
2040         src/libsystemd/sd-bus/bus-type.c \
2041         src/libsystemd/sd-bus/bus-type.h \
2042         src/libsystemd/sd-bus/bus-match.c \
2043         src/libsystemd/sd-bus/bus-match.h \
2044         src/libsystemd/sd-bus/bus-bloom.c \
2045         src/libsystemd/sd-bus/bus-bloom.h \
2046         src/libsystemd/sd-bus/bus-introspect.c \
2047         src/libsystemd/sd-bus/bus-introspect.h \
2048         src/libsystemd/sd-bus/bus-objects.c \
2049         src/libsystemd/sd-bus/bus-objects.h \
2050         src/libsystemd/sd-bus/bus-gvariant.c \
2051         src/libsystemd/sd-bus/bus-gvariant.h \
2052         src/libsystemd/sd-bus/bus-convenience.c \
2053         src/libsystemd/sd-bus/bus-util.c \
2054         src/libsystemd/sd-bus/bus-util.h \
2055         src/libsystemd/sd-bus/bus-protocol.h \
2056         src/libsystemd/sd-bus/kdbus.h \
2057         src/libsystemd/sd-bus/sd-memfd.c \
2058         src/libsystemd/sd-utf8/sd-utf8.c \
2059         src/libsystemd/sd-event/sd-event.c \
2060         src/libsystemd/sd-event/event-util.h \
2061         src/libsystemd/sd-rtnl/sd-rtnl.c \
2062         src/libsystemd/sd-rtnl/rtnl-internal.h \
2063         src/libsystemd/sd-rtnl/rtnl-message.c \
2064         src/libsystemd/sd-rtnl/rtnl-util.h \
2065         src/libsystemd/sd-rtnl/rtnl-util.c \
2066         src/libsystemd/sd-resolve/sd-resolve.c \
2067         src/libsystemd/sd-resolve/resolve-util.h \
2068         src/libsystemd/sd-id128/sd-id128.c \
2069         src/libsystemd/sd-daemon/sd-daemon.c \
2070         src/login/sd-login.c \
2071         src/login/login-shared.c \
2072         src/login/login-shared.h
2073
2074 nodist_libsystemd_internal_la_SOURCES = \
2075         src/libsystemd/libsystemd.sym \
2076         src/libsystemd/sd-bus/bus-error-mapping.c
2077
2078 libsystemd_internal_la_CFLAGS = \
2079         $(AM_CFLAGS) \
2080         -pthread
2081
2082 libsystemd_internal_la_LIBADD = \
2083         $(RT_LIBS)
2084
2085 noinst_LTLIBRARIES += \
2086         libsystemd-internal.la
2087
2088 libsystemd_dump_la_SOURCES = \
2089         src/libsystemd/sd-bus/bus-dump.c \
2090         src/libsystemd/sd-bus/bus-dump.h
2091
2092 libsystemd_dump_la_CFLAGS = \
2093         $(AM_CFLAGS) \
2094         $(CAP_CFLAGS)
2095
2096 noinst_LTLIBRARIES += \
2097         libsystemd-dump.la
2098
2099 EXTRA_DIST += \
2100         src/libsystemd/libsystemd.sym.m4 \
2101         src/libsystemd/libsystemd.pc.in \
2102         src/libsystemd/sd-bus/bus-error-mapping.gperf \
2103         src/libsystemd/sd-bus/DIFFERENCES \
2104         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
2105
2106 CLEANFILES += \
2107         src/libsystemd/libsystemd.sym \
2108         src/libsystemd/sd-bus/bus-error-mapping.c
2109
2110 BUILT_SOURCES += \
2111         src/libsystemd/libsystemd.sym
2112
2113 libsystemd_la_SOURCES = \
2114         $(libsystemd_internal_la_SOURCES) \
2115         $(libsystemd_journal_internal_la_SOURCES)
2116
2117 nodist_libsystemd_la_SOURCES = \
2118         $(nodist_libsystemd_internal_la_SOURCES)
2119
2120 libsystemd_la_CFLAGS = \
2121         $(libsystemd_internal_la_CFLAGS) \
2122         $(libsystemd_journal_internal_la_CFLAGS)
2123
2124 libsystemd_la_LDFLAGS = \
2125         $(AM_LDFLAGS) \
2126         -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
2127         -Wl,--version-script=$(top_builddir)/src/libsystemd/libsystemd.sym
2128
2129 libsystemd_la_LIBADD = \
2130         libsystemd-shared.la \
2131         $(libsystemd_journal_internal_la_LIBADD) \
2132         $(RT_LIBS) \
2133         -lresolv
2134
2135 libsystemd-install-hook:
2136         libname=libsystemd.so && $(move-to-rootlibdir)
2137
2138 libsystemd-uninstall-hook:
2139         rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
2140
2141 INSTALL_EXEC_HOOKS += libsystemd-install-hook
2142 UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
2143
2144 pkgconfiglib_DATA += \
2145         src/libsystemd/libsystemd.pc
2146
2147 pkginclude_HEADERS += \
2148         src/systemd/sd-login.h \
2149         src/systemd/sd-id128.h \
2150         src/systemd/sd-daemon.h
2151
2152 if ENABLE_KDBUS
2153 pkginclude_HEADERS += \
2154         src/systemd/sd-bus.h \
2155         src/systemd/sd-bus-protocol.h \
2156         src/systemd/sd-bus-vtable.h \
2157         src/systemd/sd-memfd.h \
2158         src/systemd/sd-utf8.h \
2159         src/systemd/sd-event.h \
2160         src/systemd/sd-rtnl.h \
2161         src/systemd/sd-resolve.h
2162 endif
2163
2164 lib_LTLIBRARIES += \
2165         libsystemd.la
2166
2167 tests += \
2168         test-bus-marshal \
2169         test-bus-signature \
2170         test-bus-chat \
2171         test-bus-cleanup \
2172         test-bus-server \
2173         test-bus-match \
2174         test-bus-kernel \
2175         test-bus-kernel-bloom \
2176         test-bus-kernel-benchmark \
2177         test-bus-memfd \
2178         test-bus-zero-copy \
2179         test-bus-introspect \
2180         test-bus-objects \
2181         test-bus-error \
2182         test-bus-creds \
2183         test-bus-gvariant \
2184         test-event \
2185         test-rtnl \
2186         test-resolve
2187
2188 bin_PROGRAMS += \
2189         busctl
2190
2191 test_bus_marshal_SOURCES = \
2192         src/libsystemd/sd-bus/test-bus-marshal.c
2193
2194 test_bus_marshal_LDADD = \
2195         libsystemd-internal.la \
2196         libsystemd-shared.la \
2197         libsystemd-dump.la \
2198         libsystemd-capability.la \
2199         $(GLIB_LIBS) \
2200         $(DBUS_LIBS) \
2201         $(CAP_LIBS)
2202
2203 test_bus_marshal_CFLAGS = \
2204         $(AM_CFLAGS) \
2205         $(GLIB_CFLAGS) \
2206         $(DBUS_CFLAGS) \
2207         $(CAP_CFLAGS)
2208
2209 test_bus_signature_SOURCES = \
2210         src/libsystemd/sd-bus/test-bus-signature.c
2211
2212 test_bus_signature_LDADD = \
2213         libsystemd-shared.la \
2214         libsystemd-internal.la
2215
2216 test_bus_chat_SOURCES = \
2217         src/libsystemd/sd-bus/test-bus-chat.c
2218
2219 test_bus_chat_CFLAGS = \
2220         $(AM_CFLAGS) \
2221         -pthread
2222
2223 test_bus_chat_LDADD = \
2224         libsystemd-internal.la \
2225         libsystemd-shared.la
2226
2227 test_bus_cleanup_SOURCES = \
2228         src/libsystemd/sd-bus/test-bus-cleanup.c
2229
2230 test_bus_cleanup_CFLAGS = \
2231         $(AM_CFLAGS) \
2232         $(SECCOMP_CFLAGS)
2233
2234 test_bus_cleanup_LDADD = \
2235         libsystemd-internal.la \
2236         libsystemd-shared.la
2237
2238 test_bus_server_SOURCES = \
2239         src/libsystemd/sd-bus/test-bus-server.c
2240
2241 test_bus_server_CFLAGS = \
2242         $(AM_CFLAGS) \
2243         -pthread
2244
2245 test_bus_server_LDADD = \
2246         libsystemd-internal.la \
2247         libsystemd-shared.la
2248
2249 test_bus_objects_SOURCES = \
2250         src/libsystemd/sd-bus/test-bus-objects.c
2251
2252 test_bus_objects_CFLAGS = \
2253         $(AM_CFLAGS) \
2254         $(CAP_CFLAGS) \
2255         -pthread
2256
2257 test_bus_objects_LDADD = \
2258         libsystemd-internal.la \
2259         libsystemd-shared.la \
2260         libsystemd-dump.la \
2261         libsystemd-capability.la \
2262         $(CAP_LIBS)
2263
2264 test_bus_error_SOURCES = \
2265         src/libsystemd/sd-bus/test-bus-error.c
2266
2267 test_bus_error_LDADD = \
2268         libsystemd-internal.la \
2269         libsystemd-shared.la
2270
2271 test_bus_gvariant_SOURCES = \
2272         src/libsystemd/sd-bus/test-bus-gvariant.c
2273
2274 test_bus_gvariant_LDADD = \
2275         libsystemd-internal.la \
2276         libsystemd-shared.la \
2277         libsystemd-dump.la \
2278         libsystemd-capability.la \
2279         $(GLIB_LIBS) \
2280         $(CAP_LIBS)
2281
2282 test_bus_gvariant_CFLAGS = \
2283         $(AM_CFLAGS) \
2284         $(GLIB_CFLAGS)
2285         $(CAP_CFLAGS)
2286
2287 test_bus_creds_SOURCES = \
2288         src/libsystemd/sd-bus/test-bus-creds.c
2289
2290 test_bus_creds_LDADD = \
2291         libsystemd-internal.la \
2292         libsystemd-shared.la \
2293         libsystemd-dump.la \
2294         libsystemd-capability.la
2295
2296 test_bus_match_SOURCES = \
2297         src/libsystemd/sd-bus/test-bus-match.c
2298
2299 test_bus_match_LDADD = \
2300         libsystemd-internal.la \
2301         libsystemd-shared.la
2302
2303 test_bus_kernel_SOURCES = \
2304         src/libsystemd/sd-bus/test-bus-kernel.c
2305
2306 test_bus_kernel_LDADD = \
2307         libsystemd-internal.la \
2308         libsystemd-shared.la \
2309         libsystemd-dump.la \
2310         libsystemd-capability.la \
2311         $(CAP_LIBS)
2312
2313 test_bus_kernel_CFLAGS = \
2314         $(AM_CFLAGS) \
2315         $(CAP_CFLAGS)
2316
2317 test_bus_kernel_bloom_SOURCES = \
2318         src/libsystemd/sd-bus/test-bus-kernel-bloom.c
2319
2320 test_bus_kernel_bloom_LDADD = \
2321         libsystemd-internal.la \
2322         libsystemd-shared.la
2323
2324 test_bus_kernel_benchmark_SOURCES = \
2325         src/libsystemd/sd-bus/test-bus-kernel-benchmark.c
2326
2327 test_bus_kernel_benchmark_LDADD = \
2328         libsystemd-internal.la \
2329         libsystemd-shared.la
2330
2331 test_bus_memfd_SOURCES = \
2332         src/libsystemd/sd-bus/test-bus-memfd.c
2333
2334 test_bus_memfd_LDADD = \
2335         libsystemd-internal.la \
2336         libsystemd-shared.la
2337
2338 test_bus_zero_copy_SOURCES = \
2339         src/libsystemd/sd-bus/test-bus-zero-copy.c
2340
2341 test_bus_zero_copy_LDADD = \
2342         libsystemd-internal.la \
2343         libsystemd-shared.la \
2344         libsystemd-dump.la \
2345         libsystemd-capability.la \
2346         $(CAP_LIBS)
2347
2348 test_bus_zero_copy_CFLAGS = \
2349         $(AM_CFLAGS) \
2350         $(CAP_CFLAGS)
2351
2352 test_bus_introspect_SOURCES = \
2353         src/libsystemd/sd-bus/test-bus-introspect.c
2354
2355 test_bus_introspect_LDADD = \
2356         libsystemd-internal.la \
2357         libsystemd-shared.la
2358
2359 test_event_SOURCES = \
2360         src/libsystemd/sd-event/test-event.c
2361
2362 test_event_LDADD = \
2363         libsystemd-internal.la \
2364         libsystemd-shared.la
2365
2366 test_rtnl_SOURCES = \
2367         src/libsystemd/sd-rtnl/test-rtnl.c
2368
2369 test_rtnl_LDADD = \
2370         libsystemd-internal.la \
2371         libsystemd-shared.la
2372
2373 test_resolve_SOURCES = \
2374         src/systemd/sd-resolve.h \
2375         src/libsystemd/sd-resolve/test-resolve.c
2376
2377 test_resolve_LDADD = \
2378         libsystemd-internal.la \
2379         libsystemd-shared.la \
2380         -lresolv
2381
2382 test_resolve_CFLAGS = \
2383         $(AM_CFLAGS) \
2384         -pthread
2385
2386 busctl_SOURCES = \
2387         src/libsystemd/sd-bus/busctl.c
2388
2389 busctl_LDADD = \
2390         libsystemd-internal.la \
2391         libsystemd-shared.la \
2392         libsystemd-dump.la \
2393         libsystemd-capability.la \
2394         $(CAP_LIBS)
2395
2396 busctl_CFLAGS = \
2397         $(AM_CFLAGS) \
2398         $(CAP_CFLAGS)
2399
2400 # ------------------------------------------------------------------------------
2401 noinst_LTLIBRARIES += \
2402         libsystemd-network.la
2403
2404 libsystemd_network_la_SOURCES = \
2405         src/systemd/sd-network.h \
2406         src/systemd/sd-dhcp-client.h \
2407         src/systemd/sd-dhcp-lease.h \
2408         src/network/sd-network.c \
2409         src/libsystemd-network/sd-dhcp-client.c \
2410         src/libsystemd-network/dhcp-network.c \
2411         src/libsystemd-network/dhcp-option.c \
2412         src/libsystemd-network/dhcp-packet.c \
2413         src/libsystemd-network/dhcp-internal.h \
2414         src/libsystemd-network/dhcp-protocol.h \
2415         src/libsystemd-network/dhcp-lease-internal.h \
2416         src/libsystemd-network/sd-dhcp-lease.c
2417
2418 libsystemd_network_la_LIBADD = \
2419         libsystemd-internal.la \
2420         libsystemd-shared.la
2421
2422 test_dhcp_option_SOURCES = \
2423         src/libsystemd-network/dhcp-protocol.h \
2424         src/libsystemd-network/dhcp-internal.h \
2425         src/libsystemd-network/test-dhcp-option.c
2426
2427 test_dhcp_option_LDADD = \
2428         libsystemd-network.la \
2429         libsystemd-internal.la \
2430         libsystemd-shared.la
2431
2432 test_dhcp_client_SOURCES = \
2433         src/systemd/sd-dhcp-client.h \
2434         src/libsystemd-network/dhcp-protocol.h \
2435         src/libsystemd-network/dhcp-internal.h \
2436         src/libsystemd-network/test-dhcp-client.c
2437
2438 test_dhcp_client_LDADD = \
2439         libsystemd-network.la \
2440         libsystemd-internal.la \
2441         libsystemd-shared.la
2442
2443 tests += \
2444         test-dhcp-option \
2445         test-dhcp-client
2446
2447 # ------------------------------------------------------------------------------
2448 if ENABLE_GTK_DOC
2449 SUBDIRS += \
2450         docs/libudev
2451
2452 noinst_DATA += \
2453         docs/html/libudev \
2454         docs/html/gudev
2455 endif
2456
2457 include_HEADERS += \
2458         src/libudev/libudev.h
2459
2460 lib_LTLIBRARIES += \
2461         libudev.la
2462
2463 libudev_la_SOURCES =\
2464         src/libudev/libudev.sym \
2465         src/libudev/libudev-private.h \
2466         src/libudev/libudev.c \
2467         src/libudev/libudev-list.c \
2468         src/libudev/libudev-util.c \
2469         src/libudev/libudev-device.c \
2470         src/libudev/libudev-enumerate.c \
2471         src/libudev/libudev-monitor.c \
2472         src/libudev/libudev-queue.c \
2473         src/libudev/libudev-hwdb-def.h \
2474         src/libudev/libudev-hwdb.c
2475
2476 libudev_la_CFLAGS = \
2477         $(AM_CFLAGS) \
2478         -fvisibility=hidden
2479
2480 libudev_la_LDFLAGS = \
2481         $(AM_LDFLAGS) \
2482         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
2483         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
2484
2485 libudev_la_LIBADD = \
2486         libsystemd-internal.la \
2487         libsystemd-shared.la
2488
2489 pkgconfiglib_DATA += \
2490         src/libudev/libudev.pc
2491
2492 EXTRA_DIST += \
2493         src/libudev/libudev.pc.in
2494
2495 CLEANFILES += \
2496         src/libudev/libudev.pc \
2497         docs/html/libudev \
2498         docs/html/gudev
2499
2500 docs/html/libudev:
2501         $(AM_V_at)$(MKDIR_P) $(dir $@)
2502         $(AM_V_LN)$(LN_S) -f ../libudev/html $@
2503
2504 docs/html/gudev:
2505         $(AM_V_at)$(MKDIR_P) $(dir $@)
2506         $(AM_V_LN)$(LN_S) -f ../gudev/html $@
2507
2508 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2509 libudev-install-hook:
2510         libname=libudev.so && $(move-to-rootlibdir)
2511
2512 libudev-uninstall-hook:
2513         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
2514
2515 INSTALL_EXEC_HOOKS += libudev-install-hook
2516 UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
2517
2518 # ------------------------------------------------------------------------------
2519 noinst_LTLIBRARIES += \
2520         libudev-internal.la
2521
2522 libudev_internal_la_SOURCES =\
2523         $(libudev_la_SOURCES) \
2524         src/libudev/libudev-device-private.c \
2525         src/libudev/libudev-queue-private.c
2526
2527 libudev_internal_la_CFLAGS = \
2528         $(AM_CFLAGS) \
2529         -fvisibility=default
2530
2531 # ------------------------------------------------------------------------------
2532 INSTALL_DIRS += \
2533         $(sysconfdir)/udev/rules.d \
2534         $(sysconfdir)/udev/hwdb.d
2535
2536 dist_network_DATA = \
2537         network/99-default.link \
2538         network/80-container-host0.network
2539
2540 dist_udevrules_DATA += \
2541         rules/99-systemd.rules \
2542         rules/42-usb-hid-pm.rules \
2543         rules/50-udev-default.rules \
2544         rules/60-drm.rules \
2545         rules/60-keyboard.rules \
2546         rules/60-persistent-storage-tape.rules \
2547         rules/60-persistent-serial.rules \
2548         rules/60-persistent-input.rules \
2549         rules/60-persistent-alsa.rules \
2550         rules/60-persistent-storage.rules \
2551         rules/64-btrfs.rules \
2552         rules/75-net-description.rules \
2553         rules/75-tty-description.rules \
2554         rules/78-sound-card.rules \
2555         rules/80-net-setup-link.rules \
2556         rules/95-udev-late.rules
2557
2558 dist_udevhwdb_DATA = \
2559         hwdb/20-pci-vendor-model.hwdb \
2560         hwdb/20-pci-classes.hwdb \
2561         hwdb/20-usb-vendor-model.hwdb \
2562         hwdb/20-usb-classes.hwdb \
2563         hwdb/20-sdio-vendor-model.hwdb \
2564         hwdb/20-sdio-classes.hwdb \
2565         hwdb/20-bluetooth-vendor-product.hwdb \
2566         hwdb/20-acpi-vendor.hwdb \
2567         hwdb/20-OUI.hwdb \
2568         hwdb/20-net-ifname.hwdb \
2569         hwdb/60-keyboard.hwdb
2570
2571 udevconfdir = $(sysconfdir)/udev
2572 dist_udevconf_DATA = \
2573         src/udev/udev.conf
2574
2575 sharepkgconfigdir = $(datadir)/pkgconfig
2576 sharepkgconfig_DATA = \
2577         src/udev/udev.pc
2578
2579 EXTRA_DIST += \
2580         rules/99-systemd.rules.in \
2581         src/udev/udev.pc.in
2582
2583 CLEANFILES += \
2584         rules/99-systemd.rules \
2585         src/udev/udev.pc
2586
2587 EXTRA_DIST += \
2588         units/systemd-udevd.service.in \
2589         units/systemd-udev-trigger.service.in \
2590         units/systemd-udev-settle.service.in
2591
2592 CLEANFILES += \
2593         units/systemd-udevd.service \
2594         units/systemd-udev-trigger.service \
2595         units/systemd-udev-settle.service
2596
2597 SOCKETS_TARGET_WANTS += \
2598         systemd-udevd-control.socket \
2599         systemd-udevd-kernel.socket
2600 SYSINIT_TARGET_WANTS += \
2601         systemd-udevd.service \
2602         systemd-udev-trigger.service
2603
2604 rootbin_PROGRAMS += \
2605         udevadm
2606
2607 rootlibexec_PROGRAMS += \
2608         systemd-udevd
2609
2610 noinst_LTLIBRARIES += \
2611         libudev-core.la
2612
2613 src/udev/keyboard-keys.txt:
2614         $(AM_V_at)$(MKDIR_P) $(dir $@)
2615         $(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/' > $@
2616
2617 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt
2618         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
2619
2620 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
2621         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
2622
2623 src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt
2624         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
2625
2626 libudev_core_la_SOURCES = \
2627         src/udev/udev.h \
2628         src/udev/udev-event.c \
2629         src/udev/udev-watch.c \
2630         src/udev/udev-node.c \
2631         src/udev/udev-rules.c \
2632         src/udev/udev-ctrl.c \
2633         src/udev/udev-builtin.c \
2634         src/udev/udev-builtin-btrfs.c \
2635         src/udev/udev-builtin-hwdb.c \
2636         src/udev/udev-builtin-input_id.c \
2637         src/udev/udev-builtin-keyboard.c \
2638         src/udev/udev-builtin-net_id.c \
2639         src/udev/udev-builtin-net_setup_link.c \
2640         src/udev/udev-builtin-path_id.c \
2641         src/udev/udev-builtin-usb_id.c \
2642         src/udev/net/link-config.h \
2643         src/udev/net/link-config.c \
2644         src/udev/net/ethtool-util.h \
2645         src/udev/net/ethtool-util.c
2646
2647 nodist_libudev_core_la_SOURCES = \
2648         src/udev/keyboard-keys-from-name.h \
2649         src/udev/keyboard-keys-to-name.h \
2650         src/udev/net/link-config-gperf.c
2651
2652 BUILT_SOURCES += \
2653         $(nodist_libudev_core_la_SOURCES)
2654
2655 CLEANFILES += \
2656         src/udev/keyboard-keys-from-name.gperf \
2657         src/udev/keyboard-keys.txt \
2658         src/udev/net/link-config-gperf.c
2659
2660 EXTRA_DIST += \
2661         src/udev/net/link-config-gperf.gperf
2662
2663 libudev_core_la_CFLAGS = \
2664         $(AM_CFLAGS) \
2665         $(BLKID_CFLAGS) \
2666         $(KMOD_CFLAGS)
2667
2668 libudev_core_la_LIBADD = \
2669         libudev-internal.la \
2670         libsystemd-label.la \
2671         libsystemd-internal.la \
2672         libsystemd-shared.la \
2673         $(BLKID_LIBS) \
2674         $(KMOD_LIBS)
2675
2676 libudev_core_la_CPPFLAGS = \
2677         $(AM_CPPFLAGS) \
2678         -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
2679
2680 if ENABLE_FIRMWARE
2681 libudev_core_la_SOURCES += \
2682         src/udev/udev-builtin-firmware.c
2683
2684 dist_udevrules_DATA += \
2685         rules/50-firmware.rules
2686 endif
2687
2688 if HAVE_KMOD
2689 libudev_core_la_SOURCES += \
2690         src/udev/udev-builtin-kmod.c
2691
2692 dist_udevrules_DATA += \
2693         rules/80-drivers.rules
2694 endif
2695
2696 if HAVE_BLKID
2697 libudev_core_la_SOURCES += \
2698         src/udev/udev-builtin-blkid.c
2699 endif
2700
2701 if HAVE_ACL
2702 libudev_core_la_SOURCES += \
2703         src/udev/udev-builtin-uaccess.c \
2704         src/login/logind-acl.c \
2705         src/login/sd-login.c \
2706         src/systemd/sd-login.h \
2707         src/login/login-shared.c \
2708         src/login/login-shared.h
2709
2710 libudev_core_la_LIBADD += \
2711         libsystemd-acl.la
2712 endif
2713
2714 systemd_udevd_SOURCES = \
2715         src/udev/udevd.c
2716
2717 systemd_udevd_LDADD = \
2718         libudev-core.la
2719
2720 udevadm_SOURCES = \
2721         src/udev/udevadm.c \
2722         src/udev/udevadm-info.c \
2723         src/udev/udevadm-control.c \
2724         src/udev/udevadm-monitor.c \
2725         src/udev/udevadm-hwdb.c \
2726         src/udev/udevadm-settle.c \
2727         src/udev/udevadm-trigger.c \
2728         src/udev/udevadm-test.c \
2729         src/udev/udevadm-test-builtin.c
2730
2731 udevadm_LDADD = \
2732         libudev-core.la
2733
2734 # Update hwdb on installation. Do not bother if installing
2735 # in DESTDIR, since this is likely for packaging purposes.
2736 hwdb-update-hook:
2737         -test -n "$(DESTDIR)" || $(rootbindir)/udevadm hwdb --update
2738
2739 INSTALL_DATA_HOOKS += \
2740         hwdb-update-hook
2741
2742 hwdb-remove-hook:
2743         -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
2744
2745 # ------------------------------------------------------------------------------
2746 TESTS += \
2747         test/udev-test.pl \
2748         test/rules-test.sh
2749
2750 manual_tests += \
2751         test-libudev \
2752         test-udev
2753
2754 test_libudev_SOURCES = \
2755         src/test/test-libudev.c
2756
2757 test_libudev_LDADD = \
2758         libsystemd-label.la \
2759         libudev-internal.la \
2760         libsystemd-shared.la
2761
2762 test_udev_SOURCES = \
2763         src/test/test-udev.c
2764
2765 test_udev_LDADD = \
2766         libudev-core.la \
2767         $(BLKID_LIBS) \
2768         $(KMOD_LIBS) \
2769         $(SELINUX_LIBS)
2770
2771 if HAVE_ACL
2772 test_udev_LDADD += \
2773         libsystemd-acl.la
2774 endif
2775
2776 check_DATA += \
2777         test/sys
2778
2779 # packed sysfs test tree
2780 test/sys:
2781         $(AM_V_at)$(MKDIR_P) $(dir $@)
2782         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
2783
2784 test-sys-distclean:
2785         -rm -rf test/sys
2786 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
2787
2788 EXTRA_DIST += \
2789         test/sys.tar.xz \
2790         test/udev-test.pl \
2791         test/rules-test.sh \
2792         test/rule-syntax-check.py
2793
2794 # ------------------------------------------------------------------------------
2795 ata_id_SOURCES = \
2796         src/udev/ata_id/ata_id.c
2797
2798 ata_id_LDADD = \
2799         libudev-internal.la \
2800         libsystemd-shared.la
2801
2802 udevlibexec_PROGRAMS += \
2803         ata_id
2804
2805 # ------------------------------------------------------------------------------
2806 cdrom_id_SOURCES = \
2807         src/udev/cdrom_id/cdrom_id.c
2808
2809 cdrom_id_LDADD = \
2810         libudev-internal.la \
2811         libsystemd-shared.la
2812
2813 udevlibexec_PROGRAMS += \
2814         cdrom_id
2815
2816 dist_udevrules_DATA += \
2817         rules/60-cdrom_id.rules
2818
2819 # ------------------------------------------------------------------------------
2820 collect_SOURCES = \
2821         src/udev/collect/collect.c
2822
2823 collect_LDADD = \
2824         libudev-internal.la \
2825         libsystemd-shared.la
2826
2827 udevlibexec_PROGRAMS += \
2828         collect
2829
2830 # ------------------------------------------------------------------------------
2831 scsi_id_SOURCES =\
2832         src/udev/scsi_id/scsi_id.c \
2833         src/udev/scsi_id/scsi_serial.c \
2834         src/udev/scsi_id/scsi.h \
2835         src/udev/scsi_id/scsi_id.h
2836
2837 scsi_id_LDADD = \
2838         libudev-internal.la \
2839         libsystemd-shared.la
2840
2841 udevlibexec_PROGRAMS += \
2842         scsi_id
2843
2844 EXTRA_DIST += \
2845         src/udev/scsi_id/README
2846
2847 # ------------------------------------------------------------------------------
2848 v4l_id_SOURCES = \
2849         src/udev/v4l_id/v4l_id.c
2850
2851 v4l_id_LDADD = \
2852         libudev-internal.la
2853
2854 udevlibexec_PROGRAMS += \
2855         v4l_id
2856
2857 dist_udevrules_DATA += \
2858         rules/60-persistent-v4l.rules
2859
2860 # ------------------------------------------------------------------------------
2861 accelerometer_SOURCES = \
2862         src/udev/accelerometer/accelerometer.c
2863
2864 accelerometer_LDADD = \
2865         libudev-internal.la -lm \
2866         libsystemd-shared.la
2867
2868 udevlibexec_PROGRAMS += \
2869         accelerometer
2870
2871 dist_udevrules_DATA += \
2872         rules/61-accelerometer.rules
2873
2874 # ------------------------------------------------------------------------------
2875 if ENABLE_GUDEV
2876 if ENABLE_GTK_DOC
2877 SUBDIRS += \
2878         docs/gudev
2879 endif
2880
2881 libgudev_includedir = \
2882         $(includedir)/gudev-1.0/gudev
2883
2884 libgudev_include_HEADERS = \
2885         src/gudev/gudev.h \
2886         src/gudev/gudevenums.h \
2887         src/gudev/gudevenumtypes.h \
2888         src/gudev/gudevtypes.h \
2889         src/gudev/gudevclient.h \
2890         src/gudev/gudevdevice.h \
2891         src/gudev/gudevenumerator.h
2892
2893 lib_LTLIBRARIES += libgudev-1.0.la
2894
2895 pkgconfiglib_DATA += \
2896         src/gudev/gudev-1.0.pc
2897
2898 CLEANFILES += \
2899         src/gudev/gudev-1.0.pc
2900
2901 libgudev_1_0_la_SOURCES = \
2902         src/gudev/gudevenums.h \
2903         src/gudev/gudevenumtypes.h \
2904         src/gudev/gudevenumtypes.h\
2905         src/gudev/gudevtypes.h \
2906         src/gudev/gudevclient.h \
2907         src/gudev/gudevclient.c \
2908         src/gudev/gudevdevice.h \
2909         src/gudev/gudevdevice.c \
2910         src/gudev/gudevenumerator.h \
2911         src/gudev/gudevenumerator.c \
2912         src/gudev/gudevprivate.h
2913
2914 nodist_libgudev_1_0_la_SOURCES = \
2915         src/gudev/gudevmarshal.h \
2916         src/gudev/gudevmarshal.c \
2917         src/gudev/gudevenumtypes.h \
2918         src/gudev/gudevenumtypes.c
2919
2920 BUILT_SOURCES += \
2921         $(nodist_libgudev_1_0_la_SOURCES)
2922
2923 libgudev_1_0_la_CPPFLAGS = \
2924         $(AM_CPPFLAGS) \
2925         -I$(top_builddir)/src\
2926         -I$(top_srcdir)/src\
2927         -I$(top_builddir)/src/gudev \
2928         -I$(top_srcdir)/src/gudev \
2929         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
2930         -D_GUDEV_COMPILATION \
2931         -DG_LOG_DOMAIN=\"GUdev\"
2932
2933 libgudev_1_0_la_CFLAGS = \
2934         $(AM_CFLAGS) \
2935         -fvisibility=default \
2936         $(GLIB_CFLAGS)
2937
2938 libgudev_1_0_la_LIBADD = \
2939         libudev.la \
2940         $(GLIB_LIBS)
2941
2942 libgudev_1_0_la_LDFLAGS = \
2943         $(AM_LDFLAGS) \
2944         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
2945         -export-dynamic -no-undefined \
2946         -export-symbols-regex '^g_udev_.*'
2947
2948 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
2949         $(AM_V_at)$(MKDIR_P) $(dir $@)
2950         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
2951
2952 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
2953         $(AM_V_at)$(MKDIR_P) $(dir $@)
2954         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
2955         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
2956
2957 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
2958         $(AM_V_at)$(MKDIR_P) $(dir $@)
2959         $(AM_V_GEN)glib-mkenums --template $^ > $@
2960
2961 if HAVE_INTROSPECTION
2962 -include $(INTROSPECTION_MAKEFILE)
2963
2964 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
2965
2966 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
2967
2968 src_gudev_GUdev_1_0_gir_CFLAGS = \
2969         $(AM_CFLAGS) \
2970         $(INCLUDES) \
2971         -D_GUDEV_COMPILATION \
2972         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
2973         -I$(top_srcdir)/src \
2974         -I$(top_builddir)/src \
2975         -I$(top_srcdir)/src/gudev \
2976         -I$(top_builddir)/src/gudev
2977
2978 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
2979
2980 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
2981         --pkg-export=gudev-1.0 \
2982         --warn-all
2983
2984 src_gudev_GUdev_1_0_gir_FILES = \
2985         src/gudev/gudev.h \
2986         src/gudev/gudevtypes.h \
2987         src/gudev/gudevenums.h \
2988         src/gudev/gudevenumtypes.h \
2989         src/gudev/gudevclient.h \
2990         src/gudev/gudevdevice.h \
2991         src/gudev/gudevenumerator.h \
2992         src/gudev/gudevclient.c \
2993         src/gudev/gudevdevice.c \
2994         src/gudev/gudevenumerator.c
2995
2996 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
2997 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
2998
2999 girdir = $(datadir)/gir-1.0
3000 gir_DATA = \
3001         src/gudev/GUdev-1.0.gir
3002
3003 typelibsdir = $(libdir)/girepository-1.0
3004 typelibs_DATA = \
3005         src/gudev/GUdev-1.0.typelib
3006
3007 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
3008 endif # HAVE_INTROSPECTION
3009
3010 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
3011 libgudev-install-hook:
3012         libname=libgudev-1.0.so && $(move-to-rootlibdir)
3013
3014 libgudev-uninstall-hook:
3015         rm -f $(DESTDIR)$(rootlibdir)/libgudev-1.0.so*
3016
3017 INSTALL_EXEC_HOOKS += libgudev-install-hook
3018 UNINSTALL_EXEC_HOOKS += libgudev-uninstall-hook
3019 endif
3020
3021 EXTRA_DIST += \
3022         src/gudev/gudev-1.0.pc.in \
3023         src/gudev/gudevmarshal.list \
3024         src/gudev/gudevenumtypes.h.template \
3025         src/gudev/gudevenumtypes.c.template \
3026         src/gudev/gjs-example.js \
3027         src/gudev/seed-example-enum.js \
3028         src/gudev/seed-example.js
3029
3030 # ------------------------------------------------------------------------------
3031 mtd_probe_SOURCES =  \
3032         src/udev/mtd_probe/mtd_probe.c \
3033         src/udev/mtd_probe/mtd_probe.h \
3034         src/udev/mtd_probe/probe_smartmedia.c
3035
3036 dist_udevrules_DATA += \
3037         rules/75-probe_mtd.rules
3038
3039 udevlibexec_PROGRAMS += \
3040         mtd_probe
3041
3042 # ------------------------------------------------------------------------------
3043 test_id128_SOURCES = \
3044         src/test/test-id128.c
3045
3046 test_id128_LDADD = \
3047         libsystemd-internal.la \
3048         libsystemd-shared.la
3049
3050 tests += \
3051         test-id128
3052
3053 # ------------------------------------------------------------------------------
3054
3055 rootlibexec_PROGRAMS += \
3056         systemd-activate
3057
3058 systemd_activate_SOURCES = \
3059         src/activate/activate.c
3060
3061 systemd_activate_LDADD = \
3062         libsystemd-label.la \
3063         libsystemd-internal.la \
3064         libsystemd-shared.la
3065
3066 # ------------------------------------------------------------------------------
3067 systemd_journald_SOURCES = \
3068         src/journal/journald.c \
3069         src/journal/journald-server.h
3070
3071 systemd_journald_LDADD = \
3072         libsystemd-journal-core.la \
3073         libsystemd-internal.la \
3074         libsystemd-shared.la
3075
3076 systemd_cat_SOURCES = \
3077         src/journal/cat.c
3078
3079 systemd_cat_LDADD = \
3080         libsystemd-journal-core.la
3081
3082 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
3083 journalctl_CFLAGS = \
3084         $(AM_CFLAGS)
3085
3086 journalctl_SOURCES = \
3087         src/journal/journalctl.c
3088
3089 journalctl_LDADD = \
3090         libsystemd-journal-internal.la \
3091         libsystemd-internal.la \
3092         libsystemd-logs.la \
3093         libsystemd-shared.la
3094
3095 if HAVE_ACL
3096 journalctl_LDADD += \
3097         libsystemd-acl.la
3098 endif
3099
3100 if HAVE_QRENCODE
3101 journalctl_SOURCES += \
3102         src/journal/journal-qrcode.c \
3103         src/journal/journal-qrcode.h
3104
3105 journalctl_CFLAGS += \
3106         $(QRENCODE_CFLAGS)
3107
3108 journalctl_LDADD += \
3109         $(QRENCODE_LIBS)
3110 endif
3111
3112 test_journal_SOURCES = \
3113         src/journal/test-journal.c
3114
3115 test_journal_LDADD = \
3116         libsystemd-journal-core.la
3117
3118 test_journal_send_SOURCES = \
3119         src/journal/test-journal-send.c
3120
3121 test_journal_send_LDADD = \
3122         libsystemd-journal-core.la
3123
3124 test_journal_syslog_SOURCES = \
3125         src/journal/test-journal-syslog.c
3126
3127 test_journal_syslog_LDADD = \
3128         libsystemd-journal-core.la
3129
3130 test_journal_match_SOURCES = \
3131         src/journal/test-journal-match.c
3132
3133 test_journal_match_LDADD = \
3134         libsystemd-journal-core.la
3135
3136 test_journal_enum_SOURCES = \
3137         src/journal/test-journal-enum.c
3138
3139 test_journal_enum_LDADD = \
3140         libsystemd-journal-core.la
3141
3142 test_journal_stream_SOURCES = \
3143         src/journal/test-journal-stream.c
3144
3145 test_journal_stream_LDADD = \
3146         libsystemd-journal-core.la
3147
3148 test_journal_flush_SOURCES = \
3149         src/journal/test-journal-flush.c
3150
3151 test_journal_flush_LDADD = \
3152         libsystemd-journal-core.la
3153
3154 test_journal_init_SOURCES = \
3155         src/journal/test-journal-init.c
3156
3157 test_journal_init_LDADD = \
3158         libsystemd-journal-core.la
3159
3160 test_journal_verify_SOURCES = \
3161         src/journal/test-journal-verify.c
3162
3163 test_journal_verify_LDADD = \
3164         libsystemd-journal-core.la
3165
3166 test_journal_interleaving_SOURCES = \
3167         src/journal/test-journal-interleaving.c
3168
3169 test_journal_interleaving_LDADD = \
3170         libsystemd-journal-core.la
3171
3172 test_mmap_cache_SOURCES = \
3173         src/journal/test-mmap-cache.c
3174
3175 test_mmap_cache_LDADD = \
3176         libsystemd-journal-core.la
3177
3178 test_catalog_SOURCES = \
3179         src/journal/test-catalog.c
3180
3181 test_catalog_CPPFLAGS = \
3182         $(AM_CPPFLAGS) \
3183         -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
3184
3185 test_catalog_LDADD = \
3186         libsystemd-journal-core.la
3187
3188 libsystemd_journal_core_la_SOURCES = \
3189         src/journal/journald-kmsg.c \
3190         src/journal/journald-kmsg.h \
3191         src/journal/journald-syslog.c \
3192         src/journal/journald-syslog.h \
3193         src/journal/journald-stream.c \
3194         src/journal/journald-stream.h \
3195         src/journal/journald-server.c \
3196         src/journal/journald-server.h \
3197         src/journal/journald-console.c \
3198         src/journal/journald-console.h \
3199         src/journal/journald-native.c \
3200         src/journal/journald-native.h \
3201         src/journal/journald-rate-limit.c \
3202         src/journal/journald-rate-limit.h \
3203         src/journal/journal-internal.h
3204
3205 nodist_libsystemd_journal_core_la_SOURCES = \
3206         src/journal/journald-gperf.c
3207
3208 libsystemd_journal_core_la_LIBADD = \
3209         libsystemd-journal-internal.la \
3210         libudev-internal.la \
3211         libsystemd-capability.la \
3212         libsystemd-label.la \
3213         libsystemd-internal.la \
3214         libsystemd-shared.la
3215
3216 if HAVE_ACL
3217 libsystemd_journal_core_la_LIBADD += \
3218         libsystemd-acl.la
3219 endif
3220
3221 noinst_LTLIBRARIES += \
3222         libsystemd-journal-core.la
3223
3224 journal-install-hook:
3225         -$(MKDIR_P) $(DESTDIR)/var/log/journal
3226         -chown 0:0 $(DESTDIR)/var/log/journal
3227         -chmod 755 $(DESTDIR)/var/log/journal
3228         -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
3229         -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
3230
3231 journal-uninstall-hook:
3232         -rmdir $(DESTDIR)/var/log/journal/
3233
3234 INSTALL_EXEC_HOOKS += journal-install-hook
3235 UNINSTALL_EXEC_HOOKS += journal-uninstall-hook
3236
3237 # ------------------------------------------------------------------------------
3238 # Update catalog on installation. Do not bother if installing
3239 # in DESTDIR, since this is likely for packaging purposes.
3240 catalog-update-hook:
3241         -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
3242
3243 INSTALL_DATA_HOOKS += \
3244         catalog-update-hook
3245
3246 catalog-remove-hook:
3247         -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
3248
3249 UNINSTALL_DATA_HOOKS += \
3250         catalog-remove-hook
3251
3252 manual_tests += \
3253         test-journal-enum
3254
3255 tests += \
3256         test-journal \
3257         test-journal-send \
3258         test-journal-syslog \
3259         test-journal-match \
3260         test-journal-stream \
3261         test-journal-init \
3262         test-journal-verify \
3263         test-journal-interleaving \
3264         test-journal-flush \
3265         test-mmap-cache \
3266         test-catalog
3267
3268 pkginclude_HEADERS += \
3269         src/systemd/sd-journal.h \
3270         src/systemd/sd-messages.h \
3271         src/systemd/_sd-common.h
3272
3273 libsystemd_journal_internal_la_SOURCES = \
3274         src/journal/sd-journal.c \
3275         src/systemd/sd-journal.h \
3276         src/systemd/_sd-common.h \
3277         src/journal/journal-file.c \
3278         src/journal/journal-file.h \
3279         src/journal/journal-vacuum.c \
3280         src/journal/journal-vacuum.h \
3281         src/journal/journal-verify.c \
3282         src/journal/journal-verify.h \
3283         src/journal/lookup3.c \
3284         src/journal/lookup3.h \
3285         src/journal/journal-send.c \
3286         src/journal/journal-def.h \
3287         src/journal/compress.h \
3288         src/journal/catalog.c \
3289         src/journal/catalog.h \
3290         src/journal/mmap-cache.c \
3291         src/journal/mmap-cache.h
3292
3293 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
3294 libsystemd_journal_internal_la_CFLAGS =
3295         $(AM_CFLAGS)
3296
3297 libsystemd_journal_internal_la_LIBADD =
3298
3299 if HAVE_XZ
3300 libsystemd_journal_internal_la_SOURCES += \
3301         src/journal/compress.c
3302
3303 libsystemd_journal_internal_la_CFLAGS += \
3304         $(XZ_CFLAGS)
3305
3306 libsystemd_journal_internal_la_LIBADD += \
3307         $(XZ_LIBS)
3308 endif
3309
3310 if HAVE_GCRYPT
3311 libsystemd_journal_internal_la_SOURCES += \
3312         src/journal/journal-authenticate.c \
3313         src/journal/journal-authenticate.h \
3314         src/journal/fsprg.c \
3315         src/journal/fsprg.h
3316
3317 libsystemd_journal_internal_la_LIBADD += \
3318         $(GCRYPT_LIBS)
3319
3320 # fsprg.c is a drop-in file using void pointer arithmetic
3321 libsystemd_journal_internal_la_CFLAGS += \
3322         $(GCRYPT_CFLAGS) \
3323         -Wno-pointer-arith
3324 endif
3325
3326 noinst_LTLIBRARIES += \
3327         libsystemd-journal-internal.la
3328
3329 rootlibexec_PROGRAMS += \
3330         systemd-journald
3331
3332 rootbin_PROGRAMS += \
3333         journalctl
3334
3335 bin_PROGRAMS += \
3336         systemd-cat
3337
3338 dist_systemunit_DATA += \
3339         units/systemd-journald.socket
3340
3341 nodist_systemunit_DATA += \
3342         units/systemd-journald.service \
3343         units/systemd-journal-flush.service
3344
3345 dist_pkgsysconf_DATA += \
3346         src/journal/journald.conf
3347
3348 dist_catalog_DATA = \
3349         catalog/systemd.fr.catalog \
3350         catalog/systemd.ru.catalog \
3351         catalog/systemd.it.catalog \
3352         catalog/systemd.catalog
3353
3354 SOCKETS_TARGET_WANTS += \
3355         systemd-journald.socket
3356 SYSINIT_TARGET_WANTS += \
3357         systemd-journald.service \
3358         systemd-journal-flush.service
3359
3360 EXTRA_DIST += \
3361         units/systemd-journald.service.in \
3362         units/systemd-journal-flush.service.in \
3363         src/journal/journald-gperf.gperf
3364
3365 CLEANFILES += \
3366         src/journal/journald-gperf.c
3367
3368 # ------------------------------------------------------------------------------
3369 if HAVE_MICROHTTPD
3370 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
3371
3372 rootlibexec_PROGRAMS += \
3373         systemd-journal-gatewayd
3374
3375 systemd_journal_gatewayd_SOURCES = \
3376         src/journal/journal-gatewayd.c \
3377         src/journal/microhttpd-util.h \
3378         src/journal/microhttpd-util.c
3379
3380 systemd_journal_gatewayd_LDADD = \
3381         libsystemd-logs.la \
3382         libsystemd-journal-internal.la \
3383         libsystemd-internal.la \
3384         libsystemd-shared.la \
3385         $(MICROHTTPD_LIBS)
3386
3387 systemd_journal_gatewayd_CFLAGS = \
3388         $(AM_CFLAGS) \
3389         $(MICROHTTPD_CFLAGS)
3390
3391 systemd_journal_gatewayd_CPPFLAGS = \
3392         $(AM_CPPFLAGS) \
3393         -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
3394
3395 dist_systemunit_DATA += \
3396         units/systemd-journal-gatewayd.socket
3397
3398 nodist_systemunit_DATA += \
3399         units/systemd-journal-gatewayd.service
3400
3401 dist_gatewayddocumentroot_DATA = \
3402         src/journal/browse.html
3403
3404 endif
3405
3406 EXTRA_DIST += \
3407         units/systemd-journal-gatewayd.service.in
3408
3409 # ------------------------------------------------------------------------------
3410
3411 systemd_socket_proxyd_SOURCES = \
3412         src/socket-proxy/socket-proxyd.c
3413
3414 systemd_socket_proxyd_LDADD = \
3415         libsystemd-logs.la \
3416         libsystemd-internal.la \
3417         libsystemd-journal-internal.la \
3418         libsystemd-shared.la
3419
3420 # ------------------------------------------------------------------------------
3421 if ENABLE_COREDUMP
3422 systemd_coredump_SOURCES = \
3423         src/journal/coredump.c
3424
3425 systemd_coredump_LDADD = \
3426         libsystemd-journal-internal.la \
3427         libsystemd-label.la \
3428         libsystemd-shared.la \
3429         libsystemd-internal.la
3430
3431 rootlibexec_PROGRAMS += \
3432         systemd-coredump
3433
3434 systemd_coredumpctl_SOURCES = \
3435         src/journal/coredumpctl.c
3436
3437 systemd_coredumpctl_LDADD = \
3438         libsystemd-journal-internal.la \
3439         libsystemd-internal.la \
3440         libsystemd-shared.la
3441
3442 bin_PROGRAMS += \
3443         systemd-coredumpctl
3444
3445 dist_bashcompletion_DATA += \
3446         shell-completion/bash/systemd-coredumpctl
3447
3448 dist_zshcompletion_DATA += \
3449         shell-completion/zsh/_systemd-coredumpctl
3450
3451 sysctl_DATA = \
3452         sysctl.d/50-coredump.conf
3453
3454 CLEANFILES += \
3455         sysctl.d/50-coredump.conf
3456 endif
3457
3458 EXTRA_DIST += \
3459         sysctl.d/50-coredump.conf.in
3460
3461 # ------------------------------------------------------------------------------
3462 if ENABLE_BINFMT
3463 systemd_binfmt_SOURCES = \
3464         src/binfmt/binfmt.c
3465
3466 systemd_binfmt_LDADD = \
3467         libsystemd-shared.la
3468
3469 rootlibexec_PROGRAMS += \
3470         systemd-binfmt
3471
3472 dist_systemunit_DATA += \
3473         units/proc-sys-fs-binfmt_misc.automount \
3474         units/proc-sys-fs-binfmt_misc.mount
3475
3476 nodist_systemunit_DATA += \
3477         units/systemd-binfmt.service
3478
3479 INSTALL_DIRS += \
3480         $(prefix)/lib/binfmt.d \
3481         $(sysconfdir)/binfmt.d
3482
3483 SYSINIT_TARGET_WANTS += \
3484         systemd-binfmt.service \
3485         proc-sys-fs-binfmt_misc.automount
3486
3487 endif
3488
3489 EXTRA_DIST += \
3490         units/systemd-binfmt.service.in
3491
3492 # ------------------------------------------------------------------------------
3493 if ENABLE_VCONSOLE
3494 systemd_vconsole_setup_SOURCES = \
3495         src/vconsole/vconsole-setup.c
3496
3497 systemd_vconsole_setup_LDADD = \
3498         libsystemd-shared.la
3499
3500 rootlibexec_PROGRAMS += \
3501         systemd-vconsole-setup
3502
3503 nodist_systemunit_DATA += \
3504         units/systemd-vconsole-setup.service
3505
3506 SYSINIT_TARGET_WANTS += \
3507         systemd-vconsole-setup.service
3508 endif
3509
3510 EXTRA_DIST += \
3511         units/systemd-vconsole-setup.service.in
3512
3513 # ------------------------------------------------------------------------------
3514 if ENABLE_READAHEAD
3515 systemd_readahead_SOURCES = \
3516         src/readahead/readahead.c \
3517         src/readahead/readahead-collect.c \
3518         src/readahead/readahead-replay.c \
3519         src/readahead/readahead-analyze.c \
3520         src/readahead/readahead-common.c \
3521         src/readahead/readahead-common.h
3522
3523 systemd_readahead_LDADD = \
3524         libsystemd-internal.la \
3525         libudev-internal.la \
3526         libsystemd-shared.la
3527
3528 dist_doc_DATA += \
3529         src/readahead/sd-readahead.c \
3530         src/systemd/sd-readahead.h
3531
3532 rootlibexec_PROGRAMS += \
3533         systemd-readahead
3534
3535 dist_systemunit_DATA += \
3536         units/systemd-readahead-drop.service \
3537         units/systemd-readahead-done.timer
3538
3539 nodist_systemunit_DATA += \
3540         units/systemd-readahead-collect.service \
3541         units/systemd-readahead-replay.service \
3542         units/systemd-readahead-done.service
3543
3544 endif
3545
3546 EXTRA_DIST += \
3547         units/systemd-readahead-collect.service.in \
3548         units/systemd-readahead-replay.service.in \
3549         units/systemd-readahead-done.service.in
3550
3551 # ------------------------------------------------------------------------------
3552 if ENABLE_BOOTCHART
3553 systemd_bootchart_SOURCES = \
3554         src/bootchart/bootchart.c \
3555         src/bootchart/bootchart.h \
3556         src/bootchart/store.c \
3557         src/bootchart/store.h \
3558         src/bootchart/svg.c \
3559         src/bootchart/svg.h
3560
3561 systemd_bootchart_LDADD = \
3562         libsystemd-journal-internal.la \
3563         libsystemd-shared.la
3564
3565 rootlibexec_PROGRAMS += \
3566         systemd-bootchart
3567
3568 dist_pkgsysconf_DATA += \
3569         src/bootchart/bootchart.conf
3570 endif
3571
3572 # ------------------------------------------------------------------------------
3573 if ENABLE_QUOTACHECK
3574 rootlibexec_PROGRAMS += \
3575         systemd-quotacheck
3576
3577 nodist_systemunit_DATA += \
3578         units/systemd-quotacheck.service
3579
3580 systemd_quotacheck_SOURCES = \
3581         src/quotacheck/quotacheck.c
3582
3583 systemd_quotacheck_LDADD = \
3584         libsystemd-shared.la
3585 endif
3586
3587 EXTRA_DIST += \
3588         units/systemd-quotacheck.service.in
3589
3590 nodist_systemunit_DATA += \
3591         units/quotaon.service
3592
3593 # ------------------------------------------------------------------------------
3594 if ENABLE_RANDOMSEED
3595 rootlibexec_PROGRAMS += \
3596         systemd-random-seed
3597
3598 nodist_systemunit_DATA += \
3599         units/systemd-random-seed.service
3600
3601 systemd_random_seed_SOURCES = \
3602         src/random-seed/random-seed.c
3603
3604 systemd_random_seed_LDADD = \
3605         libsystemd-label.la \
3606         libsystemd-shared.la
3607
3608 SYSINIT_TARGET_WANTS += \
3609         systemd-random-seed.service
3610
3611 endif
3612
3613 EXTRA_DIST += \
3614         units/systemd-random-seed.service.in
3615
3616 # ------------------------------------------------------------------------------
3617 if ENABLE_BACKLIGHT
3618 rootlibexec_PROGRAMS += \
3619         systemd-backlight
3620
3621 nodist_systemunit_DATA += \
3622         units/systemd-backlight@.service
3623
3624 systemd_backlight_SOURCES = \
3625         src/backlight/backlight.c
3626
3627 systemd_backlight_LDADD = \
3628         libsystemd-label.la \
3629         libudev-internal.la \
3630         libsystemd-shared.la
3631 endif
3632
3633 EXTRA_DIST += \
3634         units/systemd-backlight@.service.in
3635
3636 # ------------------------------------------------------------------------------
3637 if ENABLE_RFKILL
3638 rootlibexec_PROGRAMS += \
3639         systemd-rfkill
3640
3641 nodist_systemunit_DATA += \
3642         units/systemd-rfkill@.service
3643
3644 systemd_rfkill_SOURCES = \
3645         src/rfkill/rfkill.c
3646
3647 systemd_rfkill_LDADD = \
3648         libsystemd-label.la \
3649         libudev-internal.la \
3650         libsystemd-shared.la
3651 endif
3652
3653 EXTRA_DIST += \
3654         units/systemd-rfkill@.service.in
3655
3656 # ------------------------------------------------------------------------------
3657 if HAVE_LIBCRYPTSETUP
3658 rootlibexec_PROGRAMS += \
3659         systemd-cryptsetup
3660
3661 systemgenerator_PROGRAMS += \
3662         systemd-cryptsetup-generator
3663
3664 dist_systemunit_DATA += \
3665         units/cryptsetup.target
3666
3667 systemd_cryptsetup_SOURCES = \
3668         src/cryptsetup/cryptsetup.c
3669
3670 systemd_cryptsetup_CFLAGS = \
3671         $(AM_CFLAGS) \
3672         $(LIBCRYPTSETUP_CFLAGS)
3673
3674 systemd_cryptsetup_LDADD = \
3675         libsystemd-label.la \
3676         libudev-internal.la \
3677         libsystemd-shared.la \
3678         $(LIBCRYPTSETUP_LIBS)
3679
3680 systemd_cryptsetup_generator_SOURCES = \
3681         src/cryptsetup/cryptsetup-generator.c
3682
3683 systemd_cryptsetup_generator_LDADD = \
3684         libsystemd-label.la \
3685         libsystemd-shared.la
3686
3687 SYSINIT_TARGET_WANTS += \
3688         cryptsetup.target
3689
3690 endif
3691
3692 # ------------------------------------------------------------------------------
3693 if ENABLE_HOSTNAMED
3694 systemd_hostnamed_SOURCES = \
3695         src/hostname/hostnamed.c
3696
3697 systemd_hostnamed_LDADD = \
3698         libsystemd-label.la \
3699         libsystemd-internal.la \
3700         libsystemd-shared.la
3701
3702 rootlibexec_PROGRAMS += \
3703         systemd-hostnamed
3704
3705 nodist_systemunit_DATA += \
3706         units/systemd-hostnamed.service
3707
3708 dist_systemunit_DATA += \
3709         units/org.freedesktop.hostname1.busname
3710
3711 dist_dbuspolicy_DATA += \
3712         src/hostname/org.freedesktop.hostname1.conf
3713
3714 dist_dbussystemservice_DATA += \
3715         src/hostname/org.freedesktop.hostname1.service
3716
3717 polkitpolicy_files += \
3718         src/hostname/org.freedesktop.hostname1.policy
3719
3720 SYSTEM_UNIT_ALIASES += \
3721         systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
3722
3723 BUSNAMES_TARGET_WANTS += \
3724         org.freedesktop.hostname1.busname
3725
3726 hostnamectl_SOURCES = \
3727         src/hostname/hostnamectl.c
3728
3729 hostnamectl_LDADD = \
3730         libsystemd-internal.la \
3731         libsystemd-shared.la
3732
3733 bin_PROGRAMS += \
3734         hostnamectl
3735
3736 dist_bashcompletion_DATA += \
3737         shell-completion/bash/hostnamectl
3738
3739 dist_zshcompletion_DATA += \
3740         shell-completion/zsh/_hostnamectl
3741
3742 endif
3743
3744 polkitpolicy_in_files += \
3745         src/hostname/org.freedesktop.hostname1.policy.in
3746
3747 EXTRA_DIST += \
3748         units/systemd-hostnamed.service.in
3749
3750 # ------------------------------------------------------------------------------
3751 if ENABLE_KDBUS
3752 systemd_bus_driverd_SOURCES = \
3753         src/bus-driverd/bus-driverd.c
3754
3755 systemd_bus_driverd_LDADD = \
3756         libsystemd-internal.la \
3757         libsystemd-shared.la
3758
3759 rootlibexec_PROGRAMS += \
3760         systemd-bus-driverd
3761
3762 nodist_systemunit_DATA += \
3763         units/systemd-bus-driverd.service
3764
3765 dist_systemunit_DATA += \
3766         units/org.freedesktop.DBus.busname
3767
3768 BUSNAMES_TARGET_WANTS += \
3769         org.freedesktop.DBus.busname
3770
3771 nodist_userunit_DATA += \
3772         units/user/systemd-bus-driverd.service
3773
3774 USER_BUSNAMES_TARGET_WANTS += \
3775         org.freedesktop.DBus.busname
3776
3777 USER_UNIT_ALIASES += \
3778         $(systemunitdir)/org.freedesktop.DBus.busname org.freedesktop.DBus.busname
3779 endif
3780
3781 EXTRA_DIST += \
3782         units/systemd-bus-driverd.service.in \
3783         units/user/systemd-bus-driverd.service.in
3784
3785 # ------------------------------------------------------------------------------
3786 if ENABLE_LOCALED
3787 systemd_localed_SOURCES = \
3788         src/locale/localed.c
3789
3790 systemd_localed_LDADD = \
3791         libsystemd-label.la \
3792         libsystemd-internal.la \
3793         libsystemd-shared.la
3794
3795 nodist_systemunit_DATA += \
3796         units/systemd-localed.service
3797
3798 dist_systemunit_DATA += \
3799         units/org.freedesktop.locale1.busname
3800
3801 rootlibexec_PROGRAMS += \
3802         systemd-localed
3803
3804 dist_dbuspolicy_DATA += \
3805         src/locale/org.freedesktop.locale1.conf
3806
3807 dist_dbussystemservice_DATA += \
3808         src/locale/org.freedesktop.locale1.service
3809
3810 polkitpolicy_files += \
3811         src/locale/org.freedesktop.locale1.policy
3812
3813 SYSTEM_UNIT_ALIASES += \
3814         systemd-localed.service dbus-org.freedesktop.locale1.service
3815
3816 BUSNAMES_TARGET_WANTS += \
3817         org.freedesktop.locale1.busname
3818
3819 dist_pkgdata_DATA += \
3820         src/locale/kbd-model-map
3821
3822 dist_noinst_SCRIPT = \
3823         src/locale/generate-kbd-model-map
3824
3825 update-kbd-model-map: src/locale/generate-kbd-model-map
3826         $PYTHON $< >src/locale/kbd-model-map
3827
3828 localectl_SOURCES = \
3829         src/locale/localectl.c
3830
3831 localectl_LDADD = \
3832         libsystemd-internal.la \
3833         libsystemd-shared.la
3834
3835 bin_PROGRAMS += \
3836         localectl
3837
3838 dist_bashcompletion_DATA += \
3839         shell-completion/bash/localectl
3840
3841 dist_zshcompletion_DATA += \
3842         shell-completion/zsh/_localectl
3843
3844 endif
3845
3846 .PHONY: update-kbd-model-map
3847
3848 polkitpolicy_in_files += \
3849         src/locale/org.freedesktop.locale1.policy.in
3850
3851 EXTRA_DIST += \
3852         units/systemd-localed.service.in
3853
3854 # ------------------------------------------------------------------------------
3855 if ENABLE_TIMEDATED
3856 systemd_timedated_SOURCES = \
3857         src/timedate/timedated.c
3858
3859 systemd_timedated_LDADD = \
3860         libsystemd-label.la \
3861         libsystemd-internal.la \
3862         libsystemd-shared.la
3863
3864 rootlibexec_PROGRAMS += \
3865         systemd-timedated
3866
3867 dist_dbussystemservice_DATA += \
3868         src/timedate/org.freedesktop.timedate1.service
3869
3870 dist_dbuspolicy_DATA += \
3871         src/timedate/org.freedesktop.timedate1.conf
3872
3873 nodist_systemunit_DATA += \
3874         units/systemd-timedated.service
3875
3876 dist_systemunit_DATA += \
3877         units/org.freedesktop.timedate1.busname
3878
3879 polkitpolicy_files += \
3880         src/timedate/org.freedesktop.timedate1.policy
3881
3882 INSTALL_DIRS += \
3883         $(prefix)/lib/systemd/ntp-units.d \
3884         $(sysconfdir)/systemd/ntp-units.d
3885
3886 SYSTEM_UNIT_ALIASES += \
3887         systemd-timedated.service dbus-org.freedesktop.timedate1.service
3888
3889 BUSNAMES_TARGET_WANTS += \
3890         org.freedesktop.timedate1.busname
3891
3892 timedatectl_SOURCES = \
3893         src/timedate/timedatectl.c
3894
3895 timedatectl_LDADD = \
3896         libsystemd-internal.la \
3897         libsystemd-shared.la
3898
3899 bin_PROGRAMS += \
3900         timedatectl
3901
3902 dist_bashcompletion_DATA += \
3903         shell-completion/bash/timedatectl
3904
3905 dist_zshcompletion_DATA += \
3906         shell-completion/zsh/_timedatectl
3907 endif
3908
3909 polkitpolicy_in_files += \
3910         src/timedate/org.freedesktop.timedate1.policy.in
3911
3912 EXTRA_DIST += \
3913         units/systemd-timedated.service.in
3914
3915 # ------------------------------------------------------------------------------
3916 if HAVE_MYHOSTNAME
3917 libnss_myhostname_la_SOURCES = \
3918         src/nss-myhostname/nss-myhostname.c \
3919         src/nss-myhostname/ifconf.h \
3920         src/nss-myhostname/netlink.c
3921
3922 libnss_myhostname_la_LDFLAGS = \
3923         $(AM_LDFLAGS) \
3924         -module \
3925         -export-dynamic \
3926         -avoid-version \
3927         -shared \
3928         -shrext .so.2
3929
3930 lib_LTLIBRARIES += \
3931         libnss_myhostname.la
3932 endif
3933
3934 # ------------------------------------------------------------------------------
3935 if ENABLE_MACHINED
3936 systemd_machined_SOURCES = \
3937         src/machine/machined.c \
3938         src/machine/machined.h
3939
3940 systemd_machined_LDADD = \
3941         libsystemd-machine-core.la
3942
3943 rootlibexec_PROGRAMS += \
3944         systemd-machined
3945
3946 libsystemd_machine_core_la_SOURCES = \
3947         src/machine/machined-dbus.c \
3948         src/machine/machine.c \
3949         src/machine/machine.h \
3950         src/machine/machine-dbus.c
3951
3952 libsystemd_machine_core_la_LIBADD = \
3953         libsystemd-label.la \
3954         libsystemd-internal.la \
3955         libudev-internal.la \
3956         libsystemd-shared.la
3957
3958 noinst_LTLIBRARIES += \
3959         libsystemd-machine-core.la
3960
3961 machinectl_SOURCES = \
3962         src/machine/machinectl.c
3963
3964 machinectl_LDADD = \
3965         libsystemd-internal.la \
3966         libsystemd-shared.la
3967
3968 rootbin_PROGRAMS += \
3969         machinectl
3970
3971 dist_bashcompletion_DATA += \
3972         shell-completion/bash/machinectl
3973
3974 test_machine_tables_SOURCES = \
3975         src/machine/test-machine-tables.c
3976
3977 test_machine_tables_LDADD = \
3978         libsystemd-machine-core.la
3979
3980 tests += \
3981         test-machine-tables
3982
3983 nodist_systemunit_DATA += \
3984         units/systemd-machined.service
3985
3986 dist_systemunit_DATA += \
3987         units/machine.slice \
3988         units/org.freedesktop.machine1.busname
3989
3990 dist_dbussystemservice_DATA += \
3991         src/machine/org.freedesktop.machine1.service
3992
3993 dist_dbuspolicy_DATA += \
3994         src/machine/org.freedesktop.machine1.conf
3995
3996 dist_zshcompletion_DATA += \
3997         shell-completion/zsh/_machinectl
3998
3999 SYSTEM_UNIT_ALIASES += \
4000         systemd-machined.service dbus-org.freedesktop.machine1.service
4001
4002 BUSNAMES_TARGET_WANTS += \
4003         org.freedesktop.machine1.busname
4004
4005 EXTRA_DIST += \
4006         units/systemd-machined.service.in
4007
4008 endif
4009
4010 # ------------------------------------------------------------------------------
4011 if ENABLE_NETWORKD
4012 rootlibexec_PROGRAMS += \
4013         systemd-networkd
4014
4015 systemd_networkd_SOURCES = \
4016         src/network/networkd.c
4017
4018 systemd_networkd_LDADD = \
4019         libsystemd-networkd-core.la
4020
4021 noinst_LTLIBRARIES += \
4022         libsystemd-networkd-core.la
4023
4024 libsystemd_networkd_core_la_SOURCES = \
4025         src/network/networkd.h \
4026         src/network/networkd-link.c \
4027         src/network/networkd-netdev.c \
4028         src/network/networkd-network.c \
4029         src/network/networkd-address.c \
4030         src/network/networkd-route.c \
4031         src/network/networkd-manager.c
4032
4033 nodist_libsystemd_networkd_core_la_SOURCES = \
4034         src/network/networkd-network-gperf.c \
4035         src/network/networkd-netdev-gperf.c
4036
4037 libsystemd_networkd_core_la_LIBADD = \
4038         libudev-internal.la \
4039         libsystemd-internal.la \
4040         libsystemd-network.la \
4041         libsystemd-label.la \
4042         libsystemd-shared.la
4043
4044 nodist_systemunit_DATA += \
4045         units/systemd-networkd.service
4046
4047 GENERAL_ALIASES += \
4048         $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service
4049
4050 rootlibexec_PROGRAMS += \
4051         systemd-networkd-wait-online
4052
4053 systemd_networkd_wait_online_SOURCES = \
4054         src/network/networkd-wait-online.c
4055
4056 systemd_networkd_wait_online_LDADD = \
4057         libsystemd-internal.la \
4058         libsystemd-network.la
4059
4060 test_network_SOURCES = \
4061         src/network/test-network.c
4062
4063 test_network_LDADD = \
4064         libsystemd-networkd-core.la
4065
4066 tests += \
4067         test-network
4068
4069 EXTRA_DIST += \
4070         src/network/networkd-network-gperf.gperf \
4071         src/network/networkd-netdev-gperf.gperf \
4072         units/systemd-networkd.service.in
4073
4074 CLEANFILES += \
4075         src/network/networkd-network-gperf.c \
4076         src/network/networkd-netdev-gperf.c
4077 endif
4078
4079 # ------------------------------------------------------------------------------
4080 if ENABLE_LOGIND
4081 systemd_logind_SOURCES = \
4082         src/login/logind.c \
4083         src/login/logind.h
4084
4085 nodist_systemd_logind_SOURCES = \
4086         src/login/logind-gperf.c
4087
4088 systemd_logind_LDADD = \
4089         libsystemd-logind-core.la
4090
4091 libsystemd_logind_core_la_SOURCES = \
4092         src/login/logind-core.c \
4093         src/login/logind-device.c \
4094         src/login/logind-device.h \
4095         src/login/logind-button.c \
4096         src/login/logind-button.h \
4097         src/login/logind-action.c \
4098         src/login/logind-action.h \
4099         src/login/logind-seat.c \
4100         src/login/logind-seat.h \
4101         src/login/logind-session.c \
4102         src/login/logind-session.h \
4103         src/login/logind-session-device.c \
4104         src/login/logind-session-device.h \
4105         src/login/logind-user.c \
4106         src/login/logind-user.h \
4107         src/login/logind-inhibit.c \
4108         src/login/logind-inhibit.h \
4109         src/login/logind-dbus.c \
4110         src/login/logind-session-dbus.c \
4111         src/login/logind-seat-dbus.c \
4112         src/login/logind-user-dbus.c \
4113         src/login/logind-acl.h \
4114         src/login/login-shared.c \
4115         src/login/login-shared.h
4116
4117 libsystemd_logind_core_la_LIBADD = \
4118         libsystemd-label.la \
4119         libsystemd-capability.la \
4120         libsystemd-internal.la \
4121         libudev-internal.la \
4122         libsystemd-shared.la
4123
4124 if HAVE_ACL
4125 libsystemd_logind_core_la_SOURCES += \
4126         src/login/logind-acl.c
4127
4128 libsystemd_logind_core_la_LIBADD += \
4129         libsystemd-acl.la
4130 endif
4131
4132 noinst_LTLIBRARIES += \
4133         libsystemd-logind-core.la
4134
4135 systemd_user_sessions_SOURCES = \
4136         src/login/user-sessions.c
4137
4138 systemd_user_sessions_LDADD = \
4139         libsystemd-shared.la
4140
4141 rootlibexec_PROGRAMS += \
4142         systemd-logind \
4143         systemd-user-sessions
4144
4145 loginctl_SOURCES = \
4146         src/login/loginctl.c \
4147         src/login/sysfs-show.c
4148
4149 loginctl_LDADD = \
4150         libsystemd-internal.la \
4151         libudev-internal.la \
4152         libsystemd-shared.la
4153
4154 rootbin_PROGRAMS += \
4155         loginctl
4156
4157 dist_bashcompletion_DATA += \
4158         shell-completion/bash/loginctl
4159
4160 dist_zshcompletion_DATA += \
4161         shell-completion/zsh/_loginctl \
4162         shell-completion/zsh/_systemd-inhibit
4163
4164 systemd_inhibit_SOURCES = \
4165         src/login/inhibit.c
4166
4167 systemd_inhibit_LDADD = \
4168         libsystemd-internal.la \
4169         libsystemd-shared.la
4170
4171 rootbin_PROGRAMS += \
4172         systemd-inhibit
4173
4174 test_login_SOURCES = \
4175         src/login/test-login.c
4176
4177 test_login_LDADD = \
4178         libsystemd-internal.la \
4179         libsystemd-shared.la
4180
4181 test_login_shared_SOURCES = \
4182         src/login/test-login-shared.c
4183
4184 test_login_shared_LDADD = \
4185         libsystemd-internal.la \
4186         libsystemd-shared.la
4187
4188 test_inhibit_SOURCES = \
4189         src/login/test-inhibit.c
4190
4191 test_inhibit_LDADD = \
4192         libsystemd-internal.la \
4193         libsystemd-shared.la
4194
4195 test_login_tables_SOURCES = \
4196         src/login/test-login-tables.c
4197
4198 test_login_tables_LDADD = \
4199         libsystemd-logind-core.la
4200
4201 manual_tests += \
4202         test-login \
4203         test-inhibit
4204
4205 tests += \
4206         test-login-tables \
4207         test-login-shared
4208
4209 if HAVE_PAM
4210 pam_systemd_la_SOURCES = \
4211         src/login/pam-module.c
4212
4213 pam_systemd_la_CFLAGS = \
4214         $(AM_CFLAGS) \
4215         $(PAM_CFLAGS) \
4216         -fvisibility=hidden
4217
4218 pam_systemd_la_LDFLAGS = \
4219         $(AM_LDFLAGS) \
4220         -module \
4221         -export-dynamic \
4222         -avoid-version \
4223         -shared \
4224         -export-symbols-regex '^pam_sm_.*'
4225
4226 pam_systemd_la_LIBADD = \
4227         libsystemd-capability.la \
4228         libsystemd-internal.la \
4229         libsystemd-shared.la \
4230         $(PAM_LIBS)
4231
4232 pamlib_LTLIBRARIES = \
4233         pam_systemd.la
4234
4235 dist_pamconf_DATA = \
4236         src/login/systemd-user
4237 endif
4238
4239 nodist_systemunit_DATA += \
4240         units/systemd-logind.service \
4241         units/systemd-user-sessions.service
4242
4243 dist_systemunit_DATA += \
4244         units/user.slice \
4245         units/org.freedesktop.login1.busname
4246
4247 dist_dbussystemservice_DATA += \
4248         src/login/org.freedesktop.login1.service
4249
4250 dist_dbuspolicy_DATA += \
4251         src/login/org.freedesktop.login1.conf
4252
4253 dist_pkgsysconf_DATA += \
4254         src/login/logind.conf
4255
4256 polkitpolicy_files += \
4257         src/login/org.freedesktop.login1.policy
4258
4259 INSTALL_DIRS += \
4260         $(systemdstatedir)
4261
4262 MULTI_USER_TARGET_WANTS += \
4263         systemd-logind.service \
4264         systemd-user-sessions.service
4265
4266 SYSTEM_UNIT_ALIASES += \
4267         systemd-logind.service dbus-org.freedesktop.login1.service
4268
4269 BUSNAMES_TARGET_WANTS += \
4270         org.freedesktop.login1.busname
4271
4272 if ENABLE_MULTI_SEAT_X
4273
4274 systemd_multi_seat_x_SOURCES = \
4275         src/login/multi-seat-x.c
4276
4277 systemd_multi_seat_x_LDADD = \
4278         libsystemd-label.la \
4279         libsystemd-shared.la
4280
4281 rootlibexec_PROGRAMS += \
4282         systemd-multi-seat-x
4283
4284 endif
4285
4286 dist_udevrules_DATA += \
4287         src/login/70-uaccess.rules \
4288         src/login/70-power-switch.rules
4289
4290 nodist_udevrules_DATA += \
4291         src/login/71-seat.rules \
4292         src/login/73-seat-late.rules
4293
4294 CLEANFILES += \
4295         src/login/logind-gperf.c \
4296         src/login/71-seat.rules \
4297         src/login/73-seat-late.rules
4298 endif
4299
4300 polkitpolicy_in_files += \
4301         src/login/org.freedesktop.login1.policy.in
4302
4303 EXTRA_DIST += \
4304         src/login/logind-gperf.gperf \
4305         src/login/71-seat.rules.in \
4306         src/login/73-seat-late.rules.in \
4307         units/systemd-logind.service.in \
4308         units/systemd-user-sessions.service.in
4309
4310 # ------------------------------------------------------------------------------
4311 if HAVE_PYTHON_DEVEL
4312 pkgpyexec_LTLIBRARIES = \
4313         _journal.la \
4314         id128.la \
4315         _daemon.la \
4316         _reader.la \
4317         login.la
4318
4319 _journal_la_SOURCES = \
4320         src/python-systemd/_journal.c
4321
4322 _journal_la_CFLAGS = \
4323         $(AM_CFLAGS) \
4324         -fvisibility=default \
4325         $(PYTHON_DEVEL_CFLAGS)
4326
4327 _journal_la_LDFLAGS = \
4328         $(AM_LDFLAGS) \
4329         -shared \
4330         -module \
4331         -avoid-version
4332
4333 _journal_la_LIBADD = \
4334         $(PYTHON_DEVEL_LIBS) \
4335         libsystemd.la
4336
4337 id128_la_SOURCES = \
4338         src/python-systemd/id128.c \
4339         src/python-systemd/id128-constants.h \
4340         src/python-systemd/pyutil.c \
4341         src/python-systemd/pyutil.h
4342
4343 id128_la_CFLAGS = \
4344         $(AM_CFLAGS) \
4345         -fvisibility=default \
4346         $(PYTHON_DEVEL_CFLAGS) \
4347         -I$(top_builddir)/src/python-systemd
4348
4349 id128_la_LDFLAGS = \
4350         $(AM_LDFLAGS) \
4351         -shared \
4352         -module \
4353         -avoid-version
4354
4355 id128_la_LIBADD = \
4356         $(PYTHON_DEVEL_LIBS) \
4357         libsystemd-shared.la \
4358         libsystemd.la
4359
4360 _daemon_la_SOURCES = \
4361         src/python-systemd/_daemon.c \
4362         src/python-systemd/pyutil.c \
4363         src/python-systemd/pyutil.h
4364
4365 _daemon_la_CFLAGS = \
4366         $(AM_CFLAGS) \
4367         -fvisibility=default \
4368         $(PYTHON_DEVEL_CFLAGS) \
4369         -I$(top_builddir)/src/python-systemd
4370
4371 _daemon_la_LDFLAGS = \
4372         $(AM_LDFLAGS) \
4373         -shared \
4374         -module \
4375         -avoid-version
4376
4377 _daemon_la_LIBADD = \
4378         $(PYTHON_DEVEL_LIBS) \
4379         libsystemd-shared.la \
4380         libsystemd.la
4381
4382 _reader_la_SOURCES = \
4383         src/python-systemd/_reader.c \
4384         src/python-systemd/pyutil.c \
4385         src/python-systemd/pyutil.h
4386
4387 _reader_la_CFLAGS = \
4388         $(AM_CFLAGS) \
4389         -fvisibility=default \
4390         $(PYTHON_DEVEL_CFLAGS)
4391
4392 _reader_la_LDFLAGS = \
4393         $(AM_LDFLAGS) \
4394         -shared \
4395         -module \
4396         -avoid-version
4397
4398 _reader_la_LIBADD = \
4399         $(PYTHON_DEVEL_LIBS) \
4400         libsystemd-shared.la \
4401         libsystemd.la
4402
4403 login_la_SOURCES = \
4404         src/python-systemd/login.c \
4405         src/python-systemd/pyutil.c \
4406         src/python-systemd/pyutil.h
4407
4408 login_la_CFLAGS = \
4409         $(AM_CFLAGS) \
4410         -fvisibility=default \
4411         $(PYTHON_DEVEL_CFLAGS)
4412
4413 login_la_LDFLAGS = \
4414         $(AM_LDFLAGS) \
4415         -shared \
4416         -module \
4417         -avoid-version
4418
4419 login_la_LIBADD = \
4420         $(PYTHON_DEVEL_LIBS) \
4421         libsystemd-shared.la \
4422         libsystemd.la
4423
4424 dist_pkgpyexec_PYTHON = \
4425         src/python-systemd/journal.py \
4426         src/python-systemd/daemon.py \
4427         src/python-systemd/__init__.py
4428
4429 src/python-systemd/id128-constants.h: src/systemd/sd-messages.h
4430         $(AM_V_at)$(MKDIR_P) $(dir $@)
4431         $(AM_V_GEN)$(SED) -n -r 's/,//g; s/#define (SD_MESSAGE_[A-Z0-9_]+)\s.*/add_id(m, "\1", \1) JOINER/p' <$< >$@
4432
4433 BUILT_SOURCES += \
4434         src/python-systemd/id128-constants.h
4435
4436 SPHINXOPTS = -D version=$(VERSION) -D release=$(VERSION)
4437 sphinx-%:
4438         $(AM_V_at)test -n "$(SPHINX_BUILD)" || { echo " *** sphinx-build is not available"; exit 1; }
4439         $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/docs/html/python-systemd/
4440         $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/docs/html/python-systemd/
4441
4442 python-shell:
4443         $(AM_V_at)echo "Starting python with $(DESTDIR)$(pyexecdir)"
4444         $(AM_V_at)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(PYTHON)
4445
4446 destdir-sphinx: all
4447         dir="$$(mktemp -d /tmp/systemd-install.XXXXXX)" && \
4448                 $(MAKE) DESTDIR="$$dir" install && \
4449                 $(MAKE) DESTDIR="$$dir" sphinx-html && \
4450                 rm -rf "$$dir"
4451
4452 endif
4453
4454 CLEAN_LOCAL_HOOKS += clean-sphinx
4455
4456 .PHONY: python-shell destdir-sphinx clean-sphinx clean-python
4457
4458 clean-sphinx:
4459         -rm -rf docs/html/python-systemd/
4460
4461 # Remove Python stuff, e.g. to force rebuilding for a different Python version.
4462 clean-python:
4463         -rm -rf src/python-systemd/.libs src/python-systemd/*.l[ao]
4464         -rm -f _daemon.la id128.la _journal.la login.la _reader.la
4465
4466 # ------------------------------------------------------------------------------
4467 if ENABLE_COMPAT_LIBS
4468 EXTRA_DIST += \
4469         src/compat-libs/linkwarning.h
4470
4471 libsystemd-%.c: src/compat-libs/libsystemd-%.sym
4472         $(AM_V_at)$(MKDIR_P) $(dir $@)
4473         $(AM_V_GEN)sed -r -n 's/^ +(sd_.*);/obsolete_lib(\1,$(notdir $(basename $<)));/p' <$< >$@
4474
4475 BUILT_SOURCES += \
4476         libsystemd-journal.c \
4477         libsystemd-login.c \
4478         libsystemd-id128.c \
4479         libsystemd-daemon.c
4480
4481 libsystemd_journal_la_SOURCES = \
4482         libsystemd-journal.c \
4483         src/compat-libs/libsystemd-journal.sym
4484
4485 libsystemd_journal_la_CPPFLAGS = \
4486         $(AM_CFLAGS) \
4487         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
4488
4489 libsystemd_journal_la_LDFLAGS = \
4490         $(AM_LDFLAGS) \
4491         -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
4492         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-journal.sym
4493
4494 libsystemd_journal_la_LIBADD = \
4495         libsystemd-journal-internal.la \
4496         libsystemd-internal.la \
4497         libsystemd-shared.la
4498
4499 libsystemd_login_la_SOURCES = \
4500         libsystemd-login.c \
4501         src/compat-libs/libsystemd-login.sym
4502
4503 libsystemd_login_la_CPPFLAGS = \
4504         $(AM_CFLAGS) \
4505         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
4506
4507 libsystemd_login_la_LDFLAGS = \
4508         $(AM_LDFLAGS) \
4509         -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
4510         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-login.sym
4511
4512 libsystemd_login_la_LIBADD = \
4513         libsystemd-internal.la \
4514         libsystemd-shared.la
4515
4516 libsystemd_id128_la_SOURCES = \
4517         libsystemd-id128.c \
4518         src/compat-libs/libsystemd-id128.sym
4519
4520 libsystemd_id128_la_CPPFLAGS = \
4521         $(AM_CFLAGS) \
4522         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
4523
4524 libsystemd_id128_la_LDFLAGS = \
4525         $(AM_LDFLAGS) \
4526         -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
4527         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-id128.sym
4528
4529 libsystemd_id128_la_LIBADD = \
4530         libsystemd-internal.la \
4531         libsystemd-shared.la
4532
4533 libsystemd_daemon_la_SOURCES = \
4534         libsystemd-daemon.c \
4535         src/compat-libs/libsystemd-daemon.sym
4536
4537 libsystemd_daemon_la_CPPFLAGS = \
4538         $(AM_CFLAGS) \
4539         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
4540
4541 libsystemd_daemon_la_LDFLAGS = \
4542         $(AM_LDFLAGS) \
4543         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
4544         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-daemon.sym
4545
4546 libsystemd_daemon_la_LIBADD = \
4547         libsystemd-internal.la \
4548         libsystemd-shared.la
4549
4550 lib_LTLIBRARIES += \
4551         libsystemd-journal.la \
4552         libsystemd-login.la \
4553         libsystemd-id128.la \
4554         libsystemd-daemon.la
4555
4556 pkgconfiglib_DATA += \
4557         src/compat-libs/libsystemd-journal.pc \
4558         src/compat-libs/libsystemd-login.pc \
4559         src/compat-libs/libsystemd-id128.pc \
4560         src/compat-libs/libsystemd-daemon.pc
4561
4562 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
4563 compat-lib-install-hook:
4564         libname=libsystemd-login.so && $(move-to-rootlibdir)
4565         libname=libsystemd-journal.so && $(move-to-rootlibdir)
4566         libname=libsystemd-id128.so && $(move-to-rootlibdir)
4567         libname=libsystemd-daemon.so && $(move-to-rootlibdir)
4568
4569 compat-lib-uninstall-hook:
4570         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
4571         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
4572         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
4573         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
4574
4575 INSTALL_EXEC_HOOKS += compat-lib-install-hook
4576 UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook
4577 endif
4578
4579 EXTRA_DIST += \
4580         src/compat-libs/libsystemd-journal.pc.in \
4581         src/compat-libs/libsystemd-login.pc.in \
4582         src/compat-libs/libsystemd-id128.pc.in \
4583         src/compat-libs/libsystemd-daemon.pc.in
4584
4585 # ------------------------------------------------------------------------------
4586 substitutions = \
4587        '|rootlibexecdir=$(rootlibexecdir)|' \
4588        '|rootbindir=$(rootbindir)|' \
4589        '|bindir=$(bindir)|' \
4590        '|SYSTEMCTL=$(rootbindir)/systemctl|' \
4591        '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
4592        '|pkgsysconfdir=$(pkgsysconfdir)|' \
4593        '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
4594        '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
4595        '|pkgdatadir=$(pkgdatadir)|' \
4596        '|systemunitdir=$(systemunitdir)|' \
4597        '|userunitdir=$(userunitdir)|' \
4598        '|systempresetdir=$(systempresetdir)|' \
4599        '|userpresetdir=$(userpresetdir)|' \
4600        '|udevhwdbdir=$(udevhwdbdir)|' \
4601        '|udevrulesdir=$(udevrulesdir)|' \
4602        '|catalogdir=$(catalogdir)|' \
4603        '|tmpfilesdir=$(tmpfilesdir)|' \
4604        '|sysctldir=$(sysctldir)|' \
4605        '|systemgeneratordir=$(systemgeneratordir)|' \
4606        '|usergeneratordir=$(usergeneratordir)|' \
4607        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
4608        '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
4609        '|PACKAGE_URL=$(PACKAGE_URL)|' \
4610        '|RANDOM_SEED_DIR=$(localstatedir)/lib/systemd/|' \
4611        '|RANDOM_SEED=$(localstatedir)/lib/systemd/random-seed|' \
4612        '|prefix=$(prefix)|' \
4613        '|exec_prefix=$(exec_prefix)|' \
4614        '|libdir=$(libdir)|' \
4615        '|includedir=$(includedir)|' \
4616        '|VERSION=$(VERSION)|' \
4617        '|rootprefix=$(rootprefix)|' \
4618        '|udevlibexecdir=$(udevlibexecdir)|' \
4619        '|SUSHELL=$(SUSHELL)|' \
4620        '|DEBUGTTY=$(DEBUGTTY)|' \
4621        '|KILL=$(KILL)|' \
4622        '|KMOD=$(KMOD)|' \
4623        '|MKDIR_P=$(MKDIR_P)|' \
4624        '|QUOTAON=$(QUOTAON)|' \
4625        '|QUOTACHECK=$(QUOTACHECK)|' \
4626        '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
4627        '|VARLOGDIR=$(varlogdir)|' \
4628        '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
4629        '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
4630        '|PYTHON=$(PYTHON)|' \
4631        '|PYTHON_BINARY=$(PYTHON_BINARY)|'
4632
4633 SED_PROCESS = \
4634         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
4635         $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
4636                 < $< > $@
4637
4638 units/%: units/%.in
4639         $(SED_PROCESS)
4640
4641 man/%: man/%.in
4642         $(SED_PROCESS)
4643
4644 sysctl.d/%: sysctl.d/%.in
4645         $(SED_PROCESS)
4646
4647 %.pc: %.pc.in
4648         $(SED_PROCESS)
4649
4650 src/core/macros.%: src/core/macros.%.in
4651         $(SED_PROCESS)
4652
4653 src/%.policy.in: src/%.policy.in.in
4654         $(SED_PROCESS)
4655
4656 %.rules: %.rules.in
4657         $(SED_PROCESS)
4658
4659 %.sh: %.sh.in
4660         $(SED_PROCESS)
4661         $(AM_V_GEN)chmod +x $@
4662
4663 src/%.c: src/%.gperf
4664         $(AM_V_at)$(MKDIR_P) $(dir $@)
4665         $(AM_V_GPERF)$(GPERF) < $< > $@
4666
4667 src/%: src/%.m4
4668         $(AM_V_at)$(MKDIR_P) $(dir $@)
4669         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
4670
4671 units/%: units/%.m4
4672         $(AM_V_at)$(MKDIR_P) $(dir $@)
4673         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
4674
4675 units/user/%: units/%.m4
4676         $(AM_V_at)$(MKDIR_P) $(dir $@)
4677         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
4678
4679 if ENABLE_POLKIT
4680 nodist_polkitpolicy_DATA = \
4681         $(polkitpolicy_files) \
4682         $(polkitpolicy_in_in_files:.policy.in.in=.policy)
4683 endif
4684
4685 EXTRA_DIST += \
4686         $(polkitpolicy_in_files) \
4687         $(polkitpolicy_in_in_files)
4688
4689 CLEANFILES += \
4690         $(nodist_systemunit_DATA) \
4691         $(nodist_userunit_DATA) \
4692         $(pkgconfigdata_DATA) \
4693         $(pkgconfiglib_DATA) \
4694         $(nodist_polkitpolicy_DATA)
4695
4696 # ------------------------------------------------------------------------------
4697 if ENABLE_MANPAGES
4698 man/custom-entities.ent:
4699         $(AM_V_GEN)$(MKDIR_P) $(dir $@)
4700         $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
4701          printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
4702          > $@ # '
4703
4704 DISTCLEANFILES += \
4705         man/custom-entities.ent
4706
4707 XSLTPROC_FLAGS = \
4708         --nonet \
4709         --xinclude \
4710         --stringparam man.output.quietly 1 \
4711         --stringparam funcsynopsis.style ansi \
4712         --stringparam man.authors.section.enabled 0 \
4713         --stringparam man.copyright.section.enabled 0 \
4714         --stringparam systemd.version $(VERSION) \
4715         --path '$(builddir)/man:$(srcdir)/man'
4716
4717 XSLTPROC_PROCESS_MAN = \
4718         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
4719
4720 XSLTPROC_PROCESS_HTML = \
4721         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
4722
4723 man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
4724         $(XSLTPROC_PROCESS_MAN)
4725
4726 man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
4727         $(XSLTPROC_PROCESS_MAN)
4728
4729 man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
4730         $(XSLTPROC_PROCESS_MAN)
4731
4732 man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
4733         $(XSLTPROC_PROCESS_MAN)
4734
4735 man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
4736         $(XSLTPROC_PROCESS_MAN)
4737
4738 man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
4739         $(XSLTPROC_PROCESS_HTML)
4740
4741 define html-alias
4742         $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
4743 endef
4744
4745 endif
4746
4747 EXTRA_DIST += \
4748         man/custom-html.xsl \
4749         man/custom-man.xsl
4750
4751 # ------------------------------------------------------------------------------
4752 if HAVE_SYSV_COMPAT
4753 sysvinit_DATA = \
4754         docs/sysvinit/README
4755
4756 varlog_DATA = \
4757         docs/var-log/README
4758
4759 docs/sysvinit/README: docs/sysvinit/README.in
4760         $(SED_PROCESS)
4761
4762 docs/var-log/README: docs/var-log/README.in
4763         $(SED_PROCESS)
4764
4765 CLEANFILES += \
4766         docs/sysvinit/README \
4767         docs/var-log/README
4768 endif
4769
4770 EXTRA_DIST += \
4771         docs/sysvinit/README.in \
4772         docs/var-log/README.in
4773
4774 SOCKETS_TARGET_WANTS += \
4775         systemd-initctl.socket \
4776         systemd-shutdownd.socket
4777
4778 if HAVE_SYSV_COMPAT
4779 RUNLEVEL1_TARGET_WANTS += \
4780         systemd-update-utmp-runlevel.service
4781 RUNLEVEL2_TARGET_WANTS += \
4782         systemd-update-utmp-runlevel.service
4783 RUNLEVEL3_TARGET_WANTS += \
4784         systemd-update-utmp-runlevel.service
4785 RUNLEVEL4_TARGET_WANTS += \
4786         systemd-update-utmp-runlevel.service
4787 RUNLEVEL5_TARGET_WANTS += \
4788         systemd-update-utmp-runlevel.service
4789 endif
4790 SYSINIT_TARGET_WANTS += \
4791         systemd-update-utmp.service
4792 LOCAL_FS_TARGET_WANTS += \
4793         systemd-remount-fs.service \
4794         tmp.mount
4795 MULTI_USER_TARGET_WANTS += \
4796         getty.target \
4797         systemd-ask-password-wall.path
4798 SYSINIT_TARGET_WANTS += \
4799         dev-hugepages.mount \
4800         dev-mqueue.mount \
4801         sys-kernel-config.mount \
4802         sys-kernel-debug.mount \
4803         sys-fs-fuse-connections.mount \
4804         systemd-sysctl.service \
4805         systemd-ask-password-console.path
4806
4807 if HAVE_SYSV_COMPAT
4808 SYSTEM_UNIT_ALIASES += \
4809         poweroff.target runlevel0.target \
4810         rescue.target runlevel1.target \
4811         multi-user.target runlevel2.target \
4812         multi-user.target runlevel3.target \
4813         multi-user.target runlevel4.target \
4814         graphical.target runlevel5.target \
4815         reboot.target runlevel6.target
4816 endif
4817
4818 SYSTEM_UNIT_ALIASES += \
4819         graphical.target default.target \
4820         reboot.target ctrl-alt-del.target \
4821         getty@.service autovt@.service
4822
4823 USER_UNIT_ALIASES += \
4824         $(systemunitdir)/shutdown.target shutdown.target \
4825         $(systemunitdir)/sockets.target sockets.target \
4826         $(systemunitdir)/busnames.target busnames.target \
4827         $(systemunitdir)/timers.target timers.target \
4828         $(systemunitdir)/paths.target paths.target \
4829         $(systemunitdir)/bluetooth.target bluetooth.target \
4830         $(systemunitdir)/printer.target printer.target \
4831         $(systemunitdir)/sound.target sound.target \
4832         $(systemunitdir)/smartcard.target smartcard.target
4833
4834 GENERAL_ALIASES += \
4835         $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
4836         $(systemunitdir)/getty@.service $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \
4837         $(pkgsysconfdir)/user $(sysconfdir)/xdg/systemd/user \
4838         ../system-services/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service
4839
4840 if HAVE_SYSV_COMPAT
4841 INSTALL_DIRS += \
4842         $(systemunitdir)/runlevel1.target.wants \
4843         $(systemunitdir)/runlevel2.target.wants \
4844         $(systemunitdir)/runlevel3.target.wants \
4845         $(systemunitdir)/runlevel4.target.wants \
4846         $(systemunitdir)/runlevel5.target.wants
4847 endif
4848
4849 INSTALL_DIRS += \
4850         $(prefix)/lib/modules-load.d \
4851         $(sysconfdir)/modules-load.d \
4852         $(prefix)/lib/systemd/network \
4853         $(sysconfdir)/systemd/network \
4854         $(prefix)/lib/sysctl.d \
4855         $(sysconfdir)/sysctl.d \
4856         $(prefix)/lib/kernel/install.d \
4857         $(sysconfdir)/kernel/install.d \
4858         $(systemshutdowndir) \
4859         $(systemsleepdir) \
4860         $(systemgeneratordir) \
4861         $(usergeneratordir) \
4862         \
4863         $(userunitdir) \
4864         $(pkgsysconfdir)/system \
4865         $(pkgsysconfdir)/system/multi-user.target.wants \
4866         $(pkgsysconfdir)/system/getty.target.wants \
4867         $(pkgsysconfdir)/user \
4868         $(dbussessionservicedir) \
4869         $(sysconfdir)/xdg/systemd
4870
4871 install-exec-hook: $(INSTALL_EXEC_HOOKS)
4872
4873 uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
4874
4875 install-data-hook: $(INSTALL_DATA_HOOKS)
4876
4877 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
4878
4879 clean-local: $(CLEAN_LOCAL_HOOKS)
4880         rm -rf $(abs_srcdir)/install-tree
4881         rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
4882               $(abs_srcdir)/hwdb/iab.txt
4883
4884 DISTCHECK_CONFIGURE_FLAGS = \
4885         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
4886         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
4887         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
4888         --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
4889         --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
4890         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
4891         --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
4892         --with-rootprefix=$$dc_install_base \
4893         --disable-split-usr \
4894         --enable-kdbus \
4895         --enable-compat-libs
4896
4897 if HAVE_SYSV_COMPAT
4898 DISTCHECK_CONFIGURE_FLAGS += \
4899         --with-sysvinit-path=$$dc_install_base/$(sysvinitdir) \
4900         --with-sysvrcnd-path=$$dc_install_base/$(sysvrcnddir)
4901 else
4902 DISTCHECK_CONFIGURE_FLAGS += \
4903         --with-sysvinit-path= \
4904         --with-sysvrcnd-path=
4905 endif
4906
4907 if ENABLE_GTK_DOC
4908 DISTCHECK_CONFIGURE_FLAGS += \
4909         --enable-gtk-doc
4910 endif
4911
4912 .PHONY: hwdb-update
4913 hwdb-update:
4914         ( cd $(top_srcdir)/hwdb && \
4915         wget -N http://www.linux-usb.org/usb.ids \
4916                 http://pci-ids.ucw.cz/v2.2/pci.ids \
4917                 http://standards.ieee.org/develop/regauth/oui/oui.txt \
4918                 http://standards.ieee.org/develop/regauth/iab/iab.txt && \
4919         ./ids-update.pl )
4920
4921 .PHONY: kdbus-update
4922 kdbus-update:
4923         ( cd $(top_srcdir)/src/libsystemd/ && \
4924         wget -N https://d-bus.googlecode.com/git/kdbus.h )
4925
4926 .PHONY: upload
4927 upload: all distcheck
4928         cp -v systemd-$(VERSION).tar.xz /home/lennart/git.fedora/systemd/
4929         scp systemd-$(VERSION).tar.xz fdo:/srv/www.freedesktop.org/www/software/systemd/
4930         scp man/*.html tango:public/systemd-man/
4931
4932 www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
4933 .PHONY: doc-sync
4934 doc-sync: all destdir-sphinx
4935         gtkdoc-rebase --html-dir=docs/libudev/html --online
4936         rsync -rlv --delete docs/libudev/html/ --omit-dir-times $(www_target)/libudev/
4937         gtkdoc-rebase --html-dir=docs/gudev/html --online
4938         rsync -rlv --delete docs/gudev/html/ --omit-dir-times $(www_target)/gudev/
4939         rsync -rlv --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
4940         rsync -rlv --delete --omit-dir-times docs/html/python-systemd/ $(www_target)/python-systemd/
4941
4942 .PHONY: git-tag
4943 git-tag:
4944         git tag "v$(VERSION)" -m "systemd $(VERSION)"
4945
4946 .PHONY: install-tree
4947 install-tree: all
4948         rm -rf $(abs_srcdir)/install-tree
4949         $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
4950         tree $(abs_srcdir)/install-tree
4951
4952 # Let's run all tests of the test suite, but under valgrind. Let's
4953 # exclude the one perl script we have in there
4954 .PHONY: valgrind-tests
4955 valgrind-tests: $(TESTS)
4956         $(AM_V_GEN)for f in $(filter-out %.pl, $^); do \
4957                 if file $$f | grep -q shell; then \
4958                 echo -e "$${x}Skipping non-binary $$f"; else \
4959                 echo -e "$${x}Running $$f"; \
4960                 libtool --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
4961                 x="\n\n"; \
4962         done
4963
4964 exported-%: %
4965         $(AM_V_GEN)nm -g --defined-only $(builddir)/.libs/$(<:.la=.so) 2>&1 /dev/null | grep " T " | cut -d" " -f3 > $@
4966
4967 exported: $(addprefix exported-, $(lib_LTLIBRARIES))
4968         $(AM_V_GEN)cat $^ > $@
4969
4970 .PHONY: check-api-docs
4971 check-api-docs: exported man
4972         $(AM_V_GEN)for symbol in `cat exported` ; do \
4973                 if test -f $(builddir)/man/$$symbol.html ; then \
4974                         echo "  Symbol $$symbol() is documented." ; \
4975                 else \
4976                         echo "‣ Symbol $$symbol() lacks documentation." ; \
4977                 fi ; \
4978         done
4979
4980 OBJECT_VARIABLES:=$(filter %_OBJECTS,$(.VARIABLES))
4981 ALL_OBJECTS:=$(foreach v,$(OBJECT_VARIABLES),$($(v)))
4982
4983 undefined defined: $(ALL_OBJECTS)
4984         $(AM_V_GEN)for f in $(ALL_OBJECTS) ; do \
4985                 nm -g --$@-only `echo $(builddir)/"$$f" | sed -e 's,\([^/]*\).lo$$,.libs/\1.o,'` ; \
4986         done | cut -c 20- | cut -d @ -f 1 | sort -u > $@
4987
4988 CLEANFILES += \
4989         defined \
4990         undefined
4991
4992 .PHONY: check-api-unused
4993 check-api-unused: defined undefined exported
4994         ( cat exported undefined ) | sort -u  | diff -u - defined | grep ^+ | grep -v ^+++ | cut -c2-
4995
4996 .PHONY: check-includes
4997 check-includes: $(top_srcdir)/tools/check-includes.pl
4998         $(AM_V_GEN) find * -name '*.[hcS]' -type f -print | sort -u \
4999                 | xargs $(top_srcdir)/tools/check-includes.pl
5000
5001 EXTRA_DIST += \
5002         $(top_srcdir)/tools/check-includes.pl
5003
5004 # Stupid test that everything purported to be exported really is
5005 define generate-sym-test
5006         $(AM_V_at)$(MKDIR_P) $(dir $@)
5007         $(AM_V_at)printf '#include <stdio.h>\n' > $@
5008         $(AM_V_at)printf '#include "%s"\n' $(notdir $(filter %.h, $^)) >> $@
5009         $(AM_V_at)printf 'void* functions[] = {\n' >> $@
5010         $(AM_V_GEN)sed -r -n 's/^ +([a-zA-Z0-9_]+);/\1,/p' $< >> $@
5011         $(AM_V_at)printf '};\nint main(void) {\n' >> $@
5012         $(AM_V_at)printf 'unsigned i; for (i=0;i<sizeof(functions)/sizeof(void*);i++) printf("%%p\\n", functions[i]);\n' >> $@
5013         $(AM_V_at)printf 'return 0; }\n' >> $@
5014 endef
5015
5016 test-libsystemd-sym.c: \
5017                 $(top_builddir)/src/libsystemd/libsystemd.sym \
5018                 src/systemd/sd-journal.h \
5019                 src/systemd/sd-daemon.h \
5020                 src/systemd/sd-login.h \
5021                 src/systemd/sd-bus.h \
5022                 src/systemd/sd-utf8.h
5023         $(generate-sym-test)
5024
5025 test-libudev-sym.c: \
5026                 src/libudev/libudev.sym \
5027                 src/udev/udev.h
5028         $(generate-sym-test)
5029
5030 test_libsystemd_sym_SOURCES = \
5031         test-libsystemd-sym.c
5032 test_libsystemd_sym_LDADD = \
5033         libsystemd.la
5034
5035 test_libudev_sym_SOURCES = \
5036         test-libudev-sym.c
5037 test_libudev_sym_LDADD = \
5038         libudev.la
5039
5040 BUILT_SOURCES += \
5041         $(test_libsystemd_sym_SOURCES) \
5042         $(test_libudev_sym_SOURCES)
5043
5044 tests += \
5045         test-libsystemd-sym \
5046         test-libudev-sym
5047
5048 if ENABLE_COMPAT_LIBS
5049 test-libsystemd-daemon-sym.c: \
5050                 src/compat-libs/libsystemd-daemon.sym \
5051                 src/systemd/sd-daemon.h
5052         $(generate-sym-test)
5053
5054 test-libsystemd-id128-sym.c: \
5055                 src/compat-libs/libsystemd-id128.sym \
5056                 src/systemd/sd-id128.h
5057         $(generate-sym-test)
5058
5059 test-libsystemd-journal-sym.c: \
5060                 src/compat-libs/libsystemd-journal.sym \
5061                 src/systemd/sd-journal.h
5062         $(generate-sym-test)
5063
5064 test-libsystemd-login-sym.c: \
5065                 src/compat-libs/libsystemd-login.sym \
5066                 src/systemd/sd-login.h
5067         $(generate-sym-test)
5068
5069 test_libsystemd_daemon_sym_SOURCES = \
5070         test-libsystemd-daemon-sym.c
5071 test_libsystemd_daemon_sym_LDADD = \
5072         libsystemd-daemon.la
5073
5074 test_libsystemd_id128_sym_SOURCES = \
5075         test-libsystemd-id128-sym.c
5076 test_libsystemd_id128_sym_LDADD = \
5077         libsystemd-id128.la
5078
5079 test_libsystemd_journal_sym_SOURCES = \
5080         test-libsystemd-journal-sym.c
5081 test_libsystemd_journal_sym_LDADD = \
5082         libsystemd-journal.la
5083
5084 test_libsystemd_login_sym_SOURCES = \
5085         test-libsystemd-login-sym.c
5086 test_libsystemd_login_sym_LDADD = \
5087         libsystemd-login.la
5088
5089 BUILT_SOURCES += \
5090         $(test_libsystemd_journal_sym_SOURCES) \
5091         $(test_libsystemd_login_sym_SOURCES) \
5092         $(test_libsystemd_id128_sym_SOURCES) \
5093         $(test_libsystemd_daemon_sym_SOURCES)
5094
5095 tests += \
5096         test-libsystemd-journal-sym \
5097         test-libsystemd-login-sym \
5098         test-libsystemd-id128-sym \
5099         test-libsystemd-daemon-sym
5100 endif
5101
5102 .PHONY: cppcheck
5103 cppcheck:
5104         cppcheck --enable=all -q $(top_srcdir)
5105
5106 # Used to extract compile flags for YCM.
5107 print-%:
5108         @echo $($*)
5109
5110 git-contrib:
5111         @git shortlog -s `git describe --abbrev=0`.. | cut -c8- | awk '{ print $$0 "," }' | sort -u