xref: /titanic_51/usr/src/cmd/krb5/kadmin/server/Makefile (revision 24fe0b3bf671e123467ce1df0b67cadd3614c8e4)
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= kadmind
9MANIFEST=	kadmin.xml
10
11OBJS	= kadm_rpc_svc.o server_stubs.o ovsec_kadmd.o misc.o server_glue_v1.o \
12          ipropd_svc.o
13
14DERIVED_OBJS= iprop_xdr.o
15
16SRCS=	$(OBJS:.o=.c)
17SRCS+=	$(DERIVED_OBJS:.o=.c)
18
19# Definitions needed to rpcgen iprop-related files
20ISRC= iprop.h iprop_xdr.c
21KRB5IPROPDIR= $(SRC)/cmd/krb5/iprop
22CMD= grep -v "usr/src/cmd/krb5/iprop" > $@
23
24CLOBBERFILES += $(TESTPROG)
25
26include ../../../Makefile.cmd
27include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
28
29POFILE = $(PROG).po
30POFILES = generic.po
31
32ROOTMANIFESTDIR=	$(ROOTSVCNETWORKSECURITY)
33
34DEFS = -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 -DHAVE_COMPILE=1 -DHAVE_STEP=1  -DKRB5_KRB4_COMPAT
35
36CPPFLAGS += -I. -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
37		-I$(SRC)/lib/krb5 \
38		-I$(SRC)/lib/krb5/kadm5 \
39		-I$(SRC)/lib/krb5/kadm5/srv \
40		-I$(SRC)/lib/gss_mechs/mech_krb5/include \
41		-I$(KRB5IPROPDIR) \
42		-I$(SRC)/uts/common/gssapi/include/ $(DEFS)
43
44COPTFLAG += $(XESS) #-I$(KINCDIR)
45
46LDFLAGS += $(KRUNPATH) $(KERBRUNPATH)
47LDLIBS += -lgss -L$(KRB5LIB) \
48	-lmech_krb5 -lkadm5srv -lkdb -lnsl -lresolv -lbsm -lpam -lsocket
49
50.KEEP_STATE:
51
52all: $(PROG)
53
54$(PROG):	$(OBJS) $(DERIVED_OBJS)
55	$(LINK.c) $(OBJS) $(DERIVED_OBJS) -o $@ $(LDLIBS)
56	$(POST_PROCESS)
57
58# Rules to rpcgen-erate derived files from the iprop.x spec file
59iprop.h:	$(KRB5IPROPDIR)/iprop.x
60	$(RM) $@
61	$(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@
62
63iprop_xdr.c:	iprop.h $(KRB5IPROPDIR)/iprop.x
64	$(RM) $@
65	$(RPCGEN) -c $(KRB5IPROPDIR)/iprop.x | $(CMD)
66
67# Explicitly state the dependancy on iprop.h
68$(OBJS): iprop.h
69
70$(KRB5LIBPROG):=	FILEMODE = 0500
71
72install: $(KRB5LIBPROG) $(ROOTSVCMETHOD) $(ROOTMANIFEST)
73
74check:	$(CHKMANIFEST)
75
76clean:
77	$(RM) $(OBJS) $(DERIVED_OBJS) $(ISRC)
78
79lint: lint_SRCS
80
81include ../../../Makefile.targ
82
83$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
84	$(RM) $@
85	$(CAT) $(POFILES) > $@
86
87generic.po: FRC
88	$(RM) messages.po
89	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
90	$(SED) "/^domain/d" messages.po > $@
91	$(RM) messages.po
92
93FRC:
94