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