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