Makefile revision b6805bf78d2bbbeeaea8909a05623587b42d58b3
70N/A#
70N/A# CDDL HEADER START
70N/A#
70N/A# The contents of this file are subject to the terms of the
371N/A# Common Development and Distribution License, Version 1.0 only
70N/A# (the "License"). You may not use this file except in compliance
70N/A# with the License.
70N/A#
70N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
70N/A# or http://www.opensolaris.org/os/licensing.
70N/A# See the License for the specific language governing permissions
70N/A# and limitations under the License.
70N/A#
70N/A# When distributing Covered Code, include this CDDL HEADER in each
70N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
70N/A# If applicable, add the following below this CDDL HEADER, with the
70N/A# fields enclosed by brackets "[]" replaced with your own identifying
70N/A# information: Portions Copyright [yyyy] [name of copyright owner]
70N/A#
70N/A# CDDL HEADER END
70N/A#
70N/A#
70N/A# Copyright 1996, 2001-2003 Sun Microsystems, Inc. All rights reserved.
70N/A# Use is subject to license terms.
70N/A#
70N/A#
70N/A# Makefile for logical volume management
70N/A#
70N/A
70N/APROG= rpc.metamhd
70N/A
70N/ARPCMOD = metamhd
371N/A
70N/ADERIVED_FILES = \
70N/A $(RPCMOD)_svc.c \
70N/A $(RPCMOD)_xdr.c \
70N/A mhdx_xdr.c
70N/A
70N/AOBJECTS= \
371N/A mhd_drive.o \
70N/A mhd_error.o \
70N/A mhd_failfast.o \
70N/A mhd_freeresult.o \
70N/A mhd_init.o \
70N/A mhd_mem.o \
70N/A mhd_metamhd.o \
70N/A mhd_set.o \
70N/A mhd_synch.o \
70N/A mhd_time.o
70N/A
70N/ALINTOBJECTS= \
70N/A mhd_drive.o \
70N/A mhd_error.o \
70N/A mhd_failfast.o \
70N/A mhd_freeresult.o \
70N/A mhd_init.o \
70N/A mhd_mem.o \
70N/A mhd_metamhd.o \
70N/A mhd_set.o \
70N/A 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 | \
nawk '{sub(/uts\/common\/sys\/lvm/, "head") ; print $$0}' >$@