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