xref: /illumos-gate/usr/src/cmd/krb5/krb5kdc/Makefile (revision 03831d35f7499c87d51205817c93e9a8d42c4bae)
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= krb5kdc
9MANIFEST=	krb5kdc.xml
10ROOTMETHOD=	$(ROOTLIBSVCMETHOD)/svc-kdc
11
12OBJS	= \
13	dispatch.o\
14	do_as_req.o\
15	do_tgs_req.o\
16	extern.o\
17	kdc_preauth.o\
18	kdc_util.o\
19	main.o\
20	network.o\
21	policy.o\
22	replay.o \
23	sock2p.o
24
25SRCS	= $(OBJS:.o=.c)
26
27DEFS =  -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 \
28	-DHAVE_SYSLOG_H=1 -DHAVE_STDARG_H=1 \
29	-DHAVE_SYS_SELECT_H=1 -DHAVE_OPENLOG=1 \
30	-DHAVE_SYSLOG=1 -DHAVE_CLOSELOG=1 -DHAVE_STRFTIME=1\
31	-DHAVE_VSPRINTF=1 -DHAVE_COMPILE=1 -DHAVE_STEP=1 \
32	-DHAVE_NETINET_IN_H=1 -DHAVE_INET_NTOP=1 \
33	-DHAVE_SYS_SOCKIO_H=1 -DHAVE_SYS_SELECT_H=1
34
35CLOBBERFILES += $(RSRC)
36
37include ../../Makefile.cmd
38include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
39
40POFILE = $(PROG).po
41POFILES = generic.po
42
43ROOTMANIFESTDIR=	$(ROOTSVCNETWORKSECURITY)
44
45CFLAGS += $(CCOPTS) $(DEFS) $(LOCALINCLUDE)
46
47CPPFLAGS += \
48	-I$(SRC)/lib/gss_mechs/mech_krb5/include \
49	-I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5\
50	-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
51	-DHAVE_SYSLOG_H=1
52
53LDFLAGS += $(KRUNPATH)
54LDLIBS += -L$(ROOT_KLIBDIR) -L$(KRB5LIB) \
55	  -lmech_krb5 -lkdb -lkadm5srv -lnsl -lsocket -lbsm -lc
56
57.KEEP_STATE:
58
59all: $(PROG)
60
61$(PROG):       $(OBJS)
62	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
63	$(POST_PROCESS)
64
65$(KRB5LIBPROG):=	FILEMODE = 500
66$(ROOTMANIFEST):=	FILEMODE = 444
67
68install: $(KRB5LIBPROG) $(ROOTMETHOD) $(ROOTMANIFEST)
69
70check:	$(CHKMANIFEST)
71
72clean:
73	$(RM) $(OBJS)
74
75lint: lint_SRCS
76
77include ../../Makefile.targ
78
79$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
80	$(RM) $@
81	$(CAT) $(POFILES) > $@
82
83generic.po: FRC
84	$(RM) messages.po
85	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
86	$(SED) "/^domain/d" messages.po > $@
87	$(RM) messages.po
88
89FRC:
90