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 2003 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26# 27# Makefile for logical volume management 28# 29 30PROG= rpc.metad 31 32DERIVED_FILES = \ 33 metad_svc.c 34 35OBJECTS= metad_freeresult.o \ 36 metad_init.o \ 37 metad_svc_subr.o 38 39LINTOBJECTS= metad_freeresult.o \ 40 metad_init.o \ 41 metad_svc_subr.o 42 43OBJECTS += $(DERIVED_FILES:.c=.o) 44 45SRCS = $(OBJECTS:%.o=../%.c) 46LINTSRCS = $(LINTOBJECTS:%.o=../%.c) 47 48POFILES= $(OBJS:%.o=%.po) 49 50include ../../../Makefile.cmd 51include ../../Makefile.lvm 52 53LDLIBS += -lmeta -lsocket -lnsl -ldevid 54 55CFLAGS += $(DEFINES) 56# 57# 58lint := LINTFLAGS += -m 59 60%_svc.c := RPCGENFLAGS += -K -1 61 62 63.KEEP_STATE: 64 65%.o: ../%.c 66 $(COMPILE.c) $< 67 68all: $(PROG) 69 70$(PROG): $(OBJECTS) 71 $(LINK.c) -o $@ $(OBJECTS) $(LDLIBS) 72 $(POST_PROCESS) 73 74ROOTUSRSBINPROG=$(PROG:%=$(ROOTUSRSBIN)/%) 75install: all $(ROOTUSRSBINPROG) 76 77catalog: 78 79cstyle: 80 ${CSTYLE} ${SRCS} 81 82lint: 83 ${LINT.c} $(LINTFLAGS) ${LINTSRCS} 84 85clean: 86 ${RM} ${OBJS} ${DERIVED_FILES} *.o 87 88clobber: clean 89 $(RM) $(PROG) $(CLOBBERFILES) 90 91metad_svc.c: $(SRC)/head/metad.x 92 $(CP) $(SRC)/head/metad.x . 93 $(RPCGEN) $(RPCGENFLAGS_SERVER) -DDEBUG metad.x -o $@ 94 ${RM} metad.x 95