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