xref: /illumos-gate/usr/src/lib/libresolv2/Makefile (revision 410cfc1c29e3c504b79366ddfd3584e9e69a33d5)
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 (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
23#
24
25
26include		../../Makefile.master
27include		../Makefile.lib
28
29MANIFEST=	client.xml install.xml
30MANIFESTDIR=	$(ROOT)/lib/svc/manifest/network/dns
31ROOTMANIFEST=	$(MANIFEST:%=$(MANIFESTDIR)/%)
32
33$(ROOTMANIFEST) :=	FILEMODE = 444
34
35SVCMETHOD=	dns-install
36SVCMETHODDIR=	$(ROOT)/lib/svc/method
37ROOTSVCMETHOD=	$(SVCMETHOD:%=$(SVCMETHODDIR)/%)
38
39$(ROOTSVCMETHOD) :=	FILEMODE = 0555
40
41CHKMANIFEST=	$(MANIFEST:%.xml=%.xmlchk)
42
43SUBDIRS=	include $(MACH)
44$(BUILD64)SUBDIRS +=	$(MACH64)
45
46all :=		TARGET= all
47clean :=	TARGET= clean
48clobber :=	TARGET= clobber
49install :=	TARGET= install
50lint :=		TARGET= lint
51_msg :=		TARGET= _msg
52
53LIBRARY= 	libresolv.a
54TEXT_DOMAIN=	SUNW_OST_OSLIB
55XGETFLAGS=	-a
56POFILE=		$(LIBRARY:.a=.po)
57POFILES=	generic.po
58
59SED=	sed
60GREP=	grep
61
62.KEEP_STATE:
63
64all clean clobber lint: $(SUBDIRS)
65
66install: $(SUBDIRS) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
67
68$(ROOTMANIFEST): $(MANIFESTDIR)
69
70$(MANIFESTDIR):
71	$(INS.dir)
72
73$(MANIFESTDIR)/%: %
74	$(INS.file)
75$(ROOTSVCMETHOD): $(SVCMETHODDIR)
76
77$(SVCMETHODDIR):
78	$(INS.dir)
79
80$(SVCMETHODDIR)/%: %
81	$(INS.file)
82
83# install rule for install_h target
84$(ROOTHDRDIR)/%: %
85	$(INS.file)
86
87install_h: $(ROOTHDRS)
88
89check: $(CHECKHDRS) $(CHKMANIFEST)
90
91_msg:	$(MSGDOMAIN) $(POFILE)
92	$(RM) $(MSGDOMAIN)/$(POFILE)
93	$(CP) $(POFILE) $(MSGDOMAIN)
94
95$(POFILE):	$(POFILES)
96	$(RM) $@
97	$(CAT) $(POFILES) > $@
98
99$(POFILES):
100	$(RM) messages.po
101	$(XGETTEXT) $(XGETFLAGS) *.[ch]* */*.[ch]*
102	$(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
103	$(RM) messages.po
104
105$(SUBDIRS): FRC
106	@cd $@; pwd; $(MAKE) $(TARGET); echo
107
108FRC:
109
110