xref: /titanic_50/usr/src/lib/gss_mechs/mech_krb5/Makefile (revision d321a33cdd896e6b211d113a33698dd76e89b861)
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
34include ../../../Makefile.master
35
36SUBDIRS =	$(MACH)
37$(BUILD64)SUBDIRS += $(MACH64)
38
39# include library definitions
40include ../../Makefile.lib
41
42GREP= find . \( -name SCCS -prune -o -name '*.[ch]' \) -print | sort | xargs grep
43
44sparcv9_C_PICFLAGS =  -K PIC
45TEXT_DOMAIN = SUNW_OST_NETRPC
46POFILE = mech_krb5.po
47POFILES = generic.po
48
49HDRS=
50
51CHECKHDRS= $(HDRS:%.h=%.check)
52
53$(ROOTDIRS)/%:  %
54	$(INS.file)
55
56all :=          TARGET= all
57clean :=        TARGET= clean
58clobber :=      TARGET= clobber
59install :=      TARGET= install
60lint :=         TARGET= lint
61
62.KEEP_STATE:
63
64all clean lint:    $(SUBDIRS)
65
66install: install_dir all .WAIT $(SUBDIRS)
67
68# override ROOTLIBDIR and ROOTLINKS
69ROOTLIBDIR=     $(ROOT)/usr/lib/gss
70
71install_dir:	$(ROOTLIBDIR) $(BUILD64)
72
73install_h:
74
75clobber: $(SUBDIRS)
76	$(RM) $(POFILE) $(POFILES)
77
78check: $(CHECKHDRS)
79
80do_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
93FRC:
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
98EXPORT_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
133CRYPT_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
153FRC:
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
163generic.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)
171