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 #
  23 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  24 # Use is subject to license terms.
  25 #
  26 
  27 TESTPROG = kwarndtest 
  28 
  29 PROG= ktkt_warnd
  30 MANIFEST=       ktkt_warn.xml
  31 
  32 KWARNDOBJS = kwarnd.o kwarnd_svc.o kwarnd_proc.o kwarnd_generic.o kwarnd_send.o
  33 KWARNTOBJS = kwarndtest.o
  34 
  35 G_OBJS   = kwarnd_xdr.o 
  36 
  37 OBJS    = $(KWARNDOBJS) $(KWARNTOBJS) $(G_OBJS)
  38 SRCS    = $(OBJS:.o=.c)
  39 RSRC    = kwarnd_xdr.c kwarnd_svc.c kwarnd.h
  40 
  41 CLOBBERFILES += $(TESTPROG)
  42 
  43 include ../../Makefile.cmd
  44 include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
  45 
  46 ROOTMANIFESTDIR=        $(ROOTSVCNETWORKSECURITY)
  47 
  48 POFILE = $(PROG).po
  49 POFILES = generic.po
  50 
  51 COPTFLAG +=     $(XESS) #-I$(KINCDIR) 
  52 CPPFLAGS +=     -D_REENTRANT
  53 
  54 CERRWARN +=     -_gcc=-Wno-unused-variable
  55 CERRWARN +=     -_gcc=-Wno-unused-function
  56 CERRWARN +=     -_gcc=-Wno-implicit-function-declaration
  57 CERRWARN +=     -_gcc=-Wno-parentheses
  58 
  59 CPPFLAGS += -I../../lib/gss_mechs/mech_krb5/include \
  60                  -I$(SRC)/lib/gss_mechs/mech_krb5 \
  61                  -I$(SRC)/lib/gss_mechs/mech_krb5/include \
  62                  -I$(SRC)/uts/common/gssapi/mechs/krb5/include
  63 
  64 ktkt_warnd :=   MAPFILES =      $(MAPFILE.INT) $(MAPFILE.NGB)
  65 ktkt_warnd :=   LDFLAGS +=      $(KRUNPATH) $(MAPFILES:%=-M%)
  66 
  67 LDFLAGS +=      $(KRUNPATH)
  68 LDLIBS +=       $(KMECHLIB) -lnsl
  69 
  70 .KEEP_STATE:
  71 
  72 all: $(PROG) $(TESTPROG)
  73 
  74 $(PROG):        $(G_OBJS) $(KWARNDOBJS) $$(MAPFILES)
  75         $(LINK.c) $(KWARNDOBJS) $(G_OBJS) -o $@ $(LDLIBS)
  76         $(POST_PROCESS)
  77 
  78 # the client entry points (kwarn_*_warning) are now avail in mech_krb5.so
  79 $(TESTPROG):    $(KWARNTOBJS)
  80         $(LINK.c) $(KWARNTOBJS) -o $@ $(LDLIBS)
  81         $(POST_PROCESS)
  82 
  83 #  Rules to generate derived rpcgen files from kwarnd.x spec file.
  84 
  85 kwarnd.h:        kwarnd.x
  86         $(RM) $@
  87         $(RPCGEN) -M -h kwarnd.x > $@
  88 
  89 kwarnd_svc.c:    kwarnd.x
  90         $(RM) $@
  91         $(RPCGEN) -M -m kwarnd.x > $@
  92 
  93 kwarnd_xdr.c:    kwarnd.x
  94         $(RM) $@
  95         $(RPCGEN) -M -c kwarnd.x > $@
  96 
  97 $(OBJS): kwarnd.h
  98 
  99 # note that nightly depends on having all of the derived
 100 # .c files built here on 'make install', even though this
 101 # module doesn't use all of those files.
 102 install: $(KRB5LIBPROG) $(RSRC) $(ROOTMANIFEST)
 103 
 104 check:  $(CHKMANIFEST)
 105 
 106 clean:
 107         $(RM) $(OBJS) $(RSRC)
 108 
 109 lint: lint_SRCS
 110 
 111 include ../../Makefile.targ
 112 
 113 #additional dependencies
 114 
 115 $(LIBRARY) : $(OBJS)
 116 $(DYNLIB) : $(PICS)
 117 
 118 FRC:
 119 
 120 $(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
 121         $(RM) $@
 122         $(CAT) $(POFILES) > $@
 123 
 124 generic.po: FRC
 125         $(RM) messages.po
 126         $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
 127         $(SED) "/^domain/d" messages.po > $@
 128         $(RM) messages.po