xref: /illumos-gate/usr/src/cmd/krb5/krb5kdc/Makefile (revision ff67a31b6b184e832f89a53763c02c35bd1a7291)
17c478bd9Sstevel@tonic-gate#
27c64d375Smp153739# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
37c478bd9Sstevel@tonic-gate# Use is subject to license terms.
47c478bd9Sstevel@tonic-gate#
5*5661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc.
67c478bd9Sstevel@tonic-gate
77c478bd9Sstevel@tonic-gatePROG= krb5kdc
87c478bd9Sstevel@tonic-gateMANIFEST=	krb5kdc.xml
97c478bd9Sstevel@tonic-gate
107c478bd9Sstevel@tonic-gateOBJS	= \
117c478bd9Sstevel@tonic-gate	dispatch.o\
127c478bd9Sstevel@tonic-gate	do_as_req.o\
137c478bd9Sstevel@tonic-gate	do_tgs_req.o\
147c478bd9Sstevel@tonic-gate	extern.o\
157c478bd9Sstevel@tonic-gate	kdc_preauth.o\
167c478bd9Sstevel@tonic-gate	kdc_util.o\
177c478bd9Sstevel@tonic-gate	main.o\
187c478bd9Sstevel@tonic-gate	network.o\
197c478bd9Sstevel@tonic-gate	policy.o\
207c478bd9Sstevel@tonic-gate	replay.o \
217c478bd9Sstevel@tonic-gate	sock2p.o
227c478bd9Sstevel@tonic-gate
237c478bd9Sstevel@tonic-gateSRCS	= $(OBJS:.o=.c)
247c478bd9Sstevel@tonic-gate
257c478bd9Sstevel@tonic-gateDEFS =  -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 \
267c478bd9Sstevel@tonic-gate	-DHAVE_SYSLOG_H=1 -DHAVE_STDARG_H=1 \
277c478bd9Sstevel@tonic-gate	-DHAVE_SYS_SELECT_H=1 -DHAVE_OPENLOG=1 \
287c478bd9Sstevel@tonic-gate	-DHAVE_SYSLOG=1 -DHAVE_CLOSELOG=1 -DHAVE_STRFTIME=1\
297c478bd9Sstevel@tonic-gate	-DHAVE_VSPRINTF=1 -DHAVE_COMPILE=1 -DHAVE_STEP=1 \
307c478bd9Sstevel@tonic-gate	-DHAVE_NETINET_IN_H=1 -DHAVE_INET_NTOP=1 \
317c478bd9Sstevel@tonic-gate	-DHAVE_SYS_SOCKIO_H=1 -DHAVE_SYS_SELECT_H=1
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gateCLOBBERFILES += $(RSRC)
347c478bd9Sstevel@tonic-gate
357c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd
367c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
377c478bd9Sstevel@tonic-gate
387c478bd9Sstevel@tonic-gatePOFILE = $(PROG).po
397c478bd9Sstevel@tonic-gatePOFILES = generic.po
407c478bd9Sstevel@tonic-gate
417c478bd9Sstevel@tonic-gateROOTMANIFESTDIR=	$(ROOTSVCNETWORKSECURITY)
427c478bd9Sstevel@tonic-gate
437c478bd9Sstevel@tonic-gateCFLAGS += $(CCOPTS) $(DEFS) $(LOCALINCLUDE)
446a3e8e86SRichard Lowe# The SET macros in network.c will be mis-optimized if GCC believes it
456a3e8e86SRichard Lowe# may rely on undefined signed overflow behaviour.
461a5ea532SRichard LoweCFLAGS += -_gcc=-fno-strict-overflow
477c478bd9Sstevel@tonic-gate
487c478bd9Sstevel@tonic-gateCPPFLAGS += \
497c478bd9Sstevel@tonic-gate	-I$(SRC)/lib/gss_mechs/mech_krb5/include \
507c478bd9Sstevel@tonic-gate	-I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5\
517c478bd9Sstevel@tonic-gate	-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
527c478bd9Sstevel@tonic-gate	-DHAVE_SYSLOG_H=1
537c478bd9Sstevel@tonic-gate
547014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable
557014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-function
567014882cSRichard LoweCERRWARN += -_gcc=-Wno-type-limits
577014882cSRichard LoweCERRWARN += -_gcc=-Wno-implicit-function-declaration
587014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses
597014882cSRichard Lowe
60*5661bb76SJohn Levon# not linted
61*5661bb76SJohn LevonSMATCH=off
62*5661bb76SJohn Levon
6367e3a03eSrieLDFLAGS += $(KRUNPATH) $(KERBRUNPATH)
647c478bd9Sstevel@tonic-gateLDLIBS += -L$(ROOT_KLIBDIR) -L$(KRB5LIB) \
657c478bd9Sstevel@tonic-gate	  -lmech_krb5 -lkdb -lkadm5srv -lnsl -lsocket -lbsm -lc
667c478bd9Sstevel@tonic-gate
677c478bd9Sstevel@tonic-gate.KEEP_STATE:
687c478bd9Sstevel@tonic-gate
697c478bd9Sstevel@tonic-gateall: $(PROG)
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gate$(PROG):       $(OBJS)
727c478bd9Sstevel@tonic-gate	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
737c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gate$(KRB5LIBPROG):=	FILEMODE = 500
767c478bd9Sstevel@tonic-gate
77a192e900Samaguireinstall: $(KRB5LIBPROG) $(ROOTSVCMETHOD) $(ROOTMANIFEST)
787c478bd9Sstevel@tonic-gate
797c478bd9Sstevel@tonic-gatecheck:	$(CHKMANIFEST)
807c478bd9Sstevel@tonic-gate
817c478bd9Sstevel@tonic-gateclean:
827c478bd9Sstevel@tonic-gate	$(RM) $(OBJS)
837c478bd9Sstevel@tonic-gate
847c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
857c478bd9Sstevel@tonic-gate
867c478bd9Sstevel@tonic-gate$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
877c478bd9Sstevel@tonic-gate	$(RM) $@
887c478bd9Sstevel@tonic-gate	$(CAT) $(POFILES) > $@
897c478bd9Sstevel@tonic-gate
907c478bd9Sstevel@tonic-gategeneric.po: FRC
917c478bd9Sstevel@tonic-gate	$(RM) messages.po
927c478bd9Sstevel@tonic-gate	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
937c478bd9Sstevel@tonic-gate	$(SED) "/^domain/d" messages.po > $@
947c478bd9Sstevel@tonic-gate	$(RM) messages.po
957c478bd9Sstevel@tonic-gate
967c478bd9Sstevel@tonic-gateFRC:
97