xref: /illumos-gate/usr/src/cmd/krb5/krb5kdc/Makefile (revision 20a7641f9918de8574b8b3b47dbe35c4bfc78df1)
1#
2# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
3# Use is subject to license terms.
4#
5# Copyright (c) 2018, Joyent, Inc.
6
7PROG= krb5kdc
8MANIFEST=	krb5kdc.xml
9
10OBJS	= \
11	dispatch.o\
12	do_as_req.o\
13	do_tgs_req.o\
14	extern.o\
15	kdc_preauth.o\
16	kdc_util.o\
17	main.o\
18	network.o\
19	policy.o\
20	replay.o \
21	sock2p.o
22
23SRCS	= $(OBJS:.o=.c)
24
25DEFS =  -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 \
26	-DHAVE_SYSLOG_H=1 -DHAVE_STDARG_H=1 \
27	-DHAVE_SYS_SELECT_H=1 -DHAVE_OPENLOG=1 \
28	-DHAVE_SYSLOG=1 -DHAVE_CLOSELOG=1 -DHAVE_STRFTIME=1\
29	-DHAVE_VSPRINTF=1 -DHAVE_COMPILE=1 -DHAVE_STEP=1 \
30	-DHAVE_NETINET_IN_H=1 -DHAVE_INET_NTOP=1 \
31	-DHAVE_SYS_SOCKIO_H=1 -DHAVE_SYS_SELECT_H=1
32
33CLOBBERFILES += $(RSRC)
34
35include ../../Makefile.cmd
36include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
37
38POFILE = $(PROG).po
39POFILES = generic.po
40
41ROOTMANIFESTDIR=	$(ROOTSVCNETWORKSECURITY)
42
43CFLAGS += $(CCOPTS) $(DEFS) $(LOCALINCLUDE)
44# The SET macros in network.c will be mis-optimized if GCC believes it
45# may rely on undefined signed overflow behaviour.
46CFLAGS += -_gcc=-fno-strict-overflow
47
48CPPFLAGS += \
49	-I$(SRC)/lib/gss_mechs/mech_krb5/include \
50	-I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5\
51	-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
52	-DHAVE_SYSLOG_H=1
53
54CERRWARN += -_gcc=-Wno-unused-variable
55CERRWARN += -_gcc=-Wno-unused-function
56CERRWARN += -_gcc=-Wno-type-limits
57CERRWARN += -_gcc=-Wno-implicit-function-declaration
58CERRWARN += -_gcc=-Wno-parentheses
59
60# not linted
61SMATCH=off
62
63LDFLAGS += $(KRUNPATH) $(KERBRUNPATH)
64LDLIBS += -L$(ROOT_KLIBDIR) -L$(KRB5LIB) \
65	  -lmech_krb5 -lkdb -lkadm5srv -lnsl -lsocket -lbsm -lc
66
67.KEEP_STATE:
68
69all: $(PROG)
70
71$(PROG):       $(OBJS)
72	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
73	$(POST_PROCESS)
74
75$(KRB5LIBPROG):=	FILEMODE = 500
76
77install: $(KRB5LIBPROG) $(ROOTSVCMETHOD) $(ROOTMANIFEST)
78
79check:	$(CHKMANIFEST)
80
81clean:
82	$(RM) $(OBJS)
83
84include ../../Makefile.targ
85
86$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
87	$(RM) $@
88	$(CAT) $(POFILES) > $@
89
90generic.po: FRC
91	$(RM) messages.po
92	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
93	$(SED) "/^domain/d" messages.po > $@
94	$(RM) messages.po
95
96FRC:
97