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