xref: /illumos-gate/usr/src/cmd/krb5/kadmin/dbutil/Makefile (revision 1a2d662a91cee3bf82f41cd47c7ae6f3825d9db2)
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= kdb5_util
8
9OBJS	= kdb5_util.o \
10        kdb5_create.o kadm5_create.o string_table.o kdb5_stash.o \
11        kdb5_destroy.o ovload.o strtok.o dump.o
12
13SRCS	= $(OBJS:.o=.c)
14
15CLOBBERFILES += $(TESTPROG)
16
17ISRCHDR=	iprop.h
18KRB5IPROPDIR=	$(SRC)/cmd/krb5/iprop
19
20include ../../../Makefile.cmd
21include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
22
23POFILE = $(PROG).po
24POFILES = generic.po
25
26CPPFLAGS += -I. -I$(SRC)/lib/gss_mechs/mech_krb5/include/kerberosIV \
27	-I$(SRC)/lib/gss_mechs/mech_krb5/include \
28	-I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5 \
29	-I$(SRC)/lib/krb5 \
30	-I$(SRC)/uts/common/gssapi/include \
31	-I$(SRC)/uts/common/gssapi/mechs/krb5/include  \
32	-I$(KRB5IPROPDIR) \
33	-DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 -DHAVE_GETCWD=1 \
34	-DHAVE_STRSTR=1 -DHAVE_COMPILE=1 -DHAVE_STEP=1 \
35	-DHAVE_KRB_DB_H=1 -DHAVE_KDC_H=1 -DKDB4_DISABLE \
36	-DUSE_KADM5_API_VERSION=2
37
38CERRWARN += -_gcc=-Wno-parentheses
39CERRWARN += -_gcc=-Wno-unused-variable
40CERRWARN += -_gcc=-Wno-unused-function
41CERRWARN += -_gcc=-Wno-implicit-function-declaration
42
43# not linted
44SMATCH=off
45
46LDFLAGS += $(KRUNPATH) $(KERBRUNPATH)
47LDLIBS += -L $(ROOT_KLIBDIR) -L $(KRB5LIB) -lkadm5srv -lkdb \
48	-lmech_krb5 -lnsl
49
50.KEEP_STATE:
51
52all: $(PROG)
53
54# Rpcgen-erate iprop.h from the iprop.x spec file
55$(ISRCHDR):	$(KRB5IPROPDIR)/iprop.x
56	$(RM)	$@
57	$(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@
58
59# Explicitly state the dependency on iprop.h
60$(OBJS):	$(ISRCHDR)
61
62$(PROG):	$(OBJS)
63	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
64	$(POST_PROCESS)
65
66install: $(KRB5SBINPROG)
67
68clean:
69	$(RM) $(OBJS) $(ISRCHDR)
70
71include ../../../Makefile.targ
72
73$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
74	$(RM) $@
75	$(CAT) $(POFILES) > $@
76
77generic.po: FRC
78	$(RM) messages.po
79	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
80	$(SED) "/^domain/d" messages.po > $@
81	$(RM) messages.po
82
83FRC:
84