xref: /illumos-gate/usr/src/cmd/krb5/kadmin/cli/Makefile (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate#
2*7c478bd9Sstevel@tonic-gate# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3*7c478bd9Sstevel@tonic-gate# Use is subject to license terms.
4*7c478bd9Sstevel@tonic-gate#
5*7c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
6*7c478bd9Sstevel@tonic-gate#
7*7c478bd9Sstevel@tonic-gate
8*7c478bd9Sstevel@tonic-gatePROG= kadmin kadmin.local
9*7c478bd9Sstevel@tonic-gate
10*7c478bd9Sstevel@tonic-gateCOMMON_OBJS   = kadmin.o kadmin_ct.o ss_wrapper.o getdate.o keytab.o
11*7c478bd9Sstevel@tonic-gateRMT_OBJS= $(COMMON_OBJS) kadmin_rmt.o
12*7c478bd9Sstevel@tonic-gateLOC_OBJS= $(COMMON_OBJS) kadmin_loc.o
13*7c478bd9Sstevel@tonic-gateOBJS	= $(COMMON_OBJS) $(RMT_OBJS) $(LOC_OBJS)
14*7c478bd9Sstevel@tonic-gateSRCS	= $(OBJS:.o=.c)
15*7c478bd9Sstevel@tonic-gate
16*7c478bd9Sstevel@tonic-gateinclude ../../../Makefile.cmd
17*7c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
18*7c478bd9Sstevel@tonic-gate
19*7c478bd9Sstevel@tonic-gatePOFILE = kadmin.po
20*7c478bd9Sstevel@tonic-gatePOFILES = generic.po
21*7c478bd9Sstevel@tonic-gate
22*7c478bd9Sstevel@tonic-gateDEFS = -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIMEB_H=1 \
23*7c478bd9Sstevel@tonic-gate	-DHAVE_ALLOCA_H=1 -DHAVE_FTIME=1 -DHAVE_TIMEZONE
24*7c478bd9Sstevel@tonic-gate
25*7c478bd9Sstevel@tonic-gateCPPFLAGS += -I$(SRC)/uts/common/gssapi/include/ \
26*7c478bd9Sstevel@tonic-gate		-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
27*7c478bd9Sstevel@tonic-gate		-I$(SRC)/uts/common/gssapi/include \
28*7c478bd9Sstevel@tonic-gate		-I$(SRC)/cmd/krb5/iprop \
29*7c478bd9Sstevel@tonic-gate		-I$(SRC)/lib/krb5 \
30*7c478bd9Sstevel@tonic-gate		-I$(SRC)/lib/gss_mechs/mech_krb5/include $(DEFS)
31*7c478bd9Sstevel@tonic-gate
32*7c478bd9Sstevel@tonic-gateCOPTFLAG += $(XESS) #-I$(KINCDIR)
33*7c478bd9Sstevel@tonic-gate
34*7c478bd9Sstevel@tonic-gateSHAREDLIBS = -lmech_krb5 -lss
35*7c478bd9Sstevel@tonic-gate
36*7c478bd9Sstevel@tonic-gateCLLIBS = $(LDLIBS) $(KRUNPATH) \
37*7c478bd9Sstevel@tonic-gate	-L$(ROOT_KLIBDIR) -L$(KRB5LIB) $(SHAREDLIBS) -lkadm5clnt
38*7c478bd9Sstevel@tonic-gate
39*7c478bd9Sstevel@tonic-gateSRVLIBS = $(LDLIBS) $(KRUNPATH) \
40*7c478bd9Sstevel@tonic-gate	-L$(ROOT_KLIBDIR) -L$(KRB5LIB) $(SHAREDLIBS) -lkadm5srv
41*7c478bd9Sstevel@tonic-gate
42*7c478bd9Sstevel@tonic-gatekadmin.local:=	DEFS += -D_KADMIN_LOCAL_
43*7c478bd9Sstevel@tonic-gate
44*7c478bd9Sstevel@tonic-gate.KEEP_STATE:
45*7c478bd9Sstevel@tonic-gate
46*7c478bd9Sstevel@tonic-gateall: $(PROG)
47*7c478bd9Sstevel@tonic-gate
48*7c478bd9Sstevel@tonic-gatekadmin:	$(RMT_OBJS)
49*7c478bd9Sstevel@tonic-gate	$(LINK.c) $(RMT_OBJS) -o $@ $(CLLIBS)
50*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
51*7c478bd9Sstevel@tonic-gate
52*7c478bd9Sstevel@tonic-gatekadmin.local:	$(LOC_OBJS)
53*7c478bd9Sstevel@tonic-gate	$(LINK.c) $(LOC_OBJS) -o $@ $(SRVLIBS)
54*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
55*7c478bd9Sstevel@tonic-gate
56*7c478bd9Sstevel@tonic-gateinstall: $(KRB5SBINPROG)
57*7c478bd9Sstevel@tonic-gate
58*7c478bd9Sstevel@tonic-gateclean:
59*7c478bd9Sstevel@tonic-gate	$(RM) $(OBJS)
60*7c478bd9Sstevel@tonic-gate
61*7c478bd9Sstevel@tonic-gatelint: lint_SRCS
62*7c478bd9Sstevel@tonic-gate
63*7c478bd9Sstevel@tonic-gateinclude ../../../Makefile.targ
64*7c478bd9Sstevel@tonic-gate
65*7c478bd9Sstevel@tonic-gate$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
66*7c478bd9Sstevel@tonic-gate	$(RM) $@
67*7c478bd9Sstevel@tonic-gate	$(CAT) $(POFILES) > $@
68*7c478bd9Sstevel@tonic-gate
69*7c478bd9Sstevel@tonic-gategeneric.po: FRC
70*7c478bd9Sstevel@tonic-gate	$(RM) messages.po
71*7c478bd9Sstevel@tonic-gate	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
72*7c478bd9Sstevel@tonic-gate	$(SED) "/^domain/d" messages.po > $@
73*7c478bd9Sstevel@tonic-gate	$(RM) messages.po
74*7c478bd9Sstevel@tonic-gate
75*7c478bd9Sstevel@tonic-gateFRC:
76