xref: /titanic_52/usr/src/lib/libsasl/Makefile (revision 18c2aff776a775d34a4c9893a4c72e0434d68e36)
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 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28include	../Makefile.lib
29
30HDRS=		sasl.h		saslplug.h	saslutil.h	prop.h
31HDRDIR=		include
32ROOTHDRDIR=	$(ROOT)/usr/include/sasl
33
34SUBDIRS =	$(MACH)
35$(BUILD64)SUBDIRS += $(MACH64)
36
37all :=		TARGET= all
38clean :=	TARGET= clean
39clobber :=	TARGET= clobber
40install :=	TARGET= install
41lint :=		TARGET= lint
42
43LIBRARY=        libsasl.a
44POFILE=         $(LIBRARY:.a=.po)
45MSGFILES=	lib/canonusr.c lib/checkpw.c lib/client.c lib/common.c \
46			lib/external.c lib/server.c lib/seterror.c \
47			plugin/plugin_common.c \
48			$(SRC)/lib/sasl_plugins/cram/cram.c \
49			$(SRC)/lib/sasl_plugins/digestmd5/digestmd5.c \
50			$(SRC)/lib/sasl_plugins/gssapi/gssapi.c \
51			$(SRC)/lib/sasl_plugins/plain/plain.c
52
53.KEEP_STATE:
54
55all clean clobber install lint: $(SUBDIRS)
56
57install_h:	$(ROOTHDRS)
58
59check:	$(CHECKHDRS)
60
61$(POFILE): $(MSGFILES)
62	$(BUILDPO.msgfiles)
63
64_msg: $(MSGDOMAINPOFILE)
65
66include $(SRC)/Makefile.msg.targ
67
68$(SUBDIRS): FRC
69	@cd $@; pwd; $(MAKE) $(TARGET)
70
71FRC:
72
73# EXPORT DELETE START
74# CRYPT DELETE START
75# Special target to clean up the source tree for export distribution
76# Warning: This target changes the source tree
77EXPORT_SRC:
78	$(RM) Makefile+ \
79		lib/client.c+ \
80		lib/server.c+ \
81		lib/common.c+ \
82		lib/saslint.h+ \
83		include/plugin_common.h+
84
85	$(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
86		< lib/client.c > lib/client.c+
87	$(MV) lib/client.c+ lib/client.c
88
89	$(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
90		< lib/server.c > lib/server.c+
91	$(MV) lib/server.c+ lib/server.c
92
93	$(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
94		< lib/common.c > lib/common.c+
95	$(MV) lib/common.c+ lib/common.c
96
97	$(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
98		< lib/saslint.h > lib/saslint.h+
99	$(MV) lib/saslint.h+ lib/saslint.h
100
101	$(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
102		< include/plugin_common.h > include/plugin_common.h+
103	$(MV) include/plugin_common.h+ include/plugin_common.h
104
105	$(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
106		< Makefile > Makefile+
107	$(MV) Makefile+ Makefile
108
109	$(CHMOD) 444 Makefile \
110		lib/client.c \
111		lib/server.c \
112		lib/common.c \
113		lib/saslint.h \
114		include/plugin_common.h
115
116CRYPT_SRC:
117	$(RM) Makefile+ lib/common.c+
118
119	$(SED) -e "/CRYPT DELETE START/,/CRYPT DELETE END/d" \
120		< lib/common.c | $(SED) -e "/EXPORT DELETE/d" \
121		> lib/common.c+
122	$(MV) lib/common.c+ lib/common.c
123
124	$(SED) -e "/CRYPT DELETE START/,/CRYPT DELETE END/d" \
125		< lib/client.c | $(SED) -e "/EXPORT DELETE/d" \
126		> lib/client.c+
127	$(MV) lib/client.c+ lib/client.c
128
129	$(SED) -e "/CRYPT DELETE START/,/CRYPT DELETE END/d" \
130		< lib/server.c | $(SED) -e "/EXPORT DELETE/d" \
131		> lib/server.c+
132	$(MV) lib/server.c+ lib/server.c
133
134	$(SED) -e "/CRYPT DELETE START/,/CRYPT DELETE END/d" \
135		< lib/saslint.h | $(SED) -e "/EXPORT DELETE/d" \
136		> lib/saslint.h+
137	$(MV) lib/saslint.h+ lib/saslint.h
138
139	$(SED) -e "/CRYPT DELETE START/,/CRYPT DELETE END/d" \
140		< include/plugin_common.h | $(SED) -e "/EXPORT DELETE/d" \
141		> include/plugin_common.h+
142	$(MV) include/plugin_common.h+ include/plugin_common.h
143
144	$(SED) -e "/^# CRYPT DELETE START/,/^# CRYPT DELETE END/d" \
145		< Makefile | $(SED) -e "/^# EXPORT DELETE/d" > Makefile+
146	$(MV) Makefile+ Makefile
147
148	$(CHMOD) 444 Makefile \
149		lib/client.c \
150		lib/server.c \
151		lib/common.c \
152		lib/saslint.h \
153		include/plugin_common.h
154
155# CRYPT DELETE END
156# EXPORT DELETE END
157
158include ../Makefile.targ
159
160.PARALLEL: $(SUBDIRS)
161