chiark / gitweb /
sysusers: hide generate .conf file
[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 rootlibexec_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
3862
3863 EXTRA_DIST += \
3864         units/systemd-rfkill@.service.in
3865
3866 # ------------------------------------------------------------------------------
3867 if HAVE_LIBCRYPTSETUP
3868 rootlibexec_PROGRAMS += \
3869         systemd-cryptsetup
3870
3871 systemgenerator_PROGRAMS += \
3872         systemd-cryptsetup-generator
3873
3874 dist_systemunit_DATA += \
3875         units/cryptsetup.target
3876
3877 systemd_cryptsetup_SOURCES = \
3878         src/cryptsetup/cryptsetup.c
3879
3880 systemd_cryptsetup_CFLAGS = \
3881         $(AM_CFLAGS) \
3882         $(LIBCRYPTSETUP_CFLAGS)
3883
3884 systemd_cryptsetup_LDADD = \
3885         libsystemd-label.la \
3886         libudev-internal.la \
3887         libsystemd-shared.la \
3888         $(LIBCRYPTSETUP_LIBS)
3889
3890 systemd_cryptsetup_generator_SOURCES = \
3891         src/cryptsetup/cryptsetup-generator.c
3892
3893 systemd_cryptsetup_generator_LDADD = \
3894         libsystemd-label.la \
3895         libsystemd-shared.la
3896
3897 SYSINIT_TARGET_WANTS += \
3898         cryptsetup.target
3899
3900 endif
3901
3902 # ------------------------------------------------------------------------------
3903 if ENABLE_HOSTNAMED
3904 systemd_hostnamed_SOURCES = \
3905         src/hostname/hostnamed.c
3906
3907 systemd_hostnamed_LDADD = \
3908         libsystemd-label.la \
3909         libsystemd-internal.la \
3910         libsystemd-shared.la
3911
3912 rootlibexec_PROGRAMS += \
3913         systemd-hostnamed
3914
3915 nodist_systemunit_DATA += \
3916         units/systemd-hostnamed.service
3917
3918 dist_systemunit_DATA += \
3919         units/org.freedesktop.hostname1.busname
3920
3921 dist_dbuspolicy_DATA += \
3922         src/hostname/org.freedesktop.hostname1.conf
3923
3924 dist_dbussystemservice_DATA += \
3925         src/hostname/org.freedesktop.hostname1.service
3926
3927 polkitpolicy_files += \
3928         src/hostname/org.freedesktop.hostname1.policy
3929
3930 SYSTEM_UNIT_ALIASES += \
3931         systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
3932
3933 BUSNAMES_TARGET_WANTS += \
3934         org.freedesktop.hostname1.busname
3935
3936 hostnamectl_SOURCES = \
3937         src/hostname/hostnamectl.c
3938
3939 hostnamectl_LDADD = \
3940         libsystemd-internal.la \
3941         libsystemd-shared.la
3942
3943 bin_PROGRAMS += \
3944         hostnamectl
3945
3946 dist_bashcompletion_DATA += \
3947         shell-completion/bash/hostnamectl
3948
3949 dist_zshcompletion_DATA += \
3950         shell-completion/zsh/_hostnamectl
3951
3952 endif
3953
3954 polkitpolicy_in_files += \
3955         src/hostname/org.freedesktop.hostname1.policy.in
3956
3957 EXTRA_DIST += \
3958         units/systemd-hostnamed.service.in
3959
3960 # ------------------------------------------------------------------------------
3961 if ENABLE_KDBUS
3962 dist_systemunit_DATA += \
3963         units/org.freedesktop.systemd1.busname
3964
3965 BUSNAMES_TARGET_WANTS += \
3966         org.freedesktop.systemd1.busname
3967 endif
3968
3969 # ------------------------------------------------------------------------------
3970 if ENABLE_LOCALED
3971 systemd_localed_SOURCES = \
3972         src/locale/localed.c
3973
3974 systemd_localed_LDADD = \
3975         libsystemd-label.la \
3976         libsystemd-internal.la \
3977         libsystemd-shared.la
3978
3979 nodist_systemunit_DATA += \
3980         units/systemd-localed.service
3981
3982 dist_systemunit_DATA += \
3983         units/org.freedesktop.locale1.busname
3984
3985 rootlibexec_PROGRAMS += \
3986         systemd-localed
3987
3988 dist_dbuspolicy_DATA += \
3989         src/locale/org.freedesktop.locale1.conf
3990
3991 dist_dbussystemservice_DATA += \
3992         src/locale/org.freedesktop.locale1.service
3993
3994 polkitpolicy_files += \
3995         src/locale/org.freedesktop.locale1.policy
3996
3997 SYSTEM_UNIT_ALIASES += \
3998         systemd-localed.service dbus-org.freedesktop.locale1.service
3999
4000 BUSNAMES_TARGET_WANTS += \
4001         org.freedesktop.locale1.busname
4002
4003 dist_pkgdata_DATA += \
4004         src/locale/kbd-model-map
4005
4006 dist_noinst_SCRIPT = \
4007         src/locale/generate-kbd-model-map
4008
4009 update-kbd-model-map: src/locale/generate-kbd-model-map
4010         $PYTHON $< >src/locale/kbd-model-map
4011
4012 localectl_SOURCES = \
4013         src/locale/localectl.c
4014
4015 localectl_LDADD = \
4016         libsystemd-internal.la \
4017         libsystemd-shared.la
4018
4019 bin_PROGRAMS += \
4020         localectl
4021
4022 dist_bashcompletion_DATA += \
4023         shell-completion/bash/localectl
4024
4025 dist_zshcompletion_DATA += \
4026         shell-completion/zsh/_localectl
4027
4028 endif
4029
4030 .PHONY: update-kbd-model-map
4031
4032 polkitpolicy_in_files += \
4033         src/locale/org.freedesktop.locale1.policy.in
4034
4035 EXTRA_DIST += \
4036         units/systemd-localed.service.in
4037
4038 # ------------------------------------------------------------------------------
4039 if ENABLE_TIMEDATED
4040 systemd_timedated_SOURCES = \
4041         src/timedate/timedated.c
4042
4043 systemd_timedated_LDADD = \
4044         libsystemd-label.la \
4045         libsystemd-internal.la \
4046         libsystemd-shared.la
4047
4048 rootlibexec_PROGRAMS += \
4049         systemd-timedated
4050
4051 dist_dbussystemservice_DATA += \
4052         src/timedate/org.freedesktop.timedate1.service
4053
4054 dist_dbuspolicy_DATA += \
4055         src/timedate/org.freedesktop.timedate1.conf
4056
4057 nodist_systemunit_DATA += \
4058         units/systemd-timedated.service
4059
4060 dist_systemunit_DATA += \
4061         units/org.freedesktop.timedate1.busname
4062
4063 polkitpolicy_files += \
4064         src/timedate/org.freedesktop.timedate1.policy
4065
4066 INSTALL_DIRS += \
4067         $(prefix)/lib/systemd/ntp-units.d \
4068         $(sysconfdir)/systemd/ntp-units.d
4069
4070 SYSTEM_UNIT_ALIASES += \
4071         systemd-timedated.service dbus-org.freedesktop.timedate1.service
4072
4073 BUSNAMES_TARGET_WANTS += \
4074         org.freedesktop.timedate1.busname
4075
4076 timedatectl_SOURCES = \
4077         src/timedate/timedatectl.c
4078
4079 timedatectl_LDADD = \
4080         libsystemd-internal.la \
4081         libsystemd-shared.la
4082
4083 bin_PROGRAMS += \
4084         timedatectl
4085
4086 dist_bashcompletion_DATA += \
4087         shell-completion/bash/timedatectl
4088
4089 dist_zshcompletion_DATA += \
4090         shell-completion/zsh/_timedatectl
4091 endif
4092
4093 polkitpolicy_in_files += \
4094         src/timedate/org.freedesktop.timedate1.policy.in
4095
4096 EXTRA_DIST += \
4097         units/systemd-timedated.service.in
4098
4099 # ------------------------------------------------------------------------------
4100 if ENABLE_TIMESYNCD
4101 systemd_timesyncd_SOURCES = \
4102         src/timesync/timesyncd.c \
4103         src/timesync/timesyncd.h
4104
4105 nodist_systemd_timesyncd_SOURCES = \
4106         src/timesync/timesyncd-gperf.c
4107
4108 EXTRA_DIST += \
4109         src/timesync/timesyncd-gperf.gperf
4110
4111 CLEANFILES += \
4112         src/timesync/timesyncd-gperf.c
4113
4114 systemd_timesyncd_LDADD = \
4115         libsystemd-resolve.la \
4116         libsystemd-network.la \
4117         libsystemd-label.la \
4118         libsystemd-capability.la \
4119         libsystemd-internal.la \
4120         libsystemd-shared.la \
4121         -lm
4122
4123 rootlibexec_PROGRAMS += \
4124         systemd-timesyncd
4125
4126 nodist_systemunit_DATA += \
4127         units/systemd-timesyncd.service
4128
4129 EXTRA_DIST += \
4130         units/systemd-timesyncd.service.in
4131
4132 nodist_pkgsysconf_DATA += \
4133         src/timesync/timesyncd.conf
4134
4135 EXTRA_DIST += \
4136         src/timesync/timesyncd.conf.in
4137
4138 CLEANFILES += \
4139         src/timesync/timesyncd.conf
4140
4141 dist_ntpunits_DATA = \
4142         src/timesync/90-systemd.list
4143
4144 endif
4145
4146 # ------------------------------------------------------------------------------
4147 if HAVE_MYHOSTNAME
4148 libnss_myhostname_la_SOURCES = \
4149         src/nss-myhostname/nss-myhostname.c \
4150         src/nss-myhostname/ifconf.h \
4151         src/nss-myhostname/netlink.c
4152
4153 libnss_myhostname_la_LDFLAGS = \
4154         $(AM_LDFLAGS) \
4155         -module \
4156         -export-dynamic \
4157         -avoid-version \
4158         -shared \
4159         -shrext .so.2
4160
4161 libnss_myhostname_la_LIBADD = \
4162         libsystemd-shared.la \
4163         libsystemd-internal.la
4164
4165 lib_LTLIBRARIES += \
4166         libnss_myhostname.la
4167 endif
4168
4169 # ------------------------------------------------------------------------------
4170 if ENABLE_MACHINED
4171 systemd_machined_SOURCES = \
4172         src/machine/machined.c \
4173         src/machine/machined.h
4174
4175 systemd_machined_LDADD = \
4176         libsystemd-machine-core.la
4177
4178 rootlibexec_PROGRAMS += \
4179         systemd-machined
4180
4181 libsystemd_machine_core_la_SOURCES = \
4182         src/machine/machined-dbus.c \
4183         src/machine/machine.c \
4184         src/machine/machine.h \
4185         src/machine/machine-dbus.c
4186
4187 libsystemd_machine_core_la_LIBADD = \
4188         libsystemd-label.la \
4189         libsystemd-internal.la \
4190         libudev-internal.la \
4191         libsystemd-shared.la
4192
4193 noinst_LTLIBRARIES += \
4194         libsystemd-machine-core.la
4195
4196 machinectl_SOURCES = \
4197         src/machine/machinectl.c
4198
4199 machinectl_LDADD = \
4200         libsystemd-internal.la \
4201         libsystemd-shared.la
4202
4203 rootbin_PROGRAMS += \
4204         machinectl
4205
4206 dist_bashcompletion_DATA += \
4207         shell-completion/bash/machinectl
4208
4209 test_machine_tables_SOURCES = \
4210         src/machine/test-machine-tables.c
4211
4212 test_machine_tables_LDADD = \
4213         libsystemd-machine-core.la
4214
4215 tests += \
4216         test-machine-tables
4217
4218 nodist_systemunit_DATA += \
4219         units/systemd-machined.service
4220
4221 dist_systemunit_DATA += \
4222         units/machine.slice \
4223         units/org.freedesktop.machine1.busname
4224
4225 dist_dbussystemservice_DATA += \
4226         src/machine/org.freedesktop.machine1.service
4227
4228 dist_dbuspolicy_DATA += \
4229         src/machine/org.freedesktop.machine1.conf
4230
4231 dist_zshcompletion_DATA += \
4232         shell-completion/zsh/_machinectl \
4233         shell-completion/zsh/_sd_machines
4234
4235 SYSTEM_UNIT_ALIASES += \
4236         systemd-machined.service dbus-org.freedesktop.machine1.service
4237
4238 BUSNAMES_TARGET_WANTS += \
4239         org.freedesktop.machine1.busname
4240
4241 EXTRA_DIST += \
4242         units/systemd-machined.service.in
4243
4244 endif
4245
4246 # ------------------------------------------------------------------------------
4247 if ENABLE_RESOLVED
4248 systemd_resolved_SOURCES = \
4249         src/resolve/resolved.h \
4250         src/resolve/resolved.c \
4251         src/resolve/resolved-manager.c
4252
4253 systemd_resolved_CFLAGS = \
4254         $(AM_CFLAGS) \
4255         $(KMOD_CFLAGS)
4256
4257 nodist_systemd_resolved_SOURCES = \
4258         src/resolve/resolved-gperf.c
4259
4260 EXTRA_DIST += \
4261         src/resolve/resolved-gperf.gperf
4262
4263 CLEANFILES += \
4264         src/resolve/resolved-gperf.c
4265
4266 systemd_resolved_LDADD = \
4267         libsystemd-capability.la \
4268         libsystemd-network.la \
4269         libsystemd-label.la \
4270         libsystemd-internal.la \
4271         libsystemd-shared.la
4272
4273 rootlibexec_PROGRAMS += \
4274         systemd-resolved
4275
4276 nodist_systemunit_DATA += \
4277         units/systemd-resolved.service
4278
4279 EXTRA_DIST += \
4280         units/systemd-resolved.service.in
4281
4282 GENERAL_ALIASES += \
4283         $(systemunitdir)/systemd-resolved.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-resolved.service
4284
4285 nodist_pkgsysconf_DATA += \
4286         src/resolve/resolved.conf
4287
4288 EXTRA_DIST += \
4289         src/resolve/resolved.conf.in
4290
4291 CLEANFILES += \
4292         src/resolve/resolved.conf
4293
4294 endif
4295
4296 # ------------------------------------------------------------------------------
4297 if ENABLE_NETWORKD
4298 rootlibexec_PROGRAMS += \
4299         systemd-networkd
4300
4301 systemd_networkd_SOURCES = \
4302         src/network/networkd.c
4303
4304 systemd_networkd_LDADD = \
4305         libsystemd-networkd-core.la \
4306         libsystemd-capability.la
4307
4308 noinst_LTLIBRARIES += \
4309         libsystemd-networkd-core.la
4310
4311 libsystemd_networkd_core_la_CFLAGS = \
4312         $(AM_CFLAGS)
4313
4314 libsystemd_networkd_core_la_SOURCES = \
4315         src/libsystemd-network/network-internal.h \
4316         src/network/networkd.h \
4317         src/network/networkd-link.c \
4318         src/network/networkd-netdev.c \
4319         src/network/networkd-tunnel.c \
4320         src/network/networkd-veth.c \
4321         src/network/networkd-network.c \
4322         src/network/networkd-address.c \
4323         src/network/networkd-route.c \
4324         src/network/networkd-manager.c
4325
4326 nodist_libsystemd_networkd_core_la_SOURCES = \
4327         src/network/networkd-network-gperf.c \
4328         src/network/networkd-netdev-gperf.c
4329
4330 libsystemd_networkd_core_la_LIBADD = \
4331         libudev-internal.la \
4332         libsystemd-internal.la \
4333         libsystemd-network.la \
4334         libsystemd-label.la \
4335         libsystemd-shared.la
4336
4337 rootlibexec_PROGRAMS += \
4338         systemd-networkd-wait-online
4339
4340 systemd_networkd_wait_online_CFLAGS = \
4341         $(AM_CFLAGS)
4342
4343 systemd_networkd_wait_online_SOURCES = \
4344         src/libsystemd-network/network-internal.h \
4345         src/network/networkd-wait-online.c \
4346         src/network/networkd-wait-online.h
4347
4348 systemd_networkd_wait_online_LDADD = \
4349         libsystemd-network.la \
4350         libudev-internal.la \
4351         libsystemd-internal.la \
4352         libsystemd-shared.la
4353
4354 test_network_SOURCES = \
4355         src/network/test-network.c
4356
4357 test_network_CFLAGS = \
4358         $(AM_CFLAGS)
4359
4360 test_network_LDADD = \
4361         libsystemd-networkd-core.la
4362
4363 tests += \
4364         test-network
4365
4366 nodist_systemunit_DATA += \
4367         units/systemd-networkd.service \
4368         units/systemd-networkd-wait-online.service
4369
4370 GENERAL_ALIASES += \
4371         $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \
4372         $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service
4373
4374 EXTRA_DIST += \
4375         src/network/networkd-network-gperf.gperf \
4376         src/network/networkd-netdev-gperf.gperf \
4377         units/systemd-networkd.service.in \
4378         units/systemd-networkd-wait-online.service.in
4379
4380 CLEANFILES += \
4381         src/network/networkd-network-gperf.c \
4382         src/network/networkd-netdev-gperf.c
4383 endif
4384
4385 # ------------------------------------------------------------------------------
4386 if ENABLE_LOGIND
4387 systemd_logind_SOURCES = \
4388         src/login/logind.c \
4389         src/login/logind.h
4390
4391 nodist_systemd_logind_SOURCES = \
4392         src/login/logind-gperf.c
4393
4394 systemd_logind_LDADD = \
4395         libsystemd-logind-core.la
4396
4397 libsystemd_logind_core_la_SOURCES = \
4398         src/login/logind-core.c \
4399         src/login/logind-device.c \
4400         src/login/logind-device.h \
4401         src/login/logind-button.c \
4402         src/login/logind-button.h \
4403         src/login/logind-action.c \
4404         src/login/logind-action.h \
4405         src/login/logind-seat.c \
4406         src/login/logind-seat.h \
4407         src/login/logind-session.c \
4408         src/login/logind-session.h \
4409         src/login/logind-session-device.c \
4410         src/login/logind-session-device.h \
4411         src/login/logind-user.c \
4412         src/login/logind-user.h \
4413         src/login/logind-inhibit.c \
4414         src/login/logind-inhibit.h \
4415         src/login/logind-dbus.c \
4416         src/login/logind-session-dbus.c \
4417         src/login/logind-seat-dbus.c \
4418         src/login/logind-user-dbus.c \
4419         src/login/logind-acl.h
4420
4421 libsystemd_logind_core_la_LIBADD = \
4422         libsystemd-label.la \
4423         libsystemd-capability.la \
4424         libsystemd-internal.la \
4425         libudev-internal.la \
4426         libsystemd-shared.la
4427
4428 if HAVE_ACL
4429 libsystemd_logind_core_la_SOURCES += \
4430         src/login/logind-acl.c
4431
4432 libsystemd_logind_core_la_LIBADD += \
4433         libsystemd-acl.la
4434 endif
4435
4436 noinst_LTLIBRARIES += \
4437         libsystemd-logind-core.la
4438
4439 systemd_user_sessions_SOURCES = \
4440         src/login/user-sessions.c
4441
4442 systemd_user_sessions_LDADD = \
4443         libsystemd-shared.la
4444
4445 rootlibexec_PROGRAMS += \
4446         systemd-logind \
4447         systemd-user-sessions
4448
4449 loginctl_SOURCES = \
4450         src/login/loginctl.c \
4451         src/login/sysfs-show.c
4452
4453 loginctl_LDADD = \
4454         libsystemd-internal.la \
4455         libudev-internal.la \
4456         libsystemd-shared.la
4457
4458 rootbin_PROGRAMS += \
4459         loginctl
4460
4461 dist_bashcompletion_DATA += \
4462         shell-completion/bash/loginctl
4463
4464 dist_zshcompletion_DATA += \
4465         shell-completion/zsh/_loginctl \
4466         shell-completion/zsh/_systemd-inhibit
4467
4468 systemd_inhibit_SOURCES = \
4469         src/login/inhibit.c
4470
4471 systemd_inhibit_LDADD = \
4472         libsystemd-internal.la \
4473         libsystemd-shared.la
4474
4475 rootbin_PROGRAMS += \
4476         systemd-inhibit
4477
4478 test_login_SOURCES = \
4479         src/libsystemd/sd-login/test-login.c
4480
4481 test_login_LDADD = \
4482         libsystemd-internal.la \
4483         libsystemd-shared.la
4484
4485 test_login_shared_SOURCES = \
4486         src/login/test-login-shared.c
4487
4488 test_login_shared_LDADD = \
4489         libsystemd-internal.la \
4490         libsystemd-shared.la
4491
4492 test_inhibit_SOURCES = \
4493         src/login/test-inhibit.c
4494
4495 test_inhibit_LDADD = \
4496         libsystemd-internal.la \
4497         libsystemd-shared.la
4498
4499 test_login_tables_SOURCES = \
4500         src/login/test-login-tables.c
4501
4502 test_login_tables_LDADD = \
4503         libsystemd-logind-core.la
4504
4505 manual_tests += \
4506         test-login \
4507         test-inhibit
4508
4509 tests += \
4510         test-login-tables \
4511         test-login-shared
4512
4513 if HAVE_PAM
4514 pam_systemd_la_SOURCES = \
4515         src/login/pam-module.c
4516
4517 pam_systemd_la_CFLAGS = \
4518         $(AM_CFLAGS) \
4519         $(PAM_CFLAGS) \
4520         -fvisibility=hidden
4521
4522 pam_systemd_la_LDFLAGS = \
4523         $(AM_LDFLAGS) \
4524         -module \
4525         -export-dynamic \
4526         -avoid-version \
4527         -shared \
4528         -export-symbols-regex '^pam_sm_.*'
4529
4530 pam_systemd_la_LIBADD = \
4531         libsystemd-capability.la \
4532         libsystemd-internal.la \
4533         libsystemd-shared.la \
4534         $(PAM_LIBS)
4535
4536 pamlib_LTLIBRARIES = \
4537         pam_systemd.la
4538
4539 dist_pamconf_DATA = \
4540         src/login/systemd-user
4541 endif
4542
4543 nodist_systemunit_DATA += \
4544         units/systemd-logind.service \
4545         units/systemd-user-sessions.service
4546
4547 dist_systemunit_DATA += \
4548         units/user.slice \
4549         units/org.freedesktop.login1.busname
4550
4551 dist_dbussystemservice_DATA += \
4552         src/login/org.freedesktop.login1.service
4553
4554 dist_dbuspolicy_DATA += \
4555         src/login/org.freedesktop.login1.conf
4556
4557 dist_pkgsysconf_DATA += \
4558         src/login/logind.conf
4559
4560 polkitpolicy_files += \
4561         src/login/org.freedesktop.login1.policy
4562
4563 INSTALL_DIRS += \
4564         $(systemdstatedir)
4565
4566 MULTI_USER_TARGET_WANTS += \
4567         systemd-logind.service \
4568         systemd-user-sessions.service
4569
4570 SYSTEM_UNIT_ALIASES += \
4571         systemd-logind.service dbus-org.freedesktop.login1.service
4572
4573 BUSNAMES_TARGET_WANTS += \
4574         org.freedesktop.login1.busname
4575
4576 if ENABLE_MULTI_SEAT_X
4577
4578 systemd_multi_seat_x_SOURCES = \
4579         src/login/multi-seat-x.c
4580
4581 systemd_multi_seat_x_LDADD = \
4582         libsystemd-label.la \
4583         libsystemd-shared.la
4584
4585 rootlibexec_PROGRAMS += \
4586         systemd-multi-seat-x
4587
4588 endif
4589
4590 dist_udevrules_DATA += \
4591         src/login/70-uaccess.rules \
4592         src/login/70-power-switch.rules
4593
4594 nodist_udevrules_DATA += \
4595         src/login/71-seat.rules \
4596         src/login/73-seat-late.rules
4597
4598 CLEANFILES += \
4599         src/login/logind-gperf.c \
4600         src/login/71-seat.rules \
4601         src/login/73-seat-late.rules
4602 endif
4603
4604 polkitpolicy_in_files += \
4605         src/login/org.freedesktop.login1.policy.in
4606
4607 EXTRA_DIST += \
4608         src/login/logind-gperf.gperf \
4609         src/login/71-seat.rules.in \
4610         src/login/73-seat-late.rules.in \
4611         units/systemd-logind.service.in \
4612         units/systemd-user-sessions.service.in
4613
4614 # ------------------------------------------------------------------------------
4615 if HAVE_PYTHON_DEVEL
4616 pkgpyexec_LTLIBRARIES = \
4617         _journal.la \
4618         id128.la \
4619         _daemon.la \
4620         _reader.la \
4621         login.la
4622
4623 _journal_la_SOURCES = \
4624         src/python-systemd/_journal.c
4625
4626 _journal_la_CFLAGS = \
4627         $(AM_CFLAGS) \
4628         -fvisibility=default \
4629         $(PYTHON_DEVEL_CFLAGS)
4630
4631 _journal_la_LDFLAGS = \
4632         $(AM_LDFLAGS) \
4633         -shared \
4634         -module \
4635         -avoid-version
4636
4637 _journal_la_LIBADD = \
4638         $(PYTHON_DEVEL_LIBS) \
4639         libsystemd.la
4640
4641 id128_la_SOURCES = \
4642         src/python-systemd/id128.c \
4643         src/python-systemd/id128-constants.h \
4644         src/python-systemd/pyutil.c \
4645         src/python-systemd/pyutil.h
4646
4647 id128_la_CFLAGS = \
4648         $(AM_CFLAGS) \
4649         -fvisibility=default \
4650         $(PYTHON_DEVEL_CFLAGS) \
4651         -I$(top_builddir)/src/python-systemd
4652
4653 id128_la_LDFLAGS = \
4654         $(AM_LDFLAGS) \
4655         -shared \
4656         -module \
4657         -avoid-version
4658
4659 id128_la_LIBADD = \
4660         $(PYTHON_DEVEL_LIBS) \
4661         libsystemd-shared.la \
4662         libsystemd.la
4663
4664 _daemon_la_SOURCES = \
4665         src/python-systemd/_daemon.c \
4666         src/python-systemd/pyutil.c \
4667         src/python-systemd/pyutil.h
4668
4669 _daemon_la_CFLAGS = \
4670         $(AM_CFLAGS) \
4671         -fvisibility=default \
4672         $(PYTHON_DEVEL_CFLAGS) \
4673         -I$(top_builddir)/src/python-systemd
4674
4675 _daemon_la_LDFLAGS = \
4676         $(AM_LDFLAGS) \
4677         -shared \
4678         -module \
4679         -avoid-version
4680
4681 _daemon_la_LIBADD = \
4682         $(PYTHON_DEVEL_LIBS) \
4683         libsystemd-shared.la \
4684         libsystemd.la
4685
4686 _reader_la_SOURCES = \
4687         src/python-systemd/_reader.c \
4688         src/python-systemd/pyutil.c \
4689         src/python-systemd/pyutil.h
4690
4691 _reader_la_CFLAGS = \
4692         $(AM_CFLAGS) \
4693         -fvisibility=default \
4694         $(PYTHON_DEVEL_CFLAGS)
4695
4696 _reader_la_LDFLAGS = \
4697         $(AM_LDFLAGS) \
4698         -shared \
4699         -module \
4700         -avoid-version
4701
4702 _reader_la_LIBADD = \
4703         $(PYTHON_DEVEL_LIBS) \
4704         libsystemd-shared.la \
4705         libsystemd.la
4706
4707 login_la_SOURCES = \
4708         src/python-systemd/login.c \
4709         src/python-systemd/pyutil.c \
4710         src/python-systemd/pyutil.h
4711
4712 login_la_CFLAGS = \
4713         $(AM_CFLAGS) \
4714         -fvisibility=default \
4715         $(PYTHON_DEVEL_CFLAGS)
4716
4717 login_la_LDFLAGS = \
4718         $(AM_LDFLAGS) \
4719         -shared \
4720         -module \
4721         -avoid-version
4722
4723 login_la_LIBADD = \
4724         $(PYTHON_DEVEL_LIBS) \
4725         libsystemd-shared.la \
4726         libsystemd.la
4727
4728 dist_pkgpyexec_PYTHON = \
4729         src/python-systemd/journal.py \
4730         src/python-systemd/daemon.py \
4731         src/python-systemd/__init__.py
4732
4733 src/python-systemd/id128-constants.h: src/systemd/sd-messages.h
4734         $(AM_V_at)$(MKDIR_P) $(dir $@)
4735         $(AM_V_GEN)$(SED) -n -r 's/,//g; s/#define (SD_MESSAGE_[A-Z0-9_]+)\s.*/add_id(m, "\1", \1) JOINER/p' <$< >$@
4736
4737 BUILT_SOURCES += \
4738         src/python-systemd/id128-constants.h
4739
4740 SPHINXOPTS = -D version=$(VERSION) -D release=$(VERSION)
4741 sphinx-%:
4742         $(AM_V_at)test -n "$(SPHINX_BUILD)" || { echo " *** sphinx-build is not available"; exit 1; }
4743         $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/docs/html/python-systemd/
4744         $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/docs/html/python-systemd/
4745
4746 python-shell:
4747         $(AM_V_at)echo "Starting python with $(DESTDIR)$(pyexecdir)"
4748         $(AM_V_at)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(PYTHON)
4749
4750 destdir-sphinx: all
4751         dir="$$(mktemp -d /tmp/systemd-install.XXXXXX)" && \
4752                 $(MAKE) DESTDIR="$$dir" install && \
4753                 $(MAKE) DESTDIR="$$dir" sphinx-html && \
4754                 rm -rf "$$dir"
4755
4756 endif
4757
4758 CLEAN_LOCAL_HOOKS += clean-sphinx
4759
4760 .PHONY: python-shell destdir-sphinx clean-sphinx clean-python
4761
4762 clean-sphinx:
4763         -rm -rf docs/html/python-systemd/
4764
4765 # Remove Python stuff, e.g. to force rebuilding for a different Python version.
4766 clean-python:
4767         -rm -rf src/python-systemd/.libs src/python-systemd/*.l[ao]
4768         -rm -f _daemon.la id128.la _journal.la login.la _reader.la
4769
4770 # ------------------------------------------------------------------------------
4771 if ENABLE_COMPAT_LIBS
4772 EXTRA_DIST += \
4773         src/compat-libs/linkwarning.h
4774
4775 libsystemd-%.c: src/compat-libs/libsystemd-%.sym
4776         $(AM_V_at)$(MKDIR_P) $(dir $@)
4777         $(AM_V_GEN)sed -r -n 's/^ +(sd_.*);/obsolete_lib(\1,$(notdir $(basename $<)));/p' <$< >$@
4778
4779 BUILT_SOURCES += \
4780         libsystemd-journal.c \
4781         libsystemd-login.c \
4782         libsystemd-id128.c \
4783         libsystemd-daemon.c
4784
4785 libsystemd_journal_la_SOURCES = \
4786         libsystemd-journal.c \
4787         src/compat-libs/libsystemd-journal.sym
4788
4789 libsystemd_journal_la_CPPFLAGS = \
4790         $(AM_CFLAGS) \
4791         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
4792
4793 libsystemd_journal_la_LDFLAGS = \
4794         $(AM_LDFLAGS) \
4795         -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
4796         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-journal.sym
4797
4798 libsystemd_journal_la_LIBADD = \
4799         libsystemd-journal-internal.la \
4800         libsystemd-internal.la \
4801         libsystemd-shared.la
4802
4803 libsystemd_login_la_SOURCES = \
4804         libsystemd-login.c \
4805         src/compat-libs/libsystemd-login.sym
4806
4807 libsystemd_login_la_CPPFLAGS = \
4808         $(AM_CFLAGS) \
4809         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
4810
4811 libsystemd_login_la_LDFLAGS = \
4812         $(AM_LDFLAGS) \
4813         -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
4814         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-login.sym
4815
4816 libsystemd_login_la_LIBADD = \
4817         libsystemd-internal.la \
4818         libsystemd-shared.la
4819
4820 libsystemd_id128_la_SOURCES = \
4821         libsystemd-id128.c \
4822         src/compat-libs/libsystemd-id128.sym
4823
4824 libsystemd_id128_la_CPPFLAGS = \
4825         $(AM_CFLAGS) \
4826         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
4827
4828 libsystemd_id128_la_LDFLAGS = \
4829         $(AM_LDFLAGS) \
4830         -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
4831         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-id128.sym
4832
4833 libsystemd_id128_la_LIBADD = \
4834         libsystemd-internal.la \
4835         libsystemd-shared.la
4836
4837 libsystemd_daemon_la_SOURCES = \
4838         libsystemd-daemon.c \
4839         src/compat-libs/libsystemd-daemon.sym
4840
4841 libsystemd_daemon_la_CPPFLAGS = \
4842         $(AM_CFLAGS) \
4843         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
4844
4845 libsystemd_daemon_la_LDFLAGS = \
4846         $(AM_LDFLAGS) \
4847         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
4848         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-daemon.sym
4849
4850 libsystemd_daemon_la_LIBADD = \
4851         libsystemd-internal.la \
4852         libsystemd-shared.la
4853
4854 lib_LTLIBRARIES += \
4855         libsystemd-journal.la \
4856         libsystemd-login.la \
4857         libsystemd-id128.la \
4858         libsystemd-daemon.la
4859
4860 pkgconfiglib_DATA += \
4861         src/compat-libs/libsystemd-journal.pc \
4862         src/compat-libs/libsystemd-login.pc \
4863         src/compat-libs/libsystemd-id128.pc \
4864         src/compat-libs/libsystemd-daemon.pc
4865
4866 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
4867 compat-lib-install-hook:
4868         libname=libsystemd-login.so && $(move-to-rootlibdir)
4869         libname=libsystemd-journal.so && $(move-to-rootlibdir)
4870         libname=libsystemd-id128.so && $(move-to-rootlibdir)
4871         libname=libsystemd-daemon.so && $(move-to-rootlibdir)
4872
4873 compat-lib-uninstall-hook:
4874         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
4875         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
4876         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
4877         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
4878
4879 INSTALL_EXEC_HOOKS += compat-lib-install-hook
4880 UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook
4881 endif
4882
4883 EXTRA_DIST += \
4884         src/compat-libs/libsystemd-journal.pc.in \
4885         src/compat-libs/libsystemd-login.pc.in \
4886         src/compat-libs/libsystemd-id128.pc.in \
4887         src/compat-libs/libsystemd-daemon.pc.in
4888
4889 # ------------------------------------------------------------------------------
4890 substitutions = \
4891        '|rootlibexecdir=$(rootlibexecdir)|' \
4892        '|rootbindir=$(rootbindir)|' \
4893        '|bindir=$(bindir)|' \
4894        '|SYSTEMCTL=$(rootbindir)/systemctl|' \
4895        '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
4896        '|pkgsysconfdir=$(pkgsysconfdir)|' \
4897        '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
4898        '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
4899        '|pkgdatadir=$(pkgdatadir)|' \
4900        '|systemunitdir=$(systemunitdir)|' \
4901        '|userunitdir=$(userunitdir)|' \
4902        '|systempresetdir=$(systempresetdir)|' \
4903        '|userpresetdir=$(userpresetdir)|' \
4904        '|udevhwdbdir=$(udevhwdbdir)|' \
4905        '|udevrulesdir=$(udevrulesdir)|' \
4906        '|catalogdir=$(catalogdir)|' \
4907        '|tmpfilesdir=$(tmpfilesdir)|' \
4908        '|sysusersdir=$(sysusersdir)|' \
4909        '|sysctldir=$(sysctldir)|' \
4910        '|systemgeneratordir=$(systemgeneratordir)|' \
4911        '|usergeneratordir=$(usergeneratordir)|' \
4912        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
4913        '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
4914        '|PACKAGE_URL=$(PACKAGE_URL)|' \
4915        '|RANDOM_SEED_DIR=$(localstatedir)/lib/systemd/|' \
4916        '|RANDOM_SEED=$(localstatedir)/lib/systemd/random-seed|' \
4917        '|prefix=$(prefix)|' \
4918        '|exec_prefix=$(exec_prefix)|' \
4919        '|libdir=$(libdir)|' \
4920        '|includedir=$(includedir)|' \
4921        '|VERSION=$(VERSION)|' \
4922        '|rootprefix=$(rootprefix)|' \
4923        '|udevlibexecdir=$(udevlibexecdir)|' \
4924        '|SUSHELL=$(SUSHELL)|' \
4925        '|DEBUGTTY=$(DEBUGTTY)|' \
4926        '|KILL=$(KILL)|' \
4927        '|KMOD=$(KMOD)|' \
4928        '|MKDIR_P=$(MKDIR_P)|' \
4929        '|QUOTAON=$(QUOTAON)|' \
4930        '|QUOTACHECK=$(QUOTACHECK)|' \
4931        '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
4932        '|VARLOGDIR=$(varlogdir)|' \
4933        '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
4934        '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
4935        '|PYTHON=$(PYTHON)|' \
4936        '|PYTHON_BINARY=$(PYTHON_BINARY)|' \
4937        '|NTP_SERVERS=$(NTP_SERVERS)|' \
4938        '|DNS_SERVERS=$(DNS_SERVERS)|' \
4939        '|systemuidmax=$(SYSTEM_UID_MAX)|' \
4940        '|systemgidmax=$(SYSTEM_GID_MAX)|' \
4941        '|TTY_GID=$(TTY_GID)|'
4942
4943 SED_PROCESS = \
4944         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
4945         $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
4946                 < $< > $@
4947
4948 units/%: units/%.in
4949         $(SED_PROCESS)
4950
4951 man/%: man/%.in
4952         $(SED_PROCESS)
4953
4954 sysctl.d/%: sysctl.d/%.in
4955         $(SED_PROCESS)
4956
4957 %.pc: %.pc.in
4958         $(SED_PROCESS)
4959
4960 src/core/macros.%: src/core/macros.%.in
4961         $(SED_PROCESS)
4962
4963 src/%.policy.in: src/%.policy.in.in
4964         $(SED_PROCESS)
4965
4966 %.rules: %.rules.in
4967         $(SED_PROCESS)
4968
4969 %.conf: %.conf.in
4970         $(SED_PROCESS)
4971
4972 %.sh: %.sh.in
4973         $(SED_PROCESS)
4974         $(AM_V_GEN)chmod +x $@
4975
4976 src/%.c: src/%.gperf
4977         $(AM_V_at)$(MKDIR_P) $(dir $@)
4978         $(AM_V_GPERF)$(GPERF) < $< > $@
4979
4980 src/%: src/%.m4
4981         $(AM_V_at)$(MKDIR_P) $(dir $@)
4982         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
4983
4984 units/%: units/%.m4
4985         $(AM_V_at)$(MKDIR_P) $(dir $@)
4986         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
4987
4988 units/user/%: units/%.m4
4989         $(AM_V_at)$(MKDIR_P) $(dir $@)
4990         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
4991
4992 if ENABLE_POLKIT
4993 nodist_polkitpolicy_DATA = \
4994         $(polkitpolicy_files) \
4995         $(polkitpolicy_in_in_files:.policy.in.in=.policy)
4996 endif
4997
4998 EXTRA_DIST += \
4999         $(polkitpolicy_in_files) \
5000         $(polkitpolicy_in_in_files)
5001
5002 CLEANFILES += \
5003         $(nodist_systemunit_DATA) \
5004         $(nodist_userunit_DATA) \
5005         $(pkgconfigdata_DATA) \
5006         $(pkgconfiglib_DATA) \
5007         $(nodist_polkitpolicy_DATA)
5008
5009 # ------------------------------------------------------------------------------
5010 if ENABLE_MANPAGES
5011 man/custom-entities.ent: configure.ac
5012         $(AM_V_GEN)$(MKDIR_P) $(dir $@)
5013         $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
5014          printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
5015          > $@ # '
5016
5017 DISTCLEANFILES += \
5018         man/custom-entities.ent
5019
5020 XSLTPROC_FLAGS = \
5021         --nonet \
5022         --xinclude \
5023         --stringparam man.output.quietly 1 \
5024         --stringparam funcsynopsis.style ansi \
5025         --stringparam man.authors.section.enabled 0 \
5026         --stringparam man.copyright.section.enabled 0 \
5027         --stringparam systemd.version $(VERSION) \
5028         --path '$(builddir)/man:$(srcdir)/man'
5029
5030 XSLTPROC_PROCESS_MAN = \
5031         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
5032
5033 XSLTPROC_PROCESS_HTML = \
5034         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
5035
5036 man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
5037         $(XSLTPROC_PROCESS_MAN)
5038
5039 man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
5040         $(XSLTPROC_PROCESS_MAN)
5041
5042 man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
5043         $(XSLTPROC_PROCESS_MAN)
5044
5045 man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
5046         $(XSLTPROC_PROCESS_MAN)
5047
5048 man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
5049         $(XSLTPROC_PROCESS_MAN)
5050
5051 man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
5052         $(XSLTPROC_PROCESS_HTML)
5053
5054 define html-alias
5055         $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
5056 endef
5057
5058 endif
5059
5060 EXTRA_DIST += \
5061         man/custom-html.xsl \
5062         man/custom-man.xsl
5063
5064 # ------------------------------------------------------------------------------
5065 if HAVE_SYSV_COMPAT
5066 sysvinit_DATA = \
5067         docs/sysvinit/README
5068
5069 varlog_DATA = \
5070         docs/var-log/README
5071
5072 docs/sysvinit/README: docs/sysvinit/README.in
5073         $(SED_PROCESS)
5074
5075 docs/var-log/README: docs/var-log/README.in
5076         $(SED_PROCESS)
5077
5078 CLEANFILES += \
5079         docs/sysvinit/README \
5080         docs/var-log/README
5081 endif
5082
5083 EXTRA_DIST += \
5084         docs/sysvinit/README.in \
5085         docs/var-log/README.in
5086
5087 SOCKETS_TARGET_WANTS += \
5088         systemd-initctl.socket \
5089         systemd-shutdownd.socket
5090
5091 if HAVE_SYSV_COMPAT
5092 RUNLEVEL1_TARGET_WANTS += \
5093         systemd-update-utmp-runlevel.service
5094 RUNLEVEL2_TARGET_WANTS += \
5095         systemd-update-utmp-runlevel.service
5096 RUNLEVEL3_TARGET_WANTS += \
5097         systemd-update-utmp-runlevel.service
5098 RUNLEVEL4_TARGET_WANTS += \
5099         systemd-update-utmp-runlevel.service
5100 RUNLEVEL5_TARGET_WANTS += \
5101         systemd-update-utmp-runlevel.service
5102 endif
5103 SYSINIT_TARGET_WANTS += \
5104         systemd-update-utmp.service
5105 LOCAL_FS_TARGET_WANTS += \
5106         systemd-remount-fs.service \
5107         tmp.mount
5108 MULTI_USER_TARGET_WANTS += \
5109         getty.target \
5110         systemd-ask-password-wall.path
5111 SYSINIT_TARGET_WANTS += \
5112         dev-hugepages.mount \
5113         dev-mqueue.mount \
5114         sys-kernel-config.mount \
5115         sys-kernel-debug.mount \
5116         sys-fs-fuse-connections.mount \
5117         systemd-sysctl.service \
5118         systemd-ask-password-console.path
5119
5120 if HAVE_SYSV_COMPAT
5121 SYSTEM_UNIT_ALIASES += \
5122         poweroff.target runlevel0.target \
5123         rescue.target runlevel1.target \
5124         multi-user.target runlevel2.target \
5125         multi-user.target runlevel3.target \
5126         multi-user.target runlevel4.target \
5127         graphical.target runlevel5.target \
5128         reboot.target runlevel6.target
5129 endif
5130
5131 SYSTEM_UNIT_ALIASES += \
5132         graphical.target default.target \
5133         reboot.target ctrl-alt-del.target \
5134         getty@.service autovt@.service
5135
5136 USER_UNIT_ALIASES += \
5137         $(systemunitdir)/shutdown.target shutdown.target \
5138         $(systemunitdir)/sockets.target sockets.target \
5139         $(systemunitdir)/busnames.target busnames.target \
5140         $(systemunitdir)/timers.target timers.target \
5141         $(systemunitdir)/paths.target paths.target \
5142         $(systemunitdir)/bluetooth.target bluetooth.target \
5143         $(systemunitdir)/printer.target printer.target \
5144         $(systemunitdir)/sound.target sound.target \
5145         $(systemunitdir)/smartcard.target smartcard.target
5146
5147 GENERAL_ALIASES += \
5148         $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
5149         $(systemunitdir)/getty@.service $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \
5150         $(pkgsysconfdir)/user $(sysconfdir)/xdg/systemd/user \
5151         $(dbussystemservicedir)/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service
5152
5153 if HAVE_SYSV_COMPAT
5154 INSTALL_DIRS += \
5155         $(systemunitdir)/runlevel1.target.wants \
5156         $(systemunitdir)/runlevel2.target.wants \
5157         $(systemunitdir)/runlevel3.target.wants \
5158         $(systemunitdir)/runlevel4.target.wants \
5159         $(systemunitdir)/runlevel5.target.wants
5160 endif
5161
5162 INSTALL_DIRS += \
5163         $(prefix)/lib/modules-load.d \
5164         $(sysconfdir)/modules-load.d \
5165         $(prefix)/lib/systemd/network \
5166         $(sysconfdir)/systemd/network \
5167         $(prefix)/lib/sysctl.d \
5168         $(sysconfdir)/sysctl.d \
5169         $(prefix)/lib/kernel/install.d \
5170         $(sysconfdir)/kernel/install.d \
5171         $(systemshutdowndir) \
5172         $(systemsleepdir) \
5173         $(systemgeneratordir) \
5174         $(usergeneratordir) \
5175         \
5176         $(userunitdir) \
5177         $(pkgsysconfdir)/system \
5178         $(pkgsysconfdir)/system/multi-user.target.wants \
5179         $(pkgsysconfdir)/system/getty.target.wants \
5180         $(pkgsysconfdir)/user \
5181         $(dbussessionservicedir) \
5182         $(sysconfdir)/xdg/systemd
5183
5184 install-exec-hook: $(INSTALL_EXEC_HOOKS)
5185
5186 uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
5187
5188 install-data-hook: $(INSTALL_DATA_HOOKS)
5189
5190 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
5191
5192 clean-local: $(CLEAN_LOCAL_HOOKS)
5193         rm -rf $(abs_srcdir)/install-tree
5194         rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
5195               $(abs_srcdir)/hwdb/iab.txt
5196
5197 DISTCHECK_CONFIGURE_FLAGS = \
5198         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
5199         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
5200         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
5201         --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
5202         --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
5203         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
5204         --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
5205         --with-rootprefix=$$dc_install_base \
5206         --disable-split-usr \
5207         --enable-kdbus \
5208         --enable-compat-libs
5209
5210 if HAVE_SYSV_COMPAT
5211 DISTCHECK_CONFIGURE_FLAGS += \
5212         --with-sysvinit-path=$$dc_install_base/$(sysvinitdir) \
5213         --with-sysvrcnd-path=$$dc_install_base/$(sysvrcnddir)
5214 else
5215 DISTCHECK_CONFIGURE_FLAGS += \
5216         --with-sysvinit-path= \
5217         --with-sysvrcnd-path=
5218 endif
5219
5220 if ENABLE_GTK_DOC
5221 DISTCHECK_CONFIGURE_FLAGS += \
5222         --enable-gtk-doc
5223 endif
5224
5225 # check "broken" platforms limited toolchains for link breakage before we release
5226 .PHONY: linkcheck
5227 linkcheck:
5228         $(MAKE) CFLAGS='-fno-lto' LDFLAGS='-Wl,-fuse-ld=gold -Wl,--as-needed -Wl,--no-gc-sections' distcheck
5229
5230 .PHONY: hwdb-update
5231 hwdb-update:
5232         ( cd $(top_srcdir)/hwdb && \
5233         wget -N http://www.linux-usb.org/usb.ids \
5234                 http://pci-ids.ucw.cz/v2.2/pci.ids \
5235                 http://standards.ieee.org/develop/regauth/oui/oui.txt \
5236                 http://standards.ieee.org/develop/regauth/iab/iab.txt && \
5237         ./ids-update.pl )
5238
5239 .PHONY: kdbus-update
5240 kdbus-update:
5241         ( cd $(top_srcdir)/src/libsystemd/sd-bus/ && \
5242         wget -N https://d-bus.googlecode.com/git/kdbus.h )
5243
5244 .PHONY: git-tag
5245 git-tag:
5246         git tag -s "v$(VERSION)" -m "systemd $(VERSION)"
5247
5248 www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
5249 .PHONY: upload
5250 upload: all check dist
5251         scp systemd-$(VERSION).tar.xz $(www_target)
5252
5253 .PHONY: doc-sync
5254 doc-sync: all destdir-sphinx
5255         gtkdoc-rebase --html-dir=docs/libudev/html --online
5256         rsync -rlv --delete docs/libudev/html/ --omit-dir-times $(www_target)/libudev/
5257         gtkdoc-rebase --html-dir=docs/gudev/html --online
5258         rsync -rlv --delete docs/gudev/html/ --omit-dir-times $(www_target)/gudev/
5259         rsync -rlv --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
5260         rsync -rlv --delete --omit-dir-times docs/html/python-systemd/ $(www_target)/python-systemd/
5261
5262 .PHONY: tango
5263 tango: upload
5264         cp -v systemd-$(VERSION).tar.xz /home/lennart/git.fedora/systemd/
5265         scp man/*.html tango:public/systemd-man/
5266
5267 .PHONY: install-tree
5268 install-tree: all
5269         rm -rf $(abs_srcdir)/install-tree
5270         $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
5271         tree $(abs_srcdir)/install-tree
5272
5273 # Let's run all tests of the test suite, but under valgrind. Let's
5274 # exclude the one perl script we have in there
5275 .PHONY: valgrind-tests
5276 valgrind-tests: $(TESTS)
5277         $(AM_V_GEN)for f in $(filter-out %.pl, $^); do \
5278                 if file $$f | grep -q shell; then \
5279                 echo -e "$${x}Skipping non-binary $$f"; else \
5280                 echo -e "$${x}Running $$f"; \
5281                 libtool --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
5282                 x="\n\n"; \
5283         done
5284
5285 exported-%: %
5286         $(AM_V_GEN)nm -g --defined-only $(builddir)/.libs/$(<:.la=.so) 2>&1 /dev/null | grep " T " | cut -d" " -f3 > $@
5287
5288 exported: $(addprefix exported-, $(lib_LTLIBRARIES))
5289         $(AM_V_GEN)cat $^ > $@
5290
5291 .PHONY: check-api-docs
5292 check-api-docs: exported man
5293         $(AM_V_GEN)for symbol in `cat exported` ; do \
5294                 if test -f $(builddir)/man/$$symbol.html ; then \
5295                         echo "  Symbol $$symbol() is documented." ; \
5296                 else \
5297                         echo "‣ Symbol $$symbol() lacks documentation." ; \
5298                 fi ; \
5299         done
5300
5301 OBJECT_VARIABLES:=$(filter %_OBJECTS,$(.VARIABLES))
5302 ALL_OBJECTS:=$(foreach v,$(OBJECT_VARIABLES),$($(v)))
5303
5304 undefined defined: $(ALL_OBJECTS)
5305         $(AM_V_GEN)for f in $(ALL_OBJECTS) ; do \
5306                 nm -g --$@-only `echo $(builddir)/"$$f" | sed -e 's,\([^/]*\).lo$$,.libs/\1.o,'` ; \
5307         done | cut -c 20- | cut -d @ -f 1 | sort -u > $@
5308
5309 CLEANFILES += \
5310         defined \
5311         undefined
5312
5313 .PHONY: check-api-unused
5314 check-api-unused: defined undefined exported
5315         ( cat exported undefined ) | sort -u  | diff -u - defined | grep ^+ | grep -v ^+++ | cut -c2-
5316
5317 .PHONY: check-includes
5318 check-includes: $(top_srcdir)/tools/check-includes.pl
5319         $(AM_V_GEN) find * -name '*.[hcS]' -type f -print | sort -u \
5320                 | xargs $(top_srcdir)/tools/check-includes.pl
5321
5322 EXTRA_DIST += \
5323         $(top_srcdir)/tools/check-includes.pl
5324
5325 # Stupid test that everything purported to be exported really is
5326 define generate-sym-test
5327         $(AM_V_at)$(MKDIR_P) $(dir $@)
5328         $(AM_V_at)printf '#include <stdio.h>\n' > $@
5329         $(AM_V_at)printf '#include "%s"\n' $(notdir $(filter %.h, $^)) >> $@
5330         $(AM_V_at)printf 'void* functions[] = {\n' >> $@
5331         $(AM_V_GEN)sed -r -n 's/^ +([a-zA-Z0-9_]+);/\1,/p' $< >> $@
5332         $(AM_V_at)printf '};\nint main(void) {\n' >> $@
5333         $(AM_V_at)printf 'unsigned i; for (i=0;i<sizeof(functions)/sizeof(void*);i++) printf("%%p\\n", functions[i]);\n' >> $@
5334         $(AM_V_at)printf 'return 0; }\n' >> $@
5335 endef
5336
5337 test-libsystemd-sym.c: \
5338                 $(top_builddir)/src/libsystemd/libsystemd.sym \
5339                 src/systemd/sd-journal.h \
5340                 src/systemd/sd-daemon.h \
5341                 src/systemd/sd-login.h \
5342                 src/systemd/sd-bus.h \
5343                 src/systemd/sd-utf8.h \
5344                 src/systemd/sd-resolve.h
5345         $(generate-sym-test)
5346
5347 test-libudev-sym.c: \
5348                 src/libudev/libudev.sym \
5349                 src/udev/udev.h
5350         $(generate-sym-test)
5351
5352 test_libsystemd_sym_SOURCES = \
5353         test-libsystemd-sym.c
5354 test_libsystemd_sym_LDADD = \
5355         libsystemd.la
5356
5357 test_libudev_sym_SOURCES = \
5358         test-libudev-sym.c
5359 test_libudev_sym_CFLAGS = \
5360         $(AM_CFLAGS) \
5361         -Wno-deprecated-declarations
5362 test_libudev_sym_LDADD = \
5363         libudev.la
5364
5365 BUILT_SOURCES += \
5366         $(test_libsystemd_sym_SOURCES) \
5367         $(test_libudev_sym_SOURCES)
5368
5369 tests += \
5370         test-libsystemd-sym \
5371         test-libudev-sym
5372
5373 .PHONY: cppcheck
5374 cppcheck:
5375         cppcheck --enable=all -q $(top_srcdir)
5376
5377 # Used to extract compile flags for YCM.
5378 print-%:
5379         @echo $($*)
5380
5381 git-contrib:
5382         @git shortlog -s `git describe --abbrev=0`.. | cut -c8- | awk '{ print $$0 "," }' | sort -u