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