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