xref: /titanic_44/usr/src/cmd/krb5/kadmin/dbutil/Makefile (revision 49b225e1cfa7bbf7738d4df0a03f18e3283426eb)
1#
2# Copyright 2008 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/gss_mechs/mech_krb5/include/krb5 \
30	-I$(SRC)/lib/krb5 \
31	-I$(SRC)/uts/common/gssapi/include \
32	-I$(SRC)/uts/common/gssapi/mechs/krb5/include  \
33	-I$(KRB5IPROPDIR) \
34	-DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 -DHAVE_GETCWD=1 \
35	-DHAVE_STRSTR=1 -DHAVE_COMPILE=1 -DHAVE_STEP=1 \
36	-DHAVE_KRB_DB_H=1 -DHAVE_KDC_H=1 -DKDB4_DISABLE \
37	-DUSE_KADM5_API_VERSION=2
38COPTFLAG += $(XESS) #-I$(KINCDIR)
39
40LDFLAGS += $(KRUNPATH) $(KERBRUNPATH)
41LDLIBS += -L $(ROOT_KLIBDIR) -L $(KRB5LIB) -lkadm5srv -lkdb \
42	-lmech_krb5 -lnsl
43
44.KEEP_STATE:
45
46all: $(PROG)
47
48# Rpcgen-erate iprop.h from the iprop.x spec file
49$(ISRCHDR):	$(KRB5IPROPDIR)/iprop.x
50	$(RM)	$@
51	$(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@
52
53# Explicitly state the dependency on iprop.h
54$(OBJS):	$(ISRCHDR)
55
56$(PROG):	$(OBJS)
57	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
58	$(POST_PROCESS)
59
60install: $(KRB5SBINPROG)
61
62clean:
63	$(RM) $(OBJS) $(ISRCHDR)
64
65lint: lint_SRCS
66
67include ../../../Makefile.targ
68
69$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
70	$(RM) $@
71	$(CAT) $(POFILES) > $@
72
73generic.po: FRC
74	$(RM) messages.po
75	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
76	$(SED) "/^domain/d" messages.po > $@
77	$(RM) messages.po
78
79FRC:
80