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