xref: /titanic_52/usr/src/cmd/krb5/krb5kdc/Makefile (revision 7bc878958fba2b44705c85efbc07b747ef0eeed1)
1#
2# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
3# Use is subject to license terms.
4#
5
6PROG= krb5kdc
7MANIFEST=	krb5kdc.xml
8
9OBJS	= \
10	dispatch.o\
11	do_as_req.o\
12	do_tgs_req.o\
13	extern.o\
14	kdc_preauth.o\
15	kdc_util.o\
16	main.o\
17	network.o\
18	policy.o\
19	replay.o \
20	sock2p.o
21
22SRCS	= $(OBJS:.o=.c)
23
24DEFS =  -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 \
25	-DHAVE_SYSLOG_H=1 -DHAVE_STDARG_H=1 \
26	-DHAVE_SYS_SELECT_H=1 -DHAVE_OPENLOG=1 \
27	-DHAVE_SYSLOG=1 -DHAVE_CLOSELOG=1 -DHAVE_STRFTIME=1\
28	-DHAVE_VSPRINTF=1 -DHAVE_COMPILE=1 -DHAVE_STEP=1 \
29	-DHAVE_NETINET_IN_H=1 -DHAVE_INET_NTOP=1 \
30	-DHAVE_SYS_SOCKIO_H=1 -DHAVE_SYS_SELECT_H=1
31
32CLOBBERFILES += $(RSRC)
33
34include ../../Makefile.cmd
35include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
36
37POFILE = $(PROG).po
38POFILES = generic.po
39
40ROOTMANIFESTDIR=	$(ROOTSVCNETWORKSECURITY)
41
42CFLAGS += $(CCOPTS) $(DEFS) $(LOCALINCLUDE)
43# The SET macros in network.c will be mis-optimized if GCC believes it
44# may rely on undefined signed overflow behaviour.
45$(__GNUC4)CFLAGS += -_gcc=-fno-strict-overflow
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) $(KERBRUNPATH)
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
67install: $(KRB5LIBPROG) $(ROOTSVCMETHOD) $(ROOTMANIFEST)
68
69check:	$(CHKMANIFEST)
70
71clean:
72	$(RM) $(OBJS)
73
74lint: lint_SRCS
75
76include ../../Makefile.targ
77
78$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
79	$(RM) $@
80	$(CAT) $(POFILES) > $@
81
82generic.po: FRC
83	$(RM) messages.po
84	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
85	$(SED) "/^domain/d" messages.po > $@
86	$(RM) messages.po
87
88FRC:
89