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
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.
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]
23 # Copyright 1996, 2001-2003 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
25 # Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
28 # Makefile for logical volume management
64 OBJECTS
+= $(DERIVED_FILES
:.c
=.o
)
66 SRCS
= $(OBJECTS
:%.o
=..
/%.c
)
67 LINTSRCS
= $(LINTOBJECTS
:%.o
=..
/%.c
)
69 include ..
/..
/..
/Makefile.cmd
70 include ..
/..
/Makefile.lvm
74 LDLIBS
+= -ladm
-lsocket
-lnsl
76 POFILES
= $(OBJECTS
:%.o
=%.po
)
79 $(RPCMOD
)_svc.c
:= RPCGENFLAGS
+= -A
-K
-1
81 DEFINES
+= -D_REENTRANT
87 lint
:= LINTFLAGS
+= -m
97 $(LINK.c
) -o
$@
$(OBJECTS
) $(LDLIBS
)
101 ROOTUSRSBINPROG
=$(PROG
:%=$(ROOTUSRSBIN
)/%)
102 install: all $(ROOTUSRSBINPROG
)
110 ${LINT.c
} $(LINTFLAGS
) ${LINTSRCS}
113 ${RM} ${OBJECTS} ${DERIVED_FILES} *.o
116 $(RM
) $(PROG
) $(CLOBBERFILES
)
118 metamhd_svc.c
: $(SRC
)/head
/metamhd.x
119 $(CP
) $(SRC
)/head
/metamhd.x .
120 $(RPCGEN
) $(RPCGENFLAGS_SERVER
) metamhd.x
-o
$@
123 metamhd_xdr.c
: $(SRC
)/head
/metamhd.x
124 $(RPCGEN
) $(RPCGENFLAGS
) -c
$(SRC
)/head
/metamhd.x
-o
$@
126 mhdx_xdr.c
: $(SRC
)/uts
/common
/sys
/lvm
/mhdx.x
127 $(RPCGEN
) $(RPCGENFLAGS
) -c
$(SRC
)/uts
/common
/sys
/lvm
/mhdx.x | \
128 $(AWK
) '{sub(/uts\/common\/sys\/lvm/, "head") ; print $$0}' >$@