xref: /freebsd/crypto/krb5/src/clients/ksu/Makefile.in (revision f1c4c3daccbaf3820f0e2224de53df12fc952fcc)
1mydir=clients$(S)ksu
2BUILDTOP=$(REL)..$(S)..
3DEFINES = -DGET_TGT_VIA_PASSWD -DPRINC_LOOK_AHEAD -DCMD_PATH='"/usr/local/sbin /usr/local/bin /sbin /bin /usr/sbin /usr/bin"'
4
5KSU_LIBS=@KSU_LIBS@
6
7SRCS = \
8	$(srcdir)/krb_auth_su.c \
9	$(srcdir)/ccache.c \
10	$(srcdir)/authorization.c \
11	$(srcdir)/main.c \
12	$(srcdir)/heuristic.c \
13	$(srcdir)/xmalloc.c \
14	$(srcdir)/setenv.c
15OBJS = \
16	krb_auth_su.o \
17	ccache.o \
18	authorization.o \
19	main.o \
20	heuristic.o \
21	xmalloc.o @SETENVOBJ@
22
23all: ksu
24
25ksu: $(OBJS) $(KRB5_BASE_DEPLIBS)
26	$(CC_LINK) -o $@ $(OBJS) $(KRB5_BASE_LIBS) $(KSU_LIBS)
27
28clean:
29	$(RM) ksu
30
31install:
32	-for f in ksu; do \
33	  $(INSTALL_SETUID) $$f \
34		$(DESTDIR)$(CLIENT_BINDIR)/`echo $$f|sed '$(transform)'`; \
35	done
36
37# The ksu tests must be run as root and may be disruptive to the host
38# system, so they are not included in "make check".  asan's leak
39# checker does not work with setuid binaries (and causes them to
40# always exit with status 1), so it is disabled here.
41check-ksu:
42	sudo LSAN_OPTIONS=detect_leaks=0 $(RUNPYTEST) $(srcdir)/t_ksu.py \
43		$(PYTESTFLAGS)
44