xref: /titanic_52/usr/src/cmd/krb5/kadmin/cli/Makefile (revision de710d24d2fae4468e64da999e1d952a247f142c)
1#
2# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
3# Use is subject to license terms.
4#
5
6PROG= kadmin kadmin.local
7SHFILES= k5srvutil
8CLOBBERFILES= $(SHFILES)
9
10KRB5SBINSHFILES= $(SHFILES:%=$(KRB5SBIN)/%)
11
12COMMON_OBJS   = kadmin.o kadmin_ct.o ss_wrapper.o getdate.o keytab.o
13RMT_OBJS= $(COMMON_OBJS) kadmin_rmt.o
14LOC_OBJS= $(COMMON_OBJS) kadmin_loc.o
15OBJS	= $(COMMON_OBJS) $(RMT_OBJS) $(LOC_OBJS)
16SRCS	= $(OBJS:.o=.c)
17
18include ../../../Makefile.cmd
19include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
20
21POFILE = generic.po
22POFILES = kadmin.po k5srvutil.po
23
24DEFS = -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIMEB_H=1 \
25	-DHAVE_ALLOCA_H=1 -DHAVE_FTIME=1 -DHAVE_TIMEZONE
26
27CPPFLAGS += -I$(SRC)/uts/common/gssapi/include/ \
28		-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
29		-I$(SRC)/uts/common/gssapi/include \
30		-I$(SRC)/cmd/krb5/iprop \
31		-I$(SRC)/lib/krb5 \
32		-I$(SRC)/lib/gss_mechs/mech_krb5/include $(DEFS)
33
34CERRWARN += -_gcc=-Wno-implicit-function-declaration
35CERRWARN += -_gcc=-Wno-unused-label
36CERRWARN += -_gcc=-Wno-unused-function
37CERRWARN += -_gcc=-Wno-parentheses
38CERRWARN += -_gcc=-Wno-unused-variable
39
40COPTFLAG += $(XESS) #-I$(KINCDIR)
41
42SHAREDLIBS = -lmech_krb5 -lss
43
44CLLIBS = $(LDLIBS) $(KRUNPATH) $(KERBRUNPATH) \
45	-L$(ROOT_KLIBDIR) -L$(KRB5LIB) $(SHAREDLIBS) -lkadm5clnt
46
47SRVLIBS = $(LDLIBS) $(KRUNPATH) $(KERBRUNPATH) \
48	-L$(ROOT_KLIBDIR) -L$(KRB5LIB) $(SHAREDLIBS) -lkadm5srv
49
50kadmin.local:=	DEFS += -D_KADMIN_LOCAL_
51
52.KEEP_STATE:
53
54all: $(PROG) $(SHFILES)
55
56kadmin:	$(RMT_OBJS)
57	$(LINK.c) $(RMT_OBJS) -o $@ $(CLLIBS)
58	$(POST_PROCESS)
59
60kadmin.local:	$(LOC_OBJS)
61	$(LINK.c) $(LOC_OBJS) -o $@ $(SRVLIBS)
62	$(POST_PROCESS)
63
64$(SHFILES): $(SHFILES).sh
65	$(RM) $(SHFILES)
66	$(CP) $(SHFILES).sh $(SHFILES)
67
68install: $(KRB5SBINPROG) $(KRB5SBINSHFILES)
69
70clean:
71	$(RM) $(OBJS)
72
73lint: lint_SRCS
74
75include ../../../Makefile.targ
76
77$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
78	$(RM) $@
79	$(CAT) $(POFILES) > $@
80
81kadmin.po: FRC
82	$(RM) messages.po
83	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
84	$(SED) "/^domain/d" messages.po > $@
85	$(RM) messages.po
86
87FRC:
88