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