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