xref: /titanic_41/usr/src/cmd/krb5/kadmin/dbutil/Makefile (revision 058561cbaa119a6f2659bc27ef343e1b47266bb2)
1#
2# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3# Use is subject to license terms.
4#
5# ident	"%Z%%M%	%I%	%E% SMI"
6#
7
8PROG= kdb5_util
9
10OBJS	= kdb5_util.o \
11        kdb5_create.o kadm5_create.o string_table.o kdb5_stash.o \
12        kdb5_destroy.o ovload.o strtok.o dump.o
13
14SRCS	= $(OBJS:.o=.c)
15
16CLOBBERFILES += $(TESTPROG)
17
18ISRCHDR=	iprop.h
19KRB5IPROPDIR=	$(SRC)/cmd/krb5/iprop
20
21include ../../../Makefile.cmd
22include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
23
24POFILE = $(PROG).po
25POFILES = generic.po
26
27CPPFLAGS += -I. -I$(SRC)/lib/gss_mechs/mech_krb5/include/kerberosIV \
28	-I$(SRC)/lib/gss_mechs/mech_krb5/include \
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
36COPTFLAG += $(XESS) #-I$(KINCDIR)
37
38LDFLAGS += $(KRUNPATH)
39LDLIBS += -L $(ROOT_KLIBDIR) -L $(KRB5LIB) -lkadm5srv -lkdb \
40	-lmech_krb5 -lnsl
41
42.KEEP_STATE:
43
44all: $(PROG)
45
46# Rpcgen-erate iprop.h from the iprop.x spec file
47$(ISRCHDR):	$(KRB5IPROPDIR)/iprop.x
48	$(RM)	$@
49	$(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@
50
51# Explicitly state the dependency on iprop.h
52$(OBJS):	$(ISRCHDR)
53
54$(PROG):	$(OBJS)
55	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
56	$(POST_PROCESS)
57
58install: $(KRB5SBINPROG)
59
60clean:
61	$(RM) $(OBJS) $(ISRCHDR)
62
63lint: lint_SRCS
64
65include ../../../Makefile.targ
66
67$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
68	$(RM) $@
69	$(CAT) $(POFILES) > $@
70
71generic.po: FRC
72	$(RM) messages.po
73	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
74	$(SED) "/^domain/d" messages.po > $@
75	$(RM) messages.po
76
77FRC:
78