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