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