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