0N/A#
3909N/A# CDDL HEADER START
0N/A#
0N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License, Version 1.0 only
0N/A# (the "License"). You may not use this file except in compliance
2362N/A# with the License.
0N/A#
2362N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0N/A# or http://www.opensolaris.org/os/licensing.
0N/A# See the License for the specific language governing permissions
0N/A# and limitations under the License.
0N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0N/A# If applicable, add the following below this CDDL HEADER, with the
0N/A# fields enclosed by brackets "[]" replaced with your own identifying
0N/A# information: Portions Copyright [yyyy] [name of copyright owner]
0N/A#
0N/A# CDDL HEADER END
2362N/A#
2362N/A#
2362N/A# Copyright 1996, 2001-2003 Sun Microsystems, Inc. All rights reserved.
0N/A# Use is subject to license terms.
0N/A# Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
0N/A#
0N/A#
0N/A# Makefile for logical volume management
0N/A#
0N/A
0N/APROG= rpc.metamhd
0N/A
0N/ARPCMOD = metamhd
0N/A
0N/ADERIVED_FILES = \
1365N/A $(RPCMOD)_svc.c \
1365N/A $(RPCMOD)_xdr.c \
1365N/A mhdx_xdr.c
1365N/A
1365N/AOBJECTS= \
1365N/A mhd_drive.o \
1365N/A mhd_error.o \
1365N/A mhd_failfast.o \
0N/A mhd_freeresult.o \
0N/A mhd_init.o \
0N/A mhd_mem.o \
0N/A mhd_metamhd.o \
0N/A mhd_set.o \
0N/A mhd_synch.o \
0N/A mhd_time.o
0N/A
803N/ALINTOBJECTS= \
0N/A mhd_drive.o \
0N/A mhd_error.o \
0N/A mhd_failfast.o \
0N/A mhd_freeresult.o \
0N/A mhd_init.o \
0N/A mhd_mem.o \
mhd_metamhd.o \
mhd_set.o \
mhd_synch.o \
mhd_time.o
OBJECTS += $(DERIVED_FILES:.c=.o)
SRCS = $(OBJECTS:%.o=../%.c)
LINTSRCS = $(LINTOBJECTS:%.o=../%.c)
include ../../../Makefile.cmd
include ../../Makefile.lvm
MDLIBS =
LDLIBS += -ladm -lsocket -lnsl
POFILES= $(OBJECTS:%.o=%.po)
$(RPCMOD)_svc.c := RPCGENFLAGS += -A -K -1
DEFINES += -D_REENTRANT
CFLAGS += $(DEFINES)
#
#
lint := LINTFLAGS += -m
.KEEP_STATE:
%.o: ../%.c
$(COMPILE.c) $<
all: $(PROG)
$(PROG): $(OBJECTS)
$(LINK.c) -o $@ $(OBJECTS) $(LDLIBS)
$(POST_PROCESS)
ROOTUSRSBINPROG=$(PROG:%=$(ROOTUSRSBIN)/%)
install: all $(ROOTUSRSBINPROG)
catalog:
cstyle:
${CSTYLE} ${SRCS}
lint:
${LINT.c} $(LINTFLAGS) ${LINTSRCS}
clean:
${RM} ${OBJECTS} ${DERIVED_FILES} *.o
clobber: clean
$(RM) $(PROG) $(CLOBBERFILES)
metamhd_svc.c: $(SRC)/head/metamhd.x
$(CP) $(SRC)/head/metamhd.x .
$(RPCGEN) $(RPCGENFLAGS_SERVER) metamhd.x -o $@
${RM} metamhd.x
metamhd_xdr.c: $(SRC)/head/metamhd.x
$(RPCGEN) $(RPCGENFLAGS) -c $(SRC)/head/metamhd.x -o $@
mhdx_xdr.c: $(SRC)/uts/common/sys/lvm/mhdx.x
$(RPCGEN) $(RPCGENFLAGS) -c $(SRC)/uts/common/sys/lvm/mhdx.x | \
$(AWK) '{sub(/uts\/common\/sys\/lvm/, "head") ; print $$0}' >$@