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