Merge illumos-gate
[unleashed.git] / usr / src / cmd / krb5 / krb5kdc / Makefile
blobf1a4cee119ff56e36f8e7b931ee93762129dedf0
2 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
3 # Use is subject to license terms.
5 # Copyright (c) 2018, Joyent, Inc.
7 PROG= krb5kdc
8 MANIFEST= krb5kdc.xml
10 OBJS = \
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
23 SRCS = $(OBJS:.o=.c)
25 DEFS = -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
33 CLOBBERFILES += $(RSRC)
35 include ../../Makefile.cmd
36 include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
38 POFILE = $(PROG).po
39 POFILES = generic.po
41 ROOTMANIFESTDIR= $(ROOTSVCNETWORKSECURITY)
43 CFLAGS += $(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.
46 CFLAGS += -fno-strict-overflow
48 CPPFLAGS += \
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
54 CERRWARN += -Wno-unused-variable
55 CERRWARN += -Wno-unused-function
56 CERRWARN += -Wno-type-limits
57 CERRWARN += -Wno-implicit-function-declaration
58 CERRWARN += -Wno-parentheses
60 # not linted
61 SMATCH=off
63 LDFLAGS += $(KRUNPATH) $(KERBRUNPATH)
64 LDLIBS += -L$(ROOT_KLIBDIR) -L$(KRB5LIB) \
65 -lmech_krb5 -lkdb -lkadm5srv -lc
67 .KEEP_STATE:
69 all: $(PROG)
71 $(PROG): $(OBJS)
72 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
73 $(POST_PROCESS)
75 $(KRB5LIBPROG):= FILEMODE = 500
77 install: $(KRB5LIBPROG) $(ROOTSVCMETHOD) $(ROOTMANIFEST)
79 check: $(CHKMANIFEST)
81 clean:
82 $(RM) $(OBJS)
85 include ../../Makefile.targ
87 $(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
88 $(RM) $@
89 $(CAT) $(POFILES) > $@
91 generic.po: FRC
92 $(RM) messages.po
93 $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
94 $(SED) "/^domain/d" messages.po > $@
95 $(RM) messages.po
97 FRC: