xref: /illumos-gate/usr/src/cmd/krb5/kadmin/kpasswd/Makefile (revision 9164a50bf932130cbb5097a16f6986873ce0e6e5)
1#
2# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
3# Use is subject to license terms.
4#
5# Copyright (c) 2018, Joyent, Inc.
6
7PROG= kpasswd
8
9OBJS	= tty_kpasswd.o kpasswd.o
10SRCS	= $(OBJS:.o=.c)
11
12CLOBBERFILES += $(TESTPROG)
13
14include ../../../Makefile.cmd
15include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
16
17POFILE = $(PROG).po
18POFILES = generic.po
19
20#
21# Override $ROOTLIB
22#
23KRB5LIBDIR=	$(ROOT)$(KERBLIBDIR)
24
25CPPFLAGS += -I$(SRC)/lib/gss_mechs/mech_krb5/include \
26	-I$(SRC)/uts/common/gssapi/include/ \
27	-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
28	-I$(SRC)/lib/krb5 \
29	-DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 -DHAVE_UNISTD_H=1 \
30	-DHAVE_SYS_TIMEB_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_FTIME=1 \
31	-DHAVE_TIMEZONE -DUSE_KADM5_API_VERSION=2
32
33CERRWARN += -_gcc=-Wno-parentheses
34CERRWARN += -_gcc=-Wno-unused-variable
35CERRWARN += -_gcc=-Wno-unused-function
36
37# not linted
38SMATCH=off
39
40LDFLAGS += $(KRUNPATH) $(KERBRUNPATH)
41LDLIBS += -L $(KRB5LIBDIR)
42LDLIBS += $(KMECHLIB) $(KCLNTLIB)
43
44.KEEP_STATE:
45
46all: $(PROG)
47
48$(PROG):	$(OBJS)
49	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
50	$(POST_PROCESS)
51
52install: $(KRB5PROG)
53
54clean:
55	$(RM) $(OBJS)
56
57include ../../../Makefile.targ
58
59$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
60	$(RM) $@
61	$(CAT) $(POFILES) > $@
62	$(RM) generic.po
63
64generic.po:
65	$(RM) messages.po
66	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
67	$(SED) "/^domain/d" messages.po > $@
68	$(RM) messages.po
69
70