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