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