xref: /titanic_41/usr/src/lib/librpcsvc/Makefile (revision 70025d765b044c6d8594bb965a2247a61e991a99)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# lib/librpcsvc/Makefile
29#
30
31include  ../../Makefile.master
32
33PROTOCOL_DIR= $(ROOT)/usr/include/rpcsvc
34
35SUBDIRS=	$(MACH)
36$(BUILD64)SUBDIRS += $(MACH64)
37
38DERIVED_FILES=  \
39	common/bootparam_prot_xdr.c	\
40	common/rstat_xdr.c	\
41	common/rusers_xdr.c	\
42	common/spray_xdr.c	\
43	common/nlm_prot.c	\
44	common/sm_inter_xdr.c	\
45	common/mount_xdr.c	\
46	common/nsm_addr_xdr.c	\
47	common/rpc_sztypes.c
48
49CLEANFILES += $(DERIVED_FILES)
50
51# include library definitions
52include ../Makefile.lib
53
54# definitions for install_h target
55HDRS= 		$(TXTS)
56ROOTHDRDIR=	$(ROOT)/usr/include/rpcsvc
57ROOTHDRS=	$(HDRS:%=$(ROOTHDRDIR)/%)
58CHECKHDRS=	$(HDRS:%.h=%.check)
59
60# install rule for install_h target
61$(ROOTHDRDIR)/%: %
62	$(INS.file)
63
64all :=		TARGET= all
65clean :=	TARGET= clean
66clobber :=	TARGET= clobber
67install :=	TARGET= install
68lint :=		TARGET= lint
69
70.KEEP_STATE:
71
72all:	$(DERIVED_FILES) $(TXTS) .WAIT spec .WAIT $(SUBDIRS)
73
74install: all .WAIT spec .WAIT $(SUBDIRS)
75
76install_h: $(DERIVED_FILES) $(ROOTHDRS)
77
78lint: $(SUBDIRS)
79
80check: $(CHECKHDRS)
81
82clean clobber : spec .WAIT $(SUBDIRS)
83
84MAPFILE=	mapfile-vers
85
86#
87# Rules for building the derived files
88#
89# Derived files
90#
91common/bootparam_prot_xdr.c: $(PROTOCOL_DIR)/bootparam_prot.x
92	$(RPCGEN) -c $(PROTOCOL_DIR)/bootparam_prot.x > $@
93
94common/rstat_xdr.c: $(PROTOCOL_DIR)/rstat.x
95	$(RPCGEN) -c $(PROTOCOL_DIR)/rstat.x > $@
96
97common/rusers_xdr.c: $(PROTOCOL_DIR)/rusers.x
98	$(RPCGEN) -c $(PROTOCOL_DIR)/rusers.x > $@
99
100common/sm_inter_xdr.c: $(PROTOCOL_DIR)/sm_inter.x
101	$(RPCGEN) -c $(PROTOCOL_DIR)/sm_inter.x > $@
102
103common/spray_xdr.c: $(PROTOCOL_DIR)/spray.x
104	$(RPCGEN) -c $(PROTOCOL_DIR)/spray.x > $@
105
106common/nlm_prot.c: $(PROTOCOL_DIR)/nlm_prot.x
107	$(RPCGEN) -c $(PROTOCOL_DIR)/nlm_prot.x > $@
108
109common/mount_xdr.c: $(PROTOCOL_DIR)/mount.x
110	$(RPCGEN) -c $(PROTOCOL_DIR)/mount.x > $@
111
112common/nsm_addr_xdr.c: $(PROTOCOL_DIR)/nsm_addr.x
113	$(RPCGEN) -c $(PROTOCOL_DIR)/nsm_addr.x > $@
114
115common/rpc_sztypes.c: $(PROTOCOL_DIR)/rpc_sztypes.x
116	$(RPCGEN) -c $(PROTOCOL_DIR)/rpc_sztypes.x > $@
117
118# include library targets
119include ../Makefile.targ
120
121spec $(SUBDIRS): FRC
122	@cd $@; pwd; $(MAKE) $(TARGET)
123
124FRC:
125