xref: /titanic_41/usr/src/cmd/lvm/rpc.metad/i386/Makefile (revision 0b42f15ac52b077791d4ba079e8c163c592c3fda)
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
45LINTSRCS =	$(LINTOBJECTS:%.o=../%.c)
46
47SRCS = $(OBJECTS:%.o=../%.c)
48
49POFILES= $(OBJS:%.o=%.po)
50
51include ../../../Makefile.cmd
52include ../../Makefile.lvm
53
54LDLIBS +=	-lmeta -lsocket -lnsl -ldevid
55
56CFLAGS += $(DEFINES)
57#
58#
59lint := LINTFLAGS += -m
60
61%_svc.c := RPCGENFLAGS += -K -1
62
63
64.KEEP_STATE:
65
66%.o:    ../%.c
67	$(COMPILE.c) $<
68
69all:	$(PROG)
70
71$(PROG): $(OBJECTS)
72	$(LINK.c) -o $@ $(OBJECTS) $(LDLIBS)
73	$(POST_PROCESS)
74
75ROOTUSRSBINPROG=$(PROG:%=$(ROOTUSRSBIN)/%)
76install: all $(ROOTUSRSBINPROG)
77
78catalog:
79
80cstyle:
81	${CSTYLE} ${SRCS}
82
83lint:
84	${LINT.c} $(LINTFLAGS) ${LINTSRCS}
85
86clean:
87	${RM} ${OBJS} ${DERIVED_FILES} *.o
88
89clobber: clean
90	$(RM) $(PROG) $(CLOBBERFILES)
91
92metad_svc.c: $(SRC)/head/metad.x
93	$(CP) $(SRC)/head/metad.x .
94	$(RPCGEN) $(RPCGENFLAGS_SERVER) -DDEBUG metad.x -o $@
95	${RM} metad.x
96