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