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