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