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