xref: /titanic_44/usr/src/cmd/cmd-crypto/etc/Makefile (revision 5a44cca936d722ba0da8ad634653e04b93747ecc)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
544961713Sgirish# Common Development and Distribution License (the "License").
644961713Sgirish# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
2224fe0b3bSjmcp# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate
267c478bd9Sstevel@tonic-gateRELEASECERTS =		SUNW_SunOS_5.10
27*5a44cca9SValerie Bubb FenwickRELEASECRYPTO =		SUNW_SunOS_5.10
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gateETCCRYPTOFILES = \
307c478bd9Sstevel@tonic-gate	kcf.conf \
317c478bd9Sstevel@tonic-gate	pkcs11.conf \
32431deaa0Shylee	kmf.conf \
3344961713Sgirish	$(RELEASECRYPTO:%=certs/%) \
34316944b9Sjohnz	certs/CA \
35316944b9Sjohnz	certs/SUNWObjectCA
367c478bd9Sstevel@tonic-gate
377c478bd9Sstevel@tonic-gateETCCERTSFILES = \
387c478bd9Sstevel@tonic-gate	$(RELEASECERTS) \
39316944b9Sjohnz	SUNWSolarisCA \
40316944b9Sjohnz	SUNWObjectCA
417c478bd9Sstevel@tonic-gate
42af42e7a1SjohnzANNOTATEDFILES = \
43af42e7a1Sjohnz	certs/SUNWObjectCA.annot
44af42e7a1Sjohnz
457c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd
467c478bd9Sstevel@tonic-gate
477c478bd9Sstevel@tonic-gate.KEEP_STATE:
487c478bd9Sstevel@tonic-gate
497c478bd9Sstevel@tonic-gateROOTCRYPTODIR=		$(ROOT)/etc/crypto
507c478bd9Sstevel@tonic-gateROOTCRYPTOCERTSDIR=	$(ROOTCRYPTODIR)/certs
517c478bd9Sstevel@tonic-gate
527c478bd9Sstevel@tonic-gateROOTETCCERTSDIR=	$(ROOT)/etc/certs
537c478bd9Sstevel@tonic-gate
547c478bd9Sstevel@tonic-gateIETCCRYPTOFILES=	$(ETCCRYPTOFILES:%=$(ROOTCRYPTODIR)/%)
557c478bd9Sstevel@tonic-gateIETCCERTSFILES=		$(ETCCERTSFILES:%=$(ROOTETCCERTSDIR)/%)
567c478bd9Sstevel@tonic-gate
57316944b9Sjohnz$(ROOTCRYPTOCERTSDIR)/SUNWObjectCA: \
58316944b9Sjohnz			$(ROOTETCCERTSDIR)/SUNWObjectCA
59316944b9Sjohnz			$(RM) $@
60316944b9Sjohnz			$(LN) $(ROOTETCCERTSDIR)/SUNWObjectCA $@
617c478bd9Sstevel@tonic-gate$(ROOTCRYPTODIR)/%:	%
627c478bd9Sstevel@tonic-gate			$(INS.file)
6344961713Sgirish$(RELEASECRYPTO:%=$(ROOTCRYPTODIR)/certs/%): \
647c478bd9Sstevel@tonic-gate			certs/$(@F:SUNW_SunOS_5.%=SUNWCryptographic%)
657c478bd9Sstevel@tonic-gate			$(RM) $@
667c478bd9Sstevel@tonic-gate			$(INS) -s -m $(FILEMODE) -f $(@D) \
677c478bd9Sstevel@tonic-gate				certs/$(@F:SUNW_SunOS_5.%=SUNWCryptographic%)
687c478bd9Sstevel@tonic-gate			$(MV) $(@D)/$(@F:SUNW_SunOS_5.%=SUNWCryptographic%) $@
697c478bd9Sstevel@tonic-gate
70316944b9Sjohnz$(ROOTETCCERTSDIR)/SUNWObjectCA: \
71af42e7a1Sjohnz			certs/$$(@F)
72316944b9Sjohnz			$(RM) $@
73316944b9Sjohnz			$(INS) -s -m $(FILEMODE) -f $(@D) certs/$(@F)
747c478bd9Sstevel@tonic-gate$(ROOTETCCERTSDIR)/%:	certs/%
757c478bd9Sstevel@tonic-gate			$(INS.file)
767c478bd9Sstevel@tonic-gate$(RELEASECERTS:%=$(ROOTETCCERTSDIR)/%): \
777c478bd9Sstevel@tonic-gate			certs/$(@F:SUNW_SunOS_5.%=SUNWSolaris%)
787c478bd9Sstevel@tonic-gate			$(RM) $@
797c478bd9Sstevel@tonic-gate			$(INS) -s -m $(FILEMODE) -f $(@D) \
807c478bd9Sstevel@tonic-gate				certs/$(@F:SUNW_SunOS_5.%=SUNWSolaris%)
817c478bd9Sstevel@tonic-gate			$(MV) $(@D)/$(@F:SUNW_SunOS_5.%=SUNWSolaris%) $@
827c478bd9Sstevel@tonic-gate
83af42e7a1SjohnzANNOT_DEL =	SOURCE ANNOTATION DELETE
84af42e7a1Sjohnz$(ANNOTATEDFILES:%.annot=%): \
85af42e7a1Sjohnz			$$(@:%=%.annot)
86af42e7a1Sjohnz			$(RM) $@
87af42e7a1Sjohnz			$(SED) -e '/${ANNOT_DEL} START/,/${ANNOT_DEL} END/d' \
88af42e7a1Sjohnz				$(@:%=%.annot) > $@
89af42e7a1Sjohnz
907c478bd9Sstevel@tonic-gate$(IETCCRYPTOFILES):=	FILEMODE= 644
917c478bd9Sstevel@tonic-gate$(IETCCERTSFILES):=	FILEMODE= 644
927c478bd9Sstevel@tonic-gate
937c478bd9Sstevel@tonic-gateinstall:	$(IETCCRYPTOFILES) $(IETCCERTSFILES)
94af42e7a1Sjohnz
95af42e7a1Sjohnzclean clobber:
96af42e7a1Sjohnz		$(RM) $(ANNOTATEDFILES:%.annot=%)
97