xref: /illumos-gate/usr/src/cmd/cmd-crypto/etc/Makefile (revision b4039a24)
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#
22*b4039a24SHai-May Chao# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
237c478bd9Sstevel@tonic-gate#
247c478bd9Sstevel@tonic-gate
257c478bd9Sstevel@tonic-gateRELEASECERTS =		SUNW_SunOS_5.10
265a44cca9SValerie Bubb FenwickRELEASECRYPTO =		SUNW_SunOS_5.10
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gateETCCRYPTOFILES = \
297c478bd9Sstevel@tonic-gate	kcf.conf \
307c478bd9Sstevel@tonic-gate	pkcs11.conf \
31431deaa0Shylee	kmf.conf \
3244961713Sgirish	$(RELEASECRYPTO:%=certs/%) \
33316944b9Sjohnz	certs/CA \
34316944b9Sjohnz	certs/SUNWObjectCA
357c478bd9Sstevel@tonic-gate
367c478bd9Sstevel@tonic-gateETCCERTSFILES = \
377c478bd9Sstevel@tonic-gate	$(RELEASECERTS) \
38316944b9Sjohnz	SUNWSolarisCA \
39316944b9Sjohnz	SUNWObjectCA
407c478bd9Sstevel@tonic-gate
41af42e7a1SjohnzANNOTATEDFILES = \
42af42e7a1Sjohnz	certs/SUNWObjectCA.annot
43af42e7a1Sjohnz
447c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd
457c478bd9Sstevel@tonic-gate.KEEP_STATE:
467c478bd9Sstevel@tonic-gate
47*b4039a24SHai-May ChaoROOTETC=		$(ROOT)/etc
48*b4039a24SHai-May ChaoROOTCRYPTODIR=		$(ROOTETC)/crypto
497c478bd9Sstevel@tonic-gateROOTCRYPTOCERTSDIR=	$(ROOTCRYPTODIR)/certs
507c478bd9Sstevel@tonic-gate
51*b4039a24SHai-May ChaoROOTETCCERTSDIR=	$(ROOTETC)/certs
52*b4039a24SHai-May Chao
53*b4039a24SHai-May ChaoCADIR=			certs/CA
54*b4039a24SHai-May ChaoROOTETCCADIR=		$(ROOTETC)/$(CADIR)
55*b4039a24SHai-May Chao
56*b4039a24SHai-May ChaoROOTETCCALINKDIR=	$(ROOTETC)/openssl/certs
57*b4039a24SHai-May ChaoCATARGDIR=		../../$(CADIR)
587c478bd9Sstevel@tonic-gate
597c478bd9Sstevel@tonic-gateIETCCRYPTOFILES=	$(ETCCRYPTOFILES:%=$(ROOTCRYPTODIR)/%)
607c478bd9Sstevel@tonic-gateIETCCERTSFILES=		$(ETCCERTSFILES:%=$(ROOTETCCERTSDIR)/%)
617c478bd9Sstevel@tonic-gate
62*b4039a24SHai-May Chaoinclude Makefile.ca-links
63*b4039a24SHai-May Chao
64316944b9Sjohnz$(ROOTCRYPTOCERTSDIR)/SUNWObjectCA: \
65316944b9Sjohnz			$(ROOTETCCERTSDIR)/SUNWObjectCA
66316944b9Sjohnz			$(RM) $@
67316944b9Sjohnz			$(LN) $(ROOTETCCERTSDIR)/SUNWObjectCA $@
687c478bd9Sstevel@tonic-gate$(ROOTCRYPTODIR)/%:	%
697c478bd9Sstevel@tonic-gate			$(INS.file)
7044961713Sgirish$(RELEASECRYPTO:%=$(ROOTCRYPTODIR)/certs/%): \
717c478bd9Sstevel@tonic-gate			certs/$(@F:SUNW_SunOS_5.%=SUNWCryptographic%)
727c478bd9Sstevel@tonic-gate			$(RM) $@
737c478bd9Sstevel@tonic-gate			$(INS) -s -m $(FILEMODE) -f $(@D) \
747c478bd9Sstevel@tonic-gate				certs/$(@F:SUNW_SunOS_5.%=SUNWCryptographic%)
757c478bd9Sstevel@tonic-gate			$(MV) $(@D)/$(@F:SUNW_SunOS_5.%=SUNWCryptographic%) $@
76fb9f9b97Skupfer
77316944b9Sjohnz$(ROOTETCCERTSDIR)/SUNWObjectCA: \
78af42e7a1Sjohnz			certs/$$(@F)
79316944b9Sjohnz			$(RM) $@
80316944b9Sjohnz			$(INS) -s -m $(FILEMODE) -f $(@D) certs/$(@F)
817c478bd9Sstevel@tonic-gate$(ROOTETCCERTSDIR)/%:	certs/%
827c478bd9Sstevel@tonic-gate			$(INS.file)
837c478bd9Sstevel@tonic-gate$(RELEASECERTS:%=$(ROOTETCCERTSDIR)/%): \
847c478bd9Sstevel@tonic-gate			certs/$(@F:SUNW_SunOS_5.%=SUNWSolaris%)
857c478bd9Sstevel@tonic-gate			$(RM) $@
867c478bd9Sstevel@tonic-gate			$(INS) -s -m $(FILEMODE) -f $(@D) \
877c478bd9Sstevel@tonic-gate				certs/$(@F:SUNW_SunOS_5.%=SUNWSolaris%)
887c478bd9Sstevel@tonic-gate			$(MV) $(@D)/$(@F:SUNW_SunOS_5.%=SUNWSolaris%) $@
897c478bd9Sstevel@tonic-gate
90af42e7a1SjohnzANNOT_DEL =	SOURCE ANNOTATION DELETE
91af42e7a1Sjohnz$(ANNOTATEDFILES:%.annot=%): \
92af42e7a1Sjohnz			$$(@:%=%.annot)
93af42e7a1Sjohnz			$(RM) $@
94af42e7a1Sjohnz			$(SED) -e '/${ANNOT_DEL} START/,/${ANNOT_DEL} END/d' \
95af42e7a1Sjohnz				$(@:%=%.annot) > $@
96af42e7a1Sjohnz
977c478bd9Sstevel@tonic-gate$(IETCCRYPTOFILES):=	FILEMODE= 644
987c478bd9Sstevel@tonic-gate$(IETCCERTSFILES):=	FILEMODE= 644
99*b4039a24SHai-May Chao$(IETCCAFILES):=	FILEMODE= 644
100*b4039a24SHai-May Chao
101*b4039a24SHai-May Chao.PARALLEL:	$(IETCCAFILES)
1027c478bd9Sstevel@tonic-gate
103*b4039a24SHai-May Chaoinstall:	$(IETCCAFILES) $(IETCCRYPTOFILES) $(IETCCERTSFILES)
104af42e7a1Sjohnz
105af42e7a1Sjohnzclean clobber:
106af42e7a1Sjohnz		$(RM) $(ANNOTATEDFILES:%.annot=%)
107