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