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