xref: /titanic_41/usr/src/cmd/krb5/kadmin/cli/Makefile (revision 49d3bc91e27cd871b950d56c01398fa2f2e12ab4)
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= kadmin kadmin.local
9SHFILES= k5srvutil
10CLOBBERFILES= $(SHFILES)
11
12KRB5SBINSHFILES= $(SHFILES:%=$(KRB5SBIN)/%)
13
14COMMON_OBJS   = kadmin.o kadmin_ct.o ss_wrapper.o getdate.o keytab.o
15RMT_OBJS= $(COMMON_OBJS) kadmin_rmt.o
16LOC_OBJS= $(COMMON_OBJS) kadmin_loc.o
17OBJS	= $(COMMON_OBJS) $(RMT_OBJS) $(LOC_OBJS)
18SRCS	= $(OBJS:.o=.c)
19
20include ../../../Makefile.cmd
21include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
22
23POFILE = generic.po
24POFILES = kadmin.po k5srvutil.po
25
26DEFS = -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIMEB_H=1 \
27	-DHAVE_ALLOCA_H=1 -DHAVE_FTIME=1 -DHAVE_TIMEZONE
28
29CPPFLAGS += -I$(SRC)/uts/common/gssapi/include/ \
30		-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
31		-I$(SRC)/uts/common/gssapi/include \
32		-I$(SRC)/cmd/krb5/iprop \
33		-I$(SRC)/lib/krb5 \
34		-I$(SRC)/lib/gss_mechs/mech_krb5/include $(DEFS)
35
36COPTFLAG += $(XESS) #-I$(KINCDIR)
37
38SHAREDLIBS = -lmech_krb5 -lss
39
40CLLIBS = $(LDLIBS) $(KRUNPATH) $(KERBRUNPATH) \
41	-L$(ROOT_KLIBDIR) -L$(KRB5LIB) $(SHAREDLIBS) -lkadm5clnt
42
43SRVLIBS = $(LDLIBS) $(KRUNPATH) $(KERBRUNPATH) \
44	-L$(ROOT_KLIBDIR) -L$(KRB5LIB) $(SHAREDLIBS) -lkadm5srv
45
46kadmin.local:=	DEFS += -D_KADMIN_LOCAL_
47
48.KEEP_STATE:
49
50all: $(PROG) $(SHFILES)
51
52kadmin:	$(RMT_OBJS)
53	$(LINK.c) $(RMT_OBJS) -o $@ $(CLLIBS)
54	$(POST_PROCESS)
55
56kadmin.local:	$(LOC_OBJS)
57	$(LINK.c) $(LOC_OBJS) -o $@ $(SRVLIBS)
58	$(POST_PROCESS)
59
60$(SHFILES): $(SHFILES).sh
61	$(RM) $(SHFILES)
62	$(CP) $(SHFILES).sh $(SHFILES)
63
64install: $(KRB5SBINPROG) $(KRB5SBINSHFILES)
65
66clean:
67	$(RM) $(OBJS)
68
69lint: lint_SRCS
70
71include ../../../Makefile.targ
72
73$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
74	$(RM) $@
75	$(CAT) $(POFILES) > $@
76
77kadmin.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