xref: /titanic_41/usr/src/lib/libresolv2/Makefile (revision 26fd77009b17f8c8fb32eb362584cfd635e87ad9)
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 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25#
26
27include		../../Makefile.master
28include		../Makefile.lib
29
30MANIFEST=	client.xml
31MANIFESTDIR=	$(ROOT)/var/svc/manifest/network/dns
32ROOTMANIFEST=	$(MANIFEST:%=$(MANIFESTDIR)/%)
33
34$(ROOTMANIFEST) :=	FILEMODE = 444
35
36CHKMANIFEST=	$(MANIFEST:%.xml=%.xmlchk)
37
38SUBDIRS=	include $(MACH)
39$(BUILD64)SUBDIRS +=	$(MACH64)
40SUBDIRS +=	.WAIT irs
41
42# EXPORT DELETE START
43# CRYPT DELETE START
44SUBDIRS +=	cylink dnssafe
45# CRYPT DELETE END
46# EXPORT DELETE END
47
48all :=		TARGET= all
49clean :=	TARGET= clean
50clobber :=	TARGET= clobber
51install :=	TARGET= install
52lint :=		TARGET= lint
53_msg :=		TARGET= _msg
54
55LIBRARY= 	libresolv.a
56TEXT_DOMAIN=	SUNW_OST_OSLIB
57XGETFLAGS=	-a
58POFILE=		$(LIBRARY:.a=.po)
59POFILES=	generic.po
60
61SED=	sed
62GREP=	grep
63
64.KEEP_STATE:
65
66all clean clobber lint: $(SUBDIRS)
67
68install: $(SUBDIRS) $(ROOTMANIFEST)
69
70$(ROOTMANIFEST): $(MANIFESTDIR)
71
72$(MANIFESTDIR):
73	$(INS.dir)
74
75$(MANIFESTDIR)/%: %
76	$(INS.file)
77
78# install rule for install_h target
79$(ROOTHDRDIR)/%: %
80	$(INS.file)
81
82install_h: $(ROOTHDRS)
83
84check: $(CHECKHDRS) $(CHKMANIFEST)
85
86# EXPORT DELETE START
87# CRYPT DELETE START
88# Special targets to clean up the source tree for export distribution
89# Warning: These target change the source tree
90EXPORT_SRC:
91	$(RM) Makefile+
92	$(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
93		< Makefile > Makefile+
94	$(MV) Makefile+ Makefile
95	$(CHMOD) 444 Makefile
96	/usr/bin/find cylink dnssafe common/cylink common/dnssafe \
97		-name SCCS -prune -o -type f -exec $(RM) {} \;
98
99CRYPT_SRC:
100	$(RM) Makefile+
101	$(SED) -e "/^# CRYPT DELETE START/,/^# CRYPT DELETE END/d" \
102		< Makefile > Makefile+
103	$(MV) Makefile+ Makefile
104	$(CHMOD) 444 Makefile
105	/usr/bin/find cylink dnssafe common/cylink common/dnssafe \
106		-name SCCS -prune -o -type f -exec $(RM) {} \;
107
108# CRYPT DELETE END
109# EXPORT DELETE END
110
111_msg:	$(MSGDOMAIN) $(POFILE)
112	$(RM) $(MSGDOMAIN)/$(POFILE)
113	$(CP) $(POFILE) $(MSGDOMAIN)
114
115$(POFILE):	$(POFILES)
116	$(RM) $@
117	$(CAT) $(POFILES) > $@
118
119$(POFILES):
120	$(RM) messages.po
121	$(XGETTEXT) $(XGETFLAGS) *.[ch]* */*.[ch]*
122	$(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
123	$(RM) messages.po
124
125$(SUBDIRS): FRC
126	@cd $@; pwd; $(MAKE) $(TARGET); echo
127
128FRC:
129