xref: /titanic_41/usr/src/uts/common/sys/lvm/Makefile (revision a31148363f598def767ac48c5d82e1572e44b935)
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# uts/common/sys/lvm/Makefile
24# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27#pragma ident	"%Z%%M%	%I%	%E% SMI"
28#
29#       This makefile derive some .h files via rpcgen
30#
31#       architecture independent
32#
33
34UTSBASE = ../../..
35
36include $(UTSBASE)/../Makefile.master
37
38.KEEP_STATE:
39
40DERIVED_FILES = \
41	md_basic.h \
42	mdmed.h \
43	md_mdiox.h \
44	md_mhdx.h \
45	mdmn_commd.h
46
47RPCGENFLAGS	+=	-C -M -D_KERNEL -DSYSV
48
49
50def all install lint modlintlib clean.lint:	$(DERIVED_FILES)
51
52clean clobber:
53	$(RM) $(DERIVED_FILES)
54
55md_basic.h:	meta_basic.x
56	$(RPCGEN) $(RPCGENFLAGS) -h meta_basic.x  | \
57	awk '/<synch.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
58	/<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
59		{ print $0 } \
60	' > $@
61
62md_mhdx.h:	mhdx.x
63	$(RPCGEN) $(RPCGENFLAGS) -h mhdx.x | \
64	awk '/<synch.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
65	/<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
66		{ print $0 } \
67	' > $@
68
69mdmed.h:	metamed.x
70	$(RPCGEN) $(RPCGENFLAGS) -h metamed.x | \
71	awk '/<synch.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
72	/<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
73		{ print $0 } \
74	' > $@
75
76md_mdiox.h:	mdiox.x
77	$(RPCGEN) $(RPCGENFLAGS) -h mdiox.x | \
78	awk '/<synch.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
79	/<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
80		{ print $0 } \
81	' > $@
82
83mdmn_commd.h:	mdmn_commd.x
84	$(RPCGEN) -h mdmn_commd.x > $@
85