1 #
   2 # CDDL HEADER START
   3 #
   4 # The contents of this file are subject to the terms of the
   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 # Copyright 2017 RackTop Systems.
  26 #
  27 #
  28 
  29 LIBRARY= pkinit.a
  30 VERS= .1
  31 
  32 PKINIT_OBJS= \
  33         pkinit_accessor.o \
  34         pkinit_clnt.o \
  35         pkinit_crypto_openssl.o \
  36         pkinit_identity.o \
  37         pkinit_lib.o \
  38         pkinit_matching.o \
  39         pkinit_profile.o \
  40         pkinit_srv.o
  41 
  42 
  43 OBJECTS= $(PKINIT_OBJS)
  44 
  45 # include library definitions
  46 include $(SRC)/lib/krb5/Makefile.lib
  47 
  48 SRCS= $(PKINIT_OBJS:%.o=../%.c)
  49 
  50 LIBS=           $(DYNLIB)
  51 
  52 include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
  53 
  54 POFILE = $(LIBRARY:%.a=%.po)
  55 POFILES = generic.po
  56 
  57 #override liblink
  58 INS.liblink=    -$(RM) $@; $(SYMLINK) $(LIBLINKS)$(VERS) $@
  59 
  60 
  61 CPPFLAGS +=     -I$(SRC)/lib/krb5 \
  62                 -I$(SRC)/lib/krb5/kdb \
  63                 -I$(SRC)/lib/gss_mechs/mech_krb5/include \
  64                 -I$(SRC)/lib/gss_mechs/mech_krb5/krb5/os \
  65                 -I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5 \
  66                 -I$(SRC)/uts/common/gssapi/include/ \
  67                 -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
  68                 -I$(SRC)
  69 
  70 CERRWARN        += -_gcc=-Wno-uninitialized
  71 CERRWARN        += -_gcc=-Wno-unused-function
  72 
  73 CFLAGS +=       $(CCVERBOSE) -I..
  74 DYNFLAGS +=     $(KRUNPATH) $(KMECHLIB) -znodelete
  75 LDLIBS +=       -L $(ROOTLIBDIR) -lcrypto -lc
  76 
  77 # Allow libcrypto to be taken from outside the proto area.
  78 $(ADJUNCT_PROTO_NOT_SET)DYNFLAGS += $(ZASSERTDEFLIB)=libcrypto.so
  79 
  80 ROOTLIBDIR= $(ROOT)/usr/lib/krb5/plugins/preauth
  81 
  82 $(ROOTLIBDIR):
  83         $(INS.dir)
  84 
  85 .KEEP_STATE:
  86 
  87 all:    $(LIBS)
  88 
  89 lint:   lintcheck
  90 
  91 # include library targets
  92 include $(SRC)/lib/krb5/Makefile.targ
  93 
  94 FRC:
  95 
  96 generic.po: FRC
  97         $(RM) messages.po
  98         $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext ../*.[ch]`
  99         $(SED) "/^domain/d" messages.po > $@
 100         $(RM) messages.po