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