xref: /onnv-gate/usr/src/lib/libsasl/Makefile (revision 4162:4bfd590bb99a)
10Sstevel@tonic-gate#
22522Sraf# CDDL HEADER START
32522Sraf#
42522Sraf# The contents of this file are subject to the terms of the
52522Sraf# Common Development and Distribution License (the "License").
62522Sraf# You may not use this file except in compliance with the License.
72522Sraf#
82522Sraf# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
92522Sraf# or http://www.opensolaris.org/os/licensing.
102522Sraf# See the License for the specific language governing permissions
112522Sraf# and limitations under the License.
122522Sraf#
132522Sraf# When distributing Covered Code, include this CDDL HEADER in each
142522Sraf# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
152522Sraf# If applicable, add the following below this CDDL HEADER, with the
162522Sraf# fields enclosed by brackets "[]" replaced with your own identifying
172522Sraf# information: Portions Copyright [yyyy] [name of copyright owner]
182522Sraf#
192522Sraf# CDDL HEADER END
202522Sraf#
21*4162Skupfer
222522Sraf#
23*4162Skupfer# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
240Sstevel@tonic-gate# Use is subject to license terms.
250Sstevel@tonic-gate#
260Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
270Sstevel@tonic-gate#
280Sstevel@tonic-gate
290Sstevel@tonic-gateinclude	../Makefile.lib
300Sstevel@tonic-gate
310Sstevel@tonic-gateHDRS=		sasl.h		saslplug.h	saslutil.h	prop.h
320Sstevel@tonic-gateHDRDIR=		include
330Sstevel@tonic-gateROOTHDRDIR=	$(ROOT)/usr/include/sasl
340Sstevel@tonic-gate
350Sstevel@tonic-gateSUBDIRS =	$(MACH)
360Sstevel@tonic-gate$(BUILD64)SUBDIRS += $(MACH64)
370Sstevel@tonic-gate
380Sstevel@tonic-gateall :=		TARGET= all
390Sstevel@tonic-gateclean :=	TARGET= clean
400Sstevel@tonic-gateclobber :=	TARGET= clobber
410Sstevel@tonic-gateinstall :=	TARGET= install
420Sstevel@tonic-gatelint :=		TARGET= lint
430Sstevel@tonic-gate
440Sstevel@tonic-gateLIBRARY=        libsasl.a
450Sstevel@tonic-gatePOFILE=         $(LIBRARY:.a=.po)
460Sstevel@tonic-gateMSGFILES=	lib/canonusr.c lib/checkpw.c lib/client.c lib/common.c \
470Sstevel@tonic-gate			lib/external.c lib/server.c lib/seterror.c \
480Sstevel@tonic-gate			plugin/plugin_common.c \
490Sstevel@tonic-gate			$(SRC)/lib/sasl_plugins/cram/cram.c \
500Sstevel@tonic-gate			$(SRC)/lib/sasl_plugins/digestmd5/digestmd5.c \
510Sstevel@tonic-gate			$(SRC)/lib/sasl_plugins/gssapi/gssapi.c \
520Sstevel@tonic-gate			$(SRC)/lib/sasl_plugins/plain/plain.c
530Sstevel@tonic-gate
540Sstevel@tonic-gate.KEEP_STATE:
550Sstevel@tonic-gate
562522Srafall clean clobber install lint: $(SUBDIRS)
570Sstevel@tonic-gate
58*4162Skupferall install: THIRDPARTYLICENSE
59*4162Skupfer
600Sstevel@tonic-gateinstall_h:	$(ROOTHDRS)
610Sstevel@tonic-gate
620Sstevel@tonic-gatecheck:	$(CHECKHDRS)
630Sstevel@tonic-gate
640Sstevel@tonic-gate$(POFILE): $(MSGFILES)
650Sstevel@tonic-gate	$(BUILDPO.msgfiles)
660Sstevel@tonic-gate
670Sstevel@tonic-gate_msg: $(MSGDOMAINPOFILE)
680Sstevel@tonic-gate
690Sstevel@tonic-gateinclude $(SRC)/Makefile.msg.targ
700Sstevel@tonic-gate
712522Sraf$(SUBDIRS): FRC
720Sstevel@tonic-gate	@cd $@; pwd; $(MAKE) $(TARGET)
730Sstevel@tonic-gate
740Sstevel@tonic-gateFRC:
750Sstevel@tonic-gate
76*4162SkupferTHIRDPARTYLICENSE: LICENSE.txt
77*4162Skupfer	$(SED) -n '/Carnegie Mellon/,$$p' LICENSE.txt > $@
78*4162Skupfer
79*4162SkupferCLOBBERFILES += THIRDPARTYLICENSE
80*4162Skupfer
810Sstevel@tonic-gate# EXPORT DELETE START
820Sstevel@tonic-gate# CRYPT DELETE START
830Sstevel@tonic-gate# Special target to clean up the source tree for export distribution
840Sstevel@tonic-gate# Warning: This target changes the source tree
850Sstevel@tonic-gateEXPORT_SRC:
860Sstevel@tonic-gate	$(RM) Makefile+ \
870Sstevel@tonic-gate		lib/client.c+ \
880Sstevel@tonic-gate		lib/server.c+ \
890Sstevel@tonic-gate		lib/common.c+ \
900Sstevel@tonic-gate		lib/saslint.h+ \
910Sstevel@tonic-gate		include/plugin_common.h+
920Sstevel@tonic-gate
930Sstevel@tonic-gate	$(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
940Sstevel@tonic-gate		< lib/client.c > lib/client.c+
950Sstevel@tonic-gate	$(MV) lib/client.c+ lib/client.c
960Sstevel@tonic-gate
970Sstevel@tonic-gate	$(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
980Sstevel@tonic-gate		< lib/server.c > lib/server.c+
990Sstevel@tonic-gate	$(MV) lib/server.c+ lib/server.c
1000Sstevel@tonic-gate
1010Sstevel@tonic-gate	$(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
1020Sstevel@tonic-gate		< lib/common.c > lib/common.c+
1030Sstevel@tonic-gate	$(MV) lib/common.c+ lib/common.c
1040Sstevel@tonic-gate
1050Sstevel@tonic-gate	$(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
1060Sstevel@tonic-gate		< lib/saslint.h > lib/saslint.h+
1070Sstevel@tonic-gate	$(MV) lib/saslint.h+ lib/saslint.h
1080Sstevel@tonic-gate
1090Sstevel@tonic-gate	$(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
1100Sstevel@tonic-gate		< include/plugin_common.h > include/plugin_common.h+
1110Sstevel@tonic-gate	$(MV) include/plugin_common.h+ include/plugin_common.h
1120Sstevel@tonic-gate
1130Sstevel@tonic-gate	$(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
1140Sstevel@tonic-gate		< Makefile > Makefile+
1150Sstevel@tonic-gate	$(MV) Makefile+ Makefile
1160Sstevel@tonic-gate
1170Sstevel@tonic-gate	$(CHMOD) 444 Makefile \
1180Sstevel@tonic-gate		lib/client.c \
1190Sstevel@tonic-gate		lib/server.c \
1200Sstevel@tonic-gate		lib/common.c \
1210Sstevel@tonic-gate		lib/saslint.h \
1220Sstevel@tonic-gate		include/plugin_common.h
1230Sstevel@tonic-gate
1240Sstevel@tonic-gateCRYPT_SRC:
1250Sstevel@tonic-gate	$(RM) Makefile+ lib/common.c+
1260Sstevel@tonic-gate
1270Sstevel@tonic-gate	$(SED) -e "/CRYPT DELETE START/,/CRYPT DELETE END/d" \
1280Sstevel@tonic-gate		< lib/common.c | $(SED) -e "/EXPORT DELETE/d" \
1290Sstevel@tonic-gate		> lib/common.c+
1300Sstevel@tonic-gate	$(MV) lib/common.c+ lib/common.c
1310Sstevel@tonic-gate
1320Sstevel@tonic-gate	$(SED) -e "/CRYPT DELETE START/,/CRYPT DELETE END/d" \
1330Sstevel@tonic-gate		< lib/client.c | $(SED) -e "/EXPORT DELETE/d" \
1340Sstevel@tonic-gate		> lib/client.c+
1350Sstevel@tonic-gate	$(MV) lib/client.c+ lib/client.c
1360Sstevel@tonic-gate
1370Sstevel@tonic-gate	$(SED) -e "/CRYPT DELETE START/,/CRYPT DELETE END/d" \
1380Sstevel@tonic-gate		< lib/server.c | $(SED) -e "/EXPORT DELETE/d" \
1390Sstevel@tonic-gate		> lib/server.c+
1400Sstevel@tonic-gate	$(MV) lib/server.c+ lib/server.c
1410Sstevel@tonic-gate
1420Sstevel@tonic-gate	$(SED) -e "/CRYPT DELETE START/,/CRYPT DELETE END/d" \
1430Sstevel@tonic-gate		< lib/saslint.h | $(SED) -e "/EXPORT DELETE/d" \
1440Sstevel@tonic-gate		> lib/saslint.h+
1450Sstevel@tonic-gate	$(MV) lib/saslint.h+ lib/saslint.h
1460Sstevel@tonic-gate
1470Sstevel@tonic-gate	$(SED) -e "/CRYPT DELETE START/,/CRYPT DELETE END/d" \
1480Sstevel@tonic-gate		< include/plugin_common.h | $(SED) -e "/EXPORT DELETE/d" \
1490Sstevel@tonic-gate		> include/plugin_common.h+
1500Sstevel@tonic-gate	$(MV) include/plugin_common.h+ include/plugin_common.h
1510Sstevel@tonic-gate
1520Sstevel@tonic-gate	$(SED) -e "/^# CRYPT DELETE START/,/^# CRYPT DELETE END/d" \
1530Sstevel@tonic-gate		< Makefile | $(SED) -e "/^# EXPORT DELETE/d" > Makefile+
1540Sstevel@tonic-gate	$(MV) Makefile+ Makefile
1550Sstevel@tonic-gate
1560Sstevel@tonic-gate	$(CHMOD) 444 Makefile \
1570Sstevel@tonic-gate		lib/client.c \
1580Sstevel@tonic-gate		lib/server.c \
1590Sstevel@tonic-gate		lib/common.c \
1600Sstevel@tonic-gate		lib/saslint.h \
1610Sstevel@tonic-gate		include/plugin_common.h
1620Sstevel@tonic-gate
1630Sstevel@tonic-gate# CRYPT DELETE END
1640Sstevel@tonic-gate# EXPORT DELETE END
1650Sstevel@tonic-gate
1660Sstevel@tonic-gateinclude ../Makefile.targ
1670Sstevel@tonic-gate
1680Sstevel@tonic-gate.PARALLEL: $(SUBDIRS)
169