]>
Commit | Line | Data |
---|---|---|
48d7b13a KZ |
1 | include $(top_srcdir)/config/include-Makefile.am |
2 | ||
3 | bin_PROGRAMS = | |
30688dde | 4 | usrbin_exec_PROGRAMS = |
48d7b13a | 5 | sbin_PROGRAMS = |
30688dde | 6 | usrsbin_exec_PROGRAMS = |
a3ca3a44 | 7 | dist_man_MANS = |
48d7b13a | 8 | |
562218e6 KZ |
9 | EXTRA_DIST = README.getty README.modems-with-agetty README.poeigl |
10 | ||
48d7b13a KZ |
11 | if BUILD_AGETTY |
12 | sbin_PROGRAMS += agetty | |
a3ca3a44 | 13 | dist_man_MANS += agetty.8 |
48d7b13a KZ |
14 | endif |
15 | ||
16 | if BUILD_INIT | |
17 | ||
18 | sbin_PROGRAMS += simpleinit shutdown initctl | |
a3ca3a44 | 19 | dist_man_MANS += fastboot.8 fasthalt.8 halt.8 reboot.8 simpleinit.8 shutdown.8 \ |
48d7b13a KZ |
20 | initctl.8 |
21 | ||
562218e6 KZ |
22 | simpleinit_SOURCES = simpleinit.c my_crypt.h simpleinit.h |
23 | initctl_SOURCES = initctl.c simpleinit.h | |
48d7b13a KZ |
24 | |
25 | if NEED_LIBCRYPT | |
26 | simpleinit_LDADD = -lcrypt | |
27 | endif | |
28 | ||
f3831bbd | 29 | endif |
48d7b13a KZ |
30 | |
31 | if BUILD_LAST | |
30688dde | 32 | usrbin_exec_PROGRAMS += last |
a3ca3a44 | 33 | dist_man_MANS += last.1 |
48d7b13a KZ |
34 | endif |
35 | ||
36 | if BUILD_LOGIN_UTILS | |
37 | ||
38 | bin_PROGRAMS += login | |
30688dde KZ |
39 | usrbin_exec_PROGRAMS += chfn chsh newgrp |
40 | usrsbin_exec_PROGRAMS += vipw | |
a3ca3a44 | 41 | dist_man_MANS += chfn.1 chsh.1 login.1 newgrp.1 vipw.8 vigr.8 |
48d7b13a | 42 | |
2984313a SK |
43 | chfn_SOURCES = chfn.c $(chfn_chsh_common) |
44 | chsh_SOURCES = chsh.c $(chfn_chsh_common) | |
45 | chfn_chsh_common = islocal.c setpwnam.c islocal.h my_crypt.h setpwnam.h \ | |
46 | ../lib/env.c | |
47 | login_SOURCES = login.c login.h my_crypt.h ../lib/setproctitle.c | |
562218e6 KZ |
48 | newgrp_SOURCES = newgrp.c my_crypt.h |
49 | vipw_SOURCES = vipw.c setpwnam.h | |
48d7b13a | 50 | |
2984313a SK |
51 | chfn_LDADD = |
52 | chsh_LDADD = | |
53 | login_LDADD = | |
48d7b13a KZ |
54 | newgrp_LDADD = |
55 | vipw_LDADD = | |
56 | ||
8c453685 SK |
57 | chfn_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) |
58 | chsh_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) | |
59 | newgrp_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) | |
06bcee19 | 60 | |
3f3c9c90 SK |
61 | chfn_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) |
62 | chsh_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) | |
63 | newgrp_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) | |
64 | ||
48d7b13a | 65 | if NEED_LIBCRYPT |
48d7b13a KZ |
66 | chfn_LDADD += -lcrypt |
67 | chsh_LDADD += -lcrypt | |
68 | login_LDADD += -lcrypt | |
69 | newgrp_LDADD += -lcrypt | |
70 | endif | |
71 | ||
72 | if HAVE_PAM | |
73 | chfn_LDADD += -lpam -lpam_misc | |
74 | chsh_LDADD += -lpam -lpam_misc | |
75 | login_LDADD += -lpam -lpam_misc | |
48d7b13a | 76 | else |
2984313a | 77 | login_SOURCES += checktty.c |
48d7b13a KZ |
78 | endif |
79 | ||
f8bdba2f KZ |
80 | if HAVE_AUDIT |
81 | login_LDADD += -laudit | |
82 | endif | |
48d7b13a KZ |
83 | |
84 | if HAVE_SELINUX | |
562218e6 | 85 | chfn_SOURCES += selinux_utils.c selinux_utils.h |
48d7b13a | 86 | chfn_LDADD += -lselinux |
562218e6 | 87 | chsh_SOURCES += selinux_utils.c selinux_utils.h |
48d7b13a KZ |
88 | chsh_LDADD += -lselinux |
89 | vipw_LDADD += -lselinux | |
90 | endif | |
91 | ||
92 | ||
baf39af1 | 93 | install-exec-hook:: |
30688dde | 94 | cd $(DESTDIR)$(usrsbin_execdir) && ln -sf vipw vigr |
48d7b13a KZ |
95 | |
96 | endif | |
97 | ||
98 | if BUILD_MESG | |
30688dde | 99 | usrbin_exec_PROGRAMS += mesg |
a3ca3a44 | 100 | dist_man_MANS += mesg.1 |
48d7b13a KZ |
101 | endif |
102 | ||
103 | if BUILD_WALL | |
30688dde | 104 | usrbin_exec_PROGRAMS += wall |
562218e6 | 105 | wall_SOURCES = wall.c ttymsg.c ttymsg.h |
a3ca3a44 | 106 | dist_man_MANS += wall.1 |
48d7b13a KZ |
107 | |
108 | if USE_TTY_GROUP | |
f3831bbd | 109 | if MAKEINSTALL_DO_CHOWN |
baf39af1 | 110 | install-exec-hook:: |
30688dde KZ |
111 | chgrp tty $(DESTDIR)$(usrbin_execdir)/wall |
112 | chmod g+s $(DESTDIR)$(usrbin_execdir)/wall | |
48d7b13a | 113 | endif |
f3831bbd | 114 | endif |
48d7b13a KZ |
115 | endif |
116 | ||
baf39af1 KZ |
117 | if BUILD_INIT |
118 | ||
48d7b13a KZ |
119 | install-exec-hook:: |
120 | cd $(DESTDIR)$(sbindir) && ln -sf shutdown reboot | |
121 | cd $(DESTDIR)$(sbindir) && ln -sf shutdown fastboot | |
122 | cd $(DESTDIR)$(sbindir) && ln -sf shutdown halt | |
123 | cd $(DESTDIR)$(sbindir) && ln -sf shutdown fasthalt | |
124 | cd $(DESTDIR)$(sbindir) && ln -sf initctl need | |
125 | cd $(DESTDIR)$(sbindir) && ln -sf initctl display-services | |
126 | cd $(DESTDIR)$(sbindir) && ln -sf initctl provide | |
6ed7a96d KZ |
127 | |
128 | install-data-hook: | |
48d7b13a KZ |
129 | cd $(DESTDIR)$(mandir)/man8 && ln -sf initctl.8 need.8 |
130 | cd $(DESTDIR)$(mandir)/man8 && ln -sf initctl.8 display-services.8 | |
131 | cd $(DESTDIR)$(mandir)/man8 && ln -sf initctl.8 provide.8 | |
132 | ||
baf39af1 | 133 | endif |
71562c1f | 134 | |
8e025972 | 135 | noinst_PROGRAMS = checktty_test islocal_test |
71562c1f | 136 | checktty_test_SOURCES = checktty.c login.h |
1f317686 | 137 | checktty_test_CPPFLAGS = -DMAIN_TEST_CHECKTTY $(AM_CPPFLAGS) |
8e025972 JY |
138 | islocal_test_SOURCES = islocal.c |
139 | islocal_test_CPPFLAGS = -DMAIN_TEST_ISLOCAL $(AM_CPPFLAGS) | |
71562c1f | 140 |