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