xref: /titanic_41/usr/src/uts/common/sys/lvm/Makefile (revision 0bc07884d74faf3093bc1ed2c66a29745a0d5604)
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#
27# uts/common/sys/lvm/Makefile
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)
51all_h install_h: $(DERIVED_FILES)
52
53clean:
54	$(RM) $(DERIVED_FILES)
55
56clobber: clean
57
58md_basic.h:	meta_basic.x
59	$(RPCGEN) $(RPCGENFLAGS) -h meta_basic.x  | \
60	awk '/<synch.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
61	/<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
62		{ print $0 } \
63	' > $@
64
65md_mhdx.h:	mhdx.x
66	$(RPCGEN) $(RPCGENFLAGS) -h mhdx.x | \
67	awk '/<synch.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
68	/<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
69		{ print $0 } \
70	' > $@
71
72mdmed.h:	metamed.x
73	$(RPCGEN) $(RPCGENFLAGS) -h metamed.x | \
74	awk '/<synch.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
75	/<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
76		{ print $0 } \
77	' > $@
78
79md_mdiox.h:	mdiox.x
80	$(RPCGEN) $(RPCGENFLAGS) -h mdiox.x | \
81	awk '/<synch.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
82	/<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
83		{ print $0 } \
84	' > $@
85
86mdmn_commd.h:	mdmn_commd.x
87	$(RPCGEN) -h mdmn_commd.x > $@
88