xref: /titanic_41/usr/src/cmd/lvm/rpc.mdcommd/i386/Makefile (revision 7ff178cd8db129d385d3177eb20744d3b6efc59b)
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 2005 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29COMMD = rpc.mdcommd
30MDDOORS = mddoors
31
32PROG = $(COMMD) $(MDDOORS)
33
34DERIVED_FILES = mdmn_commd_xdr.c
35
36OBJECTS =	mdmn_commd_server.o \
37		mdmn_commd_service.o \
38		mddoors.o
39
40COMMD_OBJECTS =	mdmn_commd_server.o \
41		mdmn_commd_service.o \
42		mdmn_subr.o \
43		mdmn_commd_xdr.o
44
45MDDOORS_OBJECTS = mddoors.o
46
47LINTOBJECTS =	mdmn_commd_server.o  mdmn_commd_service.o mdmn_subr.o mddoors.o
48
49OBJECTS +=	$(DERIVED_FILES:.c=.o)
50
51SRCS = $(OBJECTS:%.o=../%.c)
52LINTSRCS =	$(LINTOBJECTS:%.o=../%.c)
53
54ROOTLIBLVM = $(ROOTLIB)/lvm
55
56include ../../../Makefile.cmd
57include ../../Makefile.lvm
58
59LDLIBS +=	-lmeta
60
61CFLAGS += $(DEFINES)
62#
63#
64lint := LINTFLAGS += -m
65
66%_svc.c := RPCGENFLAGS += -K -1
67
68.KEEP_STATE:
69
70%.o:    ../%.c
71	$(COMPILE.c) $<
72
73all:	$(PROG)
74
75$(COMMD): $(DERIVED_FILES) $(COMMD_OBJECTS)
76	$(LINK.c) -o $@ $(COMMD_OBJECTS) $(LDLIBS) -lnsl
77	$(POST_PROCESS)
78
79$(MDDOORS): ../mddoors.c
80	$(COMPILE.c) ../mddoors.c
81	$(LINK.c) -o $@ $(MDDOORS_OBJECTS) $(LDLIBS)
82	$(POST_PROCESS)
83
84INSTPROGS = $(ROOTUSRSBIN)/$(COMMD) $(ROOTLIBLVM)/$(MDDOORS)
85install: all $(ROOTLIBLVM) $(INSTPROGS)
86
87cstyle:
88	$(CSTYLE) $(SRCS)
89
90lint:
91	for f in $(LINTSRCS) ; do \
92		$(LINT.c) $(LINTFLAGS) $$f ; \
93	done
94
95clean:
96	$(RM) $(OBJECTSS) $(DERIVED_FILES) *.o a.out core
97
98clobber: clean
99	$(RM) $(PROG)
100
101$(DERIVED_FILES): $(SRC)/uts/common/sys/lvm/mdmn_commd.x
102	$(RPCGEN) -c $(SRC)/uts/common/sys/lvm/mdmn_commd.x -o $@
103
104$(ROOTLIBLVM)/%: %
105	$(INS.file)
106
107$(ROOTLIBLVM):
108	$(INS.dir)
109
110