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 2007 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 # ident "%Z%%M% %I%     %E% SMI"
  26 #
  27 
  28 #
  29 # This make file will build mech_krb5.so.1. This shared object
  30 # contains all the functionality needed to support the Kereros V5 GSS-API
  31 # mechanism. No other Kerberos libraries are needed.
  32 #
  33 
  34 include ../../../Makefile.master
  35 
  36 SUBDIRS =       $(MACH)
  37 $(BUILD64)SUBDIRS += $(MACH64)
  38 
  39 # include library definitions
  40 include ../../Makefile.lib
  41 
  42 GREP= find . \( -name SCCS -prune -o -name '*.[ch]' \) -print | sort | xargs grep
  43 
  44 sparcv9_C_PICFLAGS =  -K PIC
  45 TEXT_DOMAIN = SUNW_OST_NETRPC
  46 POFILE = mech_krb5.po
  47 POFILES = generic.po
  48 
  49 HDRS=
  50 
  51 CHECKHDRS= $(HDRS:%.h=%.check)
  52 
  53 $(ROOTDIRS)/%:  %
  54         $(INS.file)
  55 
  56 all :=          TARGET= all
  57 clean :=        TARGET= clean
  58 clobber :=      TARGET= clobber
  59 install :=      TARGET= install
  60 lint :=         TARGET= lint
  61 
  62 .KEEP_STATE:
  63 
  64 all clean lint:    $(SUBDIRS)
  65 
  66 install: install_dir all .WAIT $(SUBDIRS)
  67 
  68 # override ROOTLIBDIR and ROOTLINKS
  69 ROOTLIBDIR=     $(ROOT)/usr/lib/gss
  70 
  71 install_dir:    $(ROOTLIBDIR) $(BUILD64)
  72 
  73 install_h:
  74 
  75 clobber: $(SUBDIRS)
  76         $(RM) $(POFILE) $(POFILES)
  77 
  78 check: $(CHECKHDRS)
  79 
  80 do_pkg:
  81         cd pkg ; pwd ; $(MAKE) install
  82 
  83 $(ROOTLIBDIR):
  84         $(INS.dir)
  85 
  86 
  87 # include library targets
  88 # include ../../Makefile.targ
  89 
  90 $(SUBDIRS):     FRC
  91         @cd $@; pwd; $(MAKE) $(TARGET)
  92 
  93 FRC:
  94 
  95 # EXPORT DELETE START
  96 # Special target to clean up the source tree for export distribution
  97 # Warning: This target changes the source tree
  98 EXPORT_SRC:
  99         $(RM) Makefile+ Makefile.mech_krb5+\
 100                 crypto/des/afsstring2key.c+ \
 101                 crypto/des/string2key.c+ \
 102                 mech/krb5_gss_glue.c+
 103 
 104         $(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
 105                 < crypto/des/afsstring2key.c > crypto/des/afsstring2key.c+
 106         $(MV) crypto/des/afsstring2key.c+ crypto/des/afsstring2key.c
 107 
 108         $(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
 109                 < crypto/des/string2key.c > crypto/des/string2key.c+
 110         $(MV) crypto/des/string2key.c+ crypto/des/string2key.c
 111 
 112         $(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
 113                 < mech/krb5_gss_glue.c > mech/krb5_gss_glue.c+
 114         $(MV) mech/krb5_gss_glue.c+ mech/krb5_gss_glue.c
 115 
 116         $(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
 117                 < Makefile.mech_krb5 > Makefile.mech_krb5+
 118         $(MV) Makefile.mech_krb5+ Makefile.mech_krb5
 119 
 120         $(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
 121                 < Makefile > Makefile+
 122         $(MV) Makefile+ Makefile
 123 
 124         $(CHMOD) 444 Makefile Makefile.mech_krb5 \
 125                 crypto/des/afsstring2key.c \
 126                 crypto/des/string2key.c \
 127                 mech/krb5_gss_glue.c
 128 
 129 
 130 # CRYPT DELETE START
 131 # Special target to clean up the source tree for domestic distribution
 132 # Warning: This target changes the source tree
 133 CRYPT_SRC:
 134         $(RM) Makefile+ mech/krb5_gss_glue.c+
 135 
 136         $(SED) -e "/CRYPT DELETE START/,/CRYPT DELETE END/d" \
 137                 > mech/krb5_gss_glue.c+ < mech/krb5_gss_glue.c
 138         $(MV) mech/krb5_gss_glue.c+ mech/krb5_gss_glue.c
 139 
 140         $(SED) -e "/^# CRYPT DELETE START/,/^# CRYPT DELETE END/d"      \
 141                         < Makefile                           \
 142            | $(SED) -e "/EXPORT DELETE/d"                               \
 143                         > Makefile+
 144         $(MV) Makefile+ Makefile
 145 
 146         $(CHMOD) 444 mech/krb5_gss_glue.c Makefile
 147 
 148 # CRYPT DELETE END
 149 # EXPORT DELETE END
 150 
 151 
 152 
 153 FRC:
 154 
 155 _msg: $(MSGDOMAIN) .WAIT $(POFILE)
 156         $(RM) $(MSGDOMAIN)/$(POFILE)
 157         $(CP) $(POFILE) $(MSGDOMAIN)
 158 
 159 $(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
 160         $(RM) $@
 161         $(CAT) $(POFILES) > $@
 162 
 163 generic.po: FRC
 164         $(RM) messages.po
 165         -$(XGETTEXT) $(XGETFLAGS) `$(GREP) -s -l gettext`
 166         $(SED) "/^domain/d" messages.po > $@
 167         $(RM) messages.po
 168 
 169 $(MSGDOMAIN):
 170         $(INS.dir)