]> git.ipfire.org Git - thirdparty/util-linux.git/blob - login-utils/Makefile.am
Imported from util-linux-2.13-pre3 tarball.
[thirdparty/util-linux.git] / login-utils / Makefile.am
1 include $(top_srcdir)/config/include-Makefile.am
2
3 bin_PROGRAMS =
4 usrbinexec_PROGRAMS =
5 sbin_PROGRAMS =
6 usrsbinexec_PROGRAMS =
7 man_MANS =
8
9 if BUILD_AGETTY
10 sbin_PROGRAMS += agetty
11 man_MANS += agetty.8
12 endif
13
14 if BUILD_INIT
15
16 sbin_PROGRAMS += simpleinit shutdown initctl
17 man_MANS += fastboot.8 fasthalt.8 halt.8 reboot.8 simpleinit.8 shutdown.8 \
18 initctl.8
19
20
21 if NEED_LIBCRYPT
22 simpleinit_LDADD = -lcrypt
23 endif
24
25 endif
26
27 if BUILD_LAST
28 usrbinexec_PROGRAMS += last
29 man_MANS += last.1
30 endif
31
32 if BUILD_LOGIN_UTILS
33
34 bin_PROGRAMS += login
35 usrbinexec_PROGRAMS += chfn chsh
36 usrsbinexec_PROGRAMS += vipw
37 man_MANS += chfn.1 chsh.1 login.1 vipw.8 vigr.8
38
39 chfn_SOURCES = chfn.c islocal.c setpwnam.c
40 chsh_SOURCES = chsh.c islocal.c setpwnam.c
41
42 chfn_LDADD = ../lib/libenv.a
43 chsh_LDADD = ../lib/libenv.a
44 login_LDADD = ../lib/libsetproctitle.a
45 newgrp_LDADD =
46 vipw_LDADD =
47
48 if NEED_LIBCRYPT
49 usrbinexec_PROGRAMS += newgrp
50 man_MANS += newgrp.1
51 chfn_LDADD += -lcrypt
52 chsh_LDADD += -lcrypt
53 login_LDADD += -lcrypt
54 newgrp_LDADD += -lcrypt
55 endif
56
57 if HAVE_PAM
58 chfn_LDADD += -lpam -lpam_misc
59 chsh_LDADD += -lpam -lpam_misc
60 login_LDADD += -lpam -lpam_misc
61 login_SOURCES = login.c
62 else
63 login_SOURCES = login.c checktty.c
64 endif
65
66
67 if HAVE_SELINUX
68 chfn_SOURCES += selinux_utils.c
69 chfn_LDADD += -lselinux
70 chsh_SOURCES += selinux_utils.c
71 chsh_LDADD += -lselinux
72 vipw_LDADD += -lselinux
73 endif
74
75
76 install-exec-hook::
77 cd $(DESTDIR)$(usrsbinexecdir) && ln -sf vipw vigr
78
79 endif
80
81 if BUILD_MESG
82 usrbinexec_PROGRAMS += mesg
83 man_MANS += mesg.1
84 endif
85
86 if BUILD_WALL
87
88 usrbinexec_PROGRAMS += wall
89 wall_SOURCES = wall.c ttymsg.c
90 man_MANS += wall.1
91
92 if USE_TTY_GROUP
93 install-exec-hook::
94 chgrp tty $(DESTDIR)$(usrbinexecdir)/wall
95 chmod g+s $(DESTDIR)$(usrbinexecdir)/wall
96 endif
97
98 endif
99
100
101 if BUILD_INIT
102
103 install-exec-hook::
104 cd $(DESTDIR)$(sbindir) && ln -sf shutdown reboot
105 cd $(DESTDIR)$(sbindir) && ln -sf shutdown fastboot
106 cd $(DESTDIR)$(sbindir) && ln -sf shutdown halt
107 cd $(DESTDIR)$(sbindir) && ln -sf shutdown fasthalt
108 cd $(DESTDIR)$(sbindir) && ln -sf initctl need
109 cd $(DESTDIR)$(sbindir) && ln -sf initctl display-services
110 cd $(DESTDIR)$(sbindir) && ln -sf initctl provide
111 cd $(DESTDIR)$(mandir)/man8 && ln -sf initctl.8 need.8
112 cd $(DESTDIR)$(mandir)/man8 && ln -sf initctl.8 display-services.8
113 cd $(DESTDIR)$(mandir)/man8 && ln -sf initctl.8 provide.8
114
115 endif