xref: /titanic_41/usr/src/cmd/krb5/kadmin/server/Makefile (revision 45916cd2fec6e79bca5dee0421bd39e3c2910d1e)
1#
2# Copyright 2004 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
10ROOTMETHOD=	$(ROOTLIBSVCMETHOD)/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$(ROOTMANIFEST):=	FILEMODE = 0444
73
74install: $(KRB5LIBPROG) $(ROOTMETHOD) $(ROOTMANIFEST)
75
76check:	$(CHKMANIFEST)
77
78clean:
79	$(RM) $(OBJS) $(DERIVED_OBJS) $(ISRC)
80
81lint: lint_SRCS
82
83include ../../../Makefile.targ
84
85$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
86	$(RM) $@
87	$(CAT) $(POFILES) > $@
88
89generic.po: FRC
90	$(RM) messages.po
91	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
92	$(SED) "/^domain/d" messages.po > $@
93	$(RM) messages.po
94
95FRC:
96