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