]> git.ipfire.org Git - thirdparty/util-linux.git/blame - login-utils/Makemodule.am
Remove duplicate entry for reset-env from usage
[thirdparty/util-linux.git] / login-utils / Makemodule.am
CommitLineData
48d7b13a 1
48d7b13a 2if BUILD_LAST
30688dde 3usrbin_exec_PROGRAMS += last
ec01e9d0 4dist_man_MANS += \
ce602720
OO
5 login-utils/last.1 \
6 login-utils/lastb.1
cd2876d2 7last_SOURCES = login-utils/last.c lib/monotonic.c
254743e4 8last_LDADD = $(LDADD) libcommon.la $(REALTIME_LIBS)
ce602720
OO
9
10install-exec-hook-last:
bccc956d 11 cd $(DESTDIR)$(usrbin_execdir) && ln -sf last lastb
ce602720
OO
12
13INSTALL_EXEC_HOOKS += install-exec-hook-last
48d7b13a
KZ
14endif
15
de217489
KZ
16if BUILD_SULOGIN
17sbin_PROGRAMS += sulogin
ffeb2805
KZ
18dist_man_MANS += login-utils/sulogin.8
19sulogin_SOURCES = \
a73f59fa
KZ
20 login-utils/sulogin.c \
21 login-utils/sulogin-consoles.c \
22 login-utils/sulogin-consoles.h
dcdb349b 23sulogin_LDADD = $(LDADD) libcommon.la
a73f59fa 24
de217489
KZ
25if HAVE_LIBCRYPT
26sulogin_LDADD += -lcrypt
27endif
28if HAVE_SELINUX
29sulogin_LDADD += -lselinux
30endif
a73f59fa
KZ
31
32check_PROGRAMS += test_consoles
33test_consoles_SOURCES = login-utils/sulogin-consoles.c
b0b54cc5 34test_consoles_CFLAGS = $(AM_CFLAGS) -DTEST_PROGRAM
b201f1d8 35test_consoles_LDADD = $(LDADD) libcommon.la
de217489
KZ
36endif # BUILD_SULOGIN
37
48d7b13a 38
e7614a07
KZ
39if BUILD_LOGIN
40bin_PROGRAMS += login
ffeb2805 41dist_man_MANS += login-utils/login.1
e7614a07 42login_SOURCES = \
ffeb2805
KZ
43 login-utils/login.c \
44 login-utils/logindefs.c \
d77ab74a 45 login-utils/logindefs.h
fe2c9909
WJ
46login_LDADD = $(LDADD) libcommon.la -lpam
47if HAVE_LINUXPAM
48login_LDADD += -lpam_misc
49endif
e7614a07
KZ
50if HAVE_AUDIT
51login_LDADD += -laudit
52endif
53if HAVE_SELINUX
54login_LDADD += -lselinux
55endif
56endif # BUILD_LOGIN
57
58
88407b93
KZ
59if BUILD_NOLOGIN
60sbin_PROGRAMS += nologin
61dist_man_MANS += login-utils/nologin.8
62nologin_SOURCES = login-utils/nologin.c
63endif
64
65
78d5ceac
KZ
66if BUILD_UTMPDUMP
67usrbin_exec_PROGRAMS += utmpdump
68dist_man_MANS += login-utils/utmpdump.1
69utmpdump_SOURCES = login-utils/utmpdump.c
1173d0a6 70utmpdump_LDADD = $(LDADD) libcommon.la
78d5ceac
KZ
71endif
72
73
2c8a3e16
KZ
74if BUILD_CHFN_CHSH
75usrbin_exec_PROGRAMS += chfn chsh
ffeb2805
KZ
76dist_man_MANS += \
77 login-utils/chfn.1 \
78 login-utils/chsh.1
2c8a3e16 79
144ae70e
SK
80chfn_chsh_sources = \
81 login-utils/ch-common.h \
82 login-utils/ch-common.c
2c8a3e16
KZ
83chfn_chsh_cflags = $(SUID_CFLAGS) $(AM_CFLAGS)
84chfn_chsh_ldflags = $(SUID_LDFLAGS) $(AM_LDFLAGS)
e41ae450 85chfn_chsh_ldadd = libcommon.la $(READLINE_LIBS)
d86918b6
KZ
86
87if CHFN_CHSH_PASSWORD
fe2c9909
WJ
88chfn_chsh_ldadd += -lpam
89if HAVE_LINUXPAM
90chfn_chsh_ldadd += -lpam_misc
91endif
d86918b6
KZ
92chfn_chsh_sources += \
93 login-utils/auth.c \
94 login-utils/auth.h
fe2c9909 95endif # CHFN_CHSH_PASSWORD
2c8a3e16 96
7e4714f2
CM
97if HAVE_USER
98chfn_chsh_ldflags += $(LIBUSER_LIBS)
99chfn_chsh_cflags += $(LIBUSER_CFLAGS)
6adb1ef2
CM
100chfn_chsh_sources+= \
101 login-utils/libuser.c \
102 login-utils/libuser.h
d86918b6
KZ
103else
104chfn_chsh_sources += \
105 login-utils/islocal.c \
106 login-utils/islocal.h \
107 login-utils/setpwnam.c \
108 login-utils/setpwnam.h
7e4714f2
CM
109endif
110
2c8a3e16 111if HAVE_SELINUX
ffeb2805
KZ
112chfn_chsh_sources += \
113 login-utils/selinux_utils.c \
114 login-utils/selinux_utils.h
2c8a3e16
KZ
115chfn_chsh_ldadd += -lselinux
116endif
117
e88f0059
SK
118chfn_SOURCES = \
119 login-utils/chfn.c \
120 login-utils/logindefs.c \
121 login-utils/logindefs.h \
122 $(chfn_chsh_sources)
2c8a3e16
KZ
123chfn_CFLAGS = $(chfn_chsh_cflags)
124chfn_LDFLAGS = $(chfn_chsh_ldflags)
dcdb349b 125chfn_LDADD = $(LDADD) $(chfn_chsh_ldadd)
2c8a3e16 126
ffeb2805 127chsh_SOURCES = login-utils/chsh.c $(chfn_chsh_sources)
2c8a3e16
KZ
128chsh_CFLAGS = $(chfn_chsh_cflags)
129chsh_LDFLAGS = $(chfn_chsh_ldflags)
dcdb349b 130chsh_LDADD = $(LDADD) $(chfn_chsh_ldadd)
2c8a3e16
KZ
131endif # BUILD_CHFN_CHSH
132
133
ff4c5555 134if BUILD_SU
e7614a07 135bin_PROGRAMS += su
6edbca18 136dist_man_MANS += login-utils/su.1
ff4c5555 137su_SOURCES = \
ffeb2805 138 login-utils/su.c \
cf1a99da
KZ
139 login-utils/su-common.c \
140 login-utils/su-common.h \
ffeb2805
KZ
141 login-utils/logindefs.c \
142 login-utils/logindefs.h
23f75093 143su_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS)
ff4c5555 144su_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
23f75093 145su_LDADD = $(LDADD) libcommon.la -lpam
fe2c9909
WJ
146if HAVE_LINUXPAM
147su_LDADD += -lpam_misc
ff4c5555 148endif
eb7d0ad0
KZ
149if HAVE_UTIL
150su_LDADD += -lutil
151endif
fe2c9909 152endif # BUILD_SU
ff4c5555 153
ffeb2805 154
7ec6adb1 155if BUILD_RUNUSER
5b68dea9 156sbin_PROGRAMS += runuser
7ec6adb1
KZ
157dist_man_MANS += login-utils/runuser.1
158runuser_SOURCES = \
159 login-utils/runuser.c \
160 login-utils/su-common.c \
161 login-utils/su-common.h \
162 login-utils/logindefs.c \
163 login-utils/logindefs.h
23f75093 164runuser_LDADD = $(LDADD) libcommon.la -lpam
fe2c9909
WJ
165if HAVE_LINUXPAM
166runuser_LDADD += -lpam_misc
7ec6adb1 167endif
204aa771
SK
168if HAVE_UTIL
169runuser_LDADD += -lutil
170endif
fe2c9909 171endif # BUILD_RUNUSER
7ec6adb1
KZ
172
173
aec9ecbd
KZ
174if BUILD_NEWGRP
175usrbin_exec_PROGRAMS += newgrp
ffeb2805
KZ
176dist_man_MANS += login-utils/newgrp.1
177newgrp_SOURCES = login-utils/newgrp.c
aec9ecbd
KZ
178newgrp_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS)
179newgrp_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
dcdb349b 180newgrp_LDADD = $(LDADD)
aec9ecbd
KZ
181if HAVE_LIBCRYPT
182newgrp_LDADD += -lcrypt
183endif
184endif # BUILD_NEWGRP
185
29cc2a55
OO
186if BUILD_LSLOGINS
187usrbin_exec_PROGRAMS += lslogins
188dist_man_MANS += login-utils/lslogins.1
189lslogins_SOURCES = \
190 login-utils/lslogins.c \
191 login-utils/logindefs.c \
192 login-utils/logindefs.h
193lslogins_LDADD = $(LDADD) libcommon.la libsmartcols.la
194lslogins_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir)
195if HAVE_SELINUX
196lslogins_LDADD += -lselinux
197endif
f37b357b
KZ
198if HAVE_SYSTEMD
199lslogins_LDADD += $(SYSTEMD_LIBS) $(SYSTEMD_JOURNAL_LIBS)
200lslogins_CFLAGS += $(SYSTEMD_CFLAGS) $(SYSTEMD_JOURNAL_CFLAGS)
201endif
29cc2a55 202endif # BUILD_LSLOGINS
ff4c5555 203
cc76731e
KZ
204if BUILD_VIPW
205usrsbin_exec_PROGRAMS += vipw
ffeb2805
KZ
206dist_man_MANS += \
207 login-utils/vigr.8 \
208 login-utils/vipw.8
f06b4328 209vipw_SOURCES = \
ffeb2805 210 login-utils/vipw.c \
d77ab74a 211 login-utils/setpwnam.h
dcdb349b 212vipw_LDADD = $(LDADD) libcommon.la
48d7b13a 213if HAVE_SELINUX
48d7b13a
KZ
214vipw_LDADD += -lselinux
215endif
ffeb2805
KZ
216install-exec-hook-vipw::
217 cd $(DESTDIR)$(usrsbin_execdir) && ln -sf vipw vigr
218
219INSTALL_EXEC_HOOKS += install-exec-hook-vipw
cc76731e 220endif # BUILD_VIPW
48d7b13a 221
48d7b13a 222
922e6775 223check_PROGRAMS += \
ffeb2805
KZ
224 test_islocal \
225 test_logindefs
226
227test_islocal_SOURCES = login-utils/islocal.c
c293a7e8 228test_islocal_CPPFLAGS = -DTEST_PROGRAM $(AM_CPPFLAGS)
c82d9c97 229
ffeb2805
KZ
230test_logindefs_SOURCES = \
231 login-utils/logindefs.c \
232 login-utils/logindefs.h
c82d9c97 233test_logindefs_CPPFLAGS = -DTEST_PROGRAM $(AM_CPPFLAGS)
d07dc5e4
KZ
234
235
236install-exec-hook:
237if BUILD_SU
a65041b5 238if MAKEINSTALL_DO_CHOWN
8c197994 239 chown root:root $(DESTDIR)$(bindir)/su
a65041b5
KZ
240endif
241if MAKEINSTALL_DO_SETUID
d07dc5e4
KZ
242 chmod 4755 $(DESTDIR)$(bindir)/su
243endif
244endif
245if BUILD_VIPW
246 cd $(DESTDIR)$(usrsbin_execdir) && ln -sf vipw vigr
247endif