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