xref: /illumos-gate/usr/src/lib/sasl_plugins/Makefile (revision bdfc6d18da790deeec2e0eb09c625902defe2498)
1#
2# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3# Use is subject to license terms.
4#
5# ident	"%Z%%M%	%I%	%E% SMI"
6#
7
8# Note, to build SASL msg file go to $SRC/lib/libsasl and make _msg
9# target there.  Messages in sasl_plugins will be picked up from there.
10
11include	../Makefile.lib
12
13SUBDIRS =	cram digestmd5 gssapi plain
14
15all :=		TARGET= all
16clean :=	TARGET= clean
17clobber :=	TARGET= clobber
18install :=	TARGET= install
19lint :=		TARGET= lint
20
21.KEEP_STATE:
22
23all clean clobber install: $(SUBDIRS)
24
25lint: $(SUBDIRS)
26
27install_h check:
28
29$(SUBDIRS) spec: FRC
30	@cd $@; pwd; $(MAKE) $(TARGET)
31
32FRC:
33
34# EXPORT DELETE START
35# CRYPT DELETE START
36# Special target to clean up the source tree for export distribution
37# Warning: This target changes the source tree
38EXPORT_SRC:
39	$(RM) 	Makefile+ \
40		digestmd5/digestmd5.c+ \
41		gssapi/gssapi.c+
42
43	$(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
44		< Makefile > Makefile+
45	$(MV) Makefile+ Makefile
46
47	$(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
48		< digestmd5/digestmd5.c > digestmd5/digestmd5.c+
49	$(MV) digestmd5/digestmd5.c+ digestmd5/digestmd5.c
50
51	$(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
52		< gssapi/gssapi.c > gssapi/gssapi.c+
53	$(MV) gssapi/gssapi.c+ gssapi/gssapi.c
54
55	$(CHMOD) 444 \
56		Makefile \
57		digestmd5/digestmd5.c \
58		gssapi/gssapi.c
59
60CRYPT_SRC:
61	$(RM) Makefile+
62
63	$(SED) -e "/CRYPT DELETE START/,/CRYPT DELETE END/d" \
64		< digestmd5/digestmd5.c | $(SED) -e "/EXPORT DELETE/d" \
65		> digestmd5/digestmd5.c+
66	$(MV) digestmd5/digestmd5.c+ digestmd5/digestmd5.c
67
68	$(SED) -e "/CRYPT DELETE START/,/CRYPT DELETE END/d" \
69		< gssapi/gssapi.c | $(SED) -e "/EXPORT DELETE/d" \
70		> gssapi/gssapi.c+
71	$(MV) gssapi/gssapi.c+ gssapi/gssapi.c
72
73	$(SED) -e "/^# CRYPT DELETE START/,/^# CRYPT DELETE END/d" \
74		< Makefile | $(SED) -e "/^# EXPORT DELETE/d" > Makefile+
75	$(MV) Makefile+ Makefile
76	$(CHMOD) 444 Makefile digestmd5/digestmd5.c gssapi/gssapi.c
77
78# CRYPT DELETE END
79# EXPORT DELETE END
80
81include ../Makefile.targ
82
83.PARALLEL: $(SUBDIRS)
84