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