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