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 (the "License"). 6# You may not use this file except in compliance with the License. 7# 8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9# or http://www.opensolaris.org/os/licensing. 10# See the License for the specific language governing permissions 11# and limitations under the License. 12# 13# When distributing Covered Code, include this CDDL HEADER in each 14# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15# If applicable, add the following below this CDDL HEADER, with the 16# fields enclosed by brackets "[]" replaced with your own identifying 17# information: Portions Copyright [yyyy] [name of copyright owner] 18# 19# CDDL HEADER END 20# 21# 22# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23# Use is subject to license terms. 24# 25# ident "%Z%%M% %I% %E% SMI" 26# 27# Architecture independent makefile for rpc.metamedd 28# 29# cmd/lvm/rpc.metamedd/Makefile.com 30 31PROG = rpc.metamedd 32 33RPC_DIR = $(SRC)/uts/common/sys/lvm 34 35RPC_OBJS = \ 36 meta_basic.x \ 37 metamed.x \ 38 meta_arr.x 39 40DERIVED_OBJS = \ 41 metamed_svc.o \ 42 metamed_xdr.o \ 43 meta_basic_xdr.o 44 45LOCAL_OBJS= \ 46 med_db.o \ 47 med_error.o \ 48 med_freeresult.o \ 49 med_hash.o \ 50 med_init.o \ 51 med_mem.o \ 52 med_synch.o \ 53 med_svc_subr.o 54 55LOCAL_SRCS = $(LOCAL_OBJS:%.o=../%.c) 56DERIVED_SRCS = $(DERIVED_OBJS:%.o=%.c) 57 58include ../../../Makefile.cmd 59include ../../Makefile.lvm 60 61LDLIBS += -lmeta -lsocket -lnsl 62LDFLAGS += $(ZINTERPOSE) 63 64CPPFLAGS += $(DEFINES) 65 66lint := LINTFLAGS += -m 67 68metamed_svc.c := RPCGENFLAGS += -K -1 69 70.KEEP_STATE: 71 72%.o: ../%.c 73 $(COMPILE.c) $< 74 $(POST_PROCESS_O) 75 76all: $(PROG) 77 78$(PROG): $(LOCAL_OBJS) $(DERIVED_OBJS) 79 $(LINK.c) -o $@ $(LOCAL_OBJS) $(DERIVED_OBJS) $(LDLIBS) 80 $(POST_PROCESS) 81 82install: all $(ROOTUSRSBINPROG) 83 84cstyle: 85 $(CSTYLE) $(LOCAL_SRCS) 86 87lint: 88 $(LINT.c) $(LINTFLAGS) $(LOCAL_SRCS) 89 90clean: 91 $(RM) $(DERIVED_SRCS) $(DERIVED_OBJS) $(LOCAL_OBJS) $(RPC_OBJS) 92 93clobber: clean 94 $(RM) $(PROG) 95 96$(RPC_OBJS): $$(@:%=$(RPC_DIR)/%) 97 $(RM) $@ 98 $(CP) $(RPC_DIR)/$@ . 99 100meta_basic_xdr.c: meta_basic.x 101 $(RPCGEN) $(RPCGENFLAGS) -c meta_basic.x > $@ 102 103metamed_xdr.c: metamed.x meta_arr.x 104 $(RPCGEN) $(RPCGENFLAGS) -c metamed.x > $@ 105 106metamed_svc.c: metamed.x meta_arr.x 107 $(RPCGEN) $(RPCGENFLAGS_SERVER) metamed.x > $@ 108