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 
   7 PROG= kinit
   8 
   9 OBJS    = kinit.o
  10 SRCS    = kinit.c
  11 
  12 DEFS =  -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 -DHAVE_PWD_H=1 -DHAVE_COMPILE=1 -DHAVE_STEP=1 
  13 
  14 include ../../Makefile.cmd
  15 include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
  16 
  17 CERRWARN += -_gcc=-Wno-implicit-function-declaration
  18 CERRWARN += -_gcc=-Wno-unused-function
  19 CERRWARN += -_gcc=-Wno-parentheses
  20 
  21 # not linted
  22 SMATCH=off
  23 
  24 POFILE = kinit.po
  25 POFILES = generic.po
  26 
  27 DEFS = -DHAVE_PWD_H
  28 
  29 CPPFLAGS += -I../../lib/gss_mechs/mech_krb5/include \
  30                 -I$(SRC)/lib/gss_mechs/mech_krb5 \
  31                 -I$(SRC)/lib/gss_mechs/mech_krb5/include \
  32                 -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
  33                 $(DEFS)
  34 
  35 LDFLAGS += $(KRUNPATH)
  36 LDLIBS += $(KMECHLIB)
  37 
  38 .KEEP_STATE:
  39 
  40 all: $(PROG)
  41 
  42 $(PROG):       $(OBJS)  
  43         $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
  44         $(POST_PROCESS)
  45 
  46 install: $(KRB5PROG)
  47 
  48 clean:
  49         $(RM) $(OBJS)
  50 
  51 lint: lint_SRCS
  52 
  53 include ../../Makefile.targ
  54 
  55 $(POFILE): $(DERIVED_FILES) .WAIT $(POFILES) 
  56         $(RM) $@ 
  57         $(CAT) $(POFILES) > $@ 
  58 
  59 generic.po:
  60         $(RM) messages.po
  61         $(XGETTEXT) $(XGETFLAGS) `($(GREP) -l gettext *.[ch] || echo /dev/null)`
  62         $(SED) "/^domain/d" messages.po > $@
  63         $(RM) messages.po