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