xref: /titanic_41/usr/src/lib/librpcsvc/Makefile (revision 1e49577a7fcde812700ded04431b49d67cc57d6d)
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
29
30PROTOCOL_DIR= $(ROOT)/usr/include/rpcsvc
31
32SUBDIRS=	$(MACH)
33$(BUILD64)SUBDIRS += $(MACH64)
34
35DERIVED_FILES=  \
36	common/bootparam_prot_xdr.c	\
37	common/rstat_xdr.c	\
38	common/rusers_xdr.c	\
39	common/spray_xdr.c	\
40	common/nlm_prot.c	\
41	common/sm_inter_xdr.c	\
42	common/mount_xdr.c	\
43	common/nsm_addr_xdr.c	\
44	common/rpc_sztypes.c
45
46CLEANFILES += $(DERIVED_FILES)
47
48# include library definitions
49include ../Makefile.lib
50
51# definitions for install_h target
52HDRS= 		$(TXTS)
53ROOTHDRDIR=	$(ROOT)/usr/include/rpcsvc
54ROOTHDRS=	$(HDRS:%=$(ROOTHDRDIR)/%)
55CHECKHDRS=	$(HDRS:%.h=%.check)
56
57# install rule for install_h target
58$(ROOTHDRDIR)/%: %
59	$(INS.file)
60
61all :=		TARGET= all
62clean :=	TARGET= clean
63clobber :=	TARGET= clobber
64install :=	TARGET= install
65lint :=		TARGET= lint
66
67.KEEP_STATE:
68
69all:	$(DERIVED_FILES) $(TXTS) .WAIT $(SUBDIRS)
70
71install: all .WAIT $(SUBDIRS)
72
73install_h: $(DERIVED_FILES) $(ROOTHDRS)
74
75check: $(CHECKHDRS)
76
77clean clobber lint: $(SUBDIRS)
78
79#
80# Rules for building the derived files
81#
82# Derived files
83#
84common/bootparam_prot_xdr.c: $(PROTOCOL_DIR)/bootparam_prot.x
85	$(RPCGEN) -c $(PROTOCOL_DIR)/bootparam_prot.x > $@
86
87common/rstat_xdr.c: $(PROTOCOL_DIR)/rstat.x
88	$(RPCGEN) -c $(PROTOCOL_DIR)/rstat.x > $@
89
90common/rusers_xdr.c: $(PROTOCOL_DIR)/rusers.x
91	$(RPCGEN) -c $(PROTOCOL_DIR)/rusers.x > $@
92
93common/sm_inter_xdr.c: $(PROTOCOL_DIR)/sm_inter.x
94	$(RPCGEN) -c $(PROTOCOL_DIR)/sm_inter.x > $@
95
96common/spray_xdr.c: $(PROTOCOL_DIR)/spray.x
97	$(RPCGEN) -c $(PROTOCOL_DIR)/spray.x > $@
98
99common/nlm_prot.c: $(PROTOCOL_DIR)/nlm_prot.x
100	$(RPCGEN) -c $(PROTOCOL_DIR)/nlm_prot.x > $@
101
102common/mount_xdr.c: $(PROTOCOL_DIR)/mount.x
103	$(RPCGEN) -c $(PROTOCOL_DIR)/mount.x > $@
104
105common/nsm_addr_xdr.c: $(PROTOCOL_DIR)/nsm_addr.x
106	$(RPCGEN) -c $(PROTOCOL_DIR)/nsm_addr.x > $@
107
108common/rpc_sztypes.c: $(PROTOCOL_DIR)/rpc_sztypes.x
109	$(RPCGEN) -c $(PROTOCOL_DIR)/rpc_sztypes.x > $@
110
111# include library targets
112include ../Makefile.targ
113
114$(SUBDIRS): FRC
115	@cd $@; pwd; $(MAKE) $(TARGET)
116
117FRC:
118