0
|
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
|
|
27 COMMD = rpc.mdcommd
|
|
28 MDDOORS = mddoors
|
|
29
|
|
30 PROG = $(COMMD) $(MDDOORS)
|
|
31
|
|
32 DERIVED_FILES = mdmn_commd_xdr.c
|
|
33
|
|
34 OBJECTS = mdmn_commd_server.o \
|
|
35 mdmn_commd_service.o \
|
|
36 mddoors.o
|
|
37
|
|
38 COMMD_OBJECTS = mdmn_commd_server.o \
|
|
39 mdmn_commd_service.o \
|
|
40 mdmn_subr.o \
|
|
41 mdmn_commd_xdr.o
|
|
42
|
|
43 MDDOORS_OBJECTS = mddoors.o
|
|
44
|
|
45 LINTOBJECTS = mdmn_commd_server.o mdmn_commd_service.o mdmn_subr.o mddoors.o
|
|
46
|
|
47 OBJECTS += $(DERIVED_FILES:.c=.o)
|
|
48
|
|
49 SRCS = $(OBJECTS:%.o=../%.c)
|
|
50 LINTSRCS = $(LINTOBJECTS:%.o=../%.c)
|
|
51
|
|
52 ROOTLIBLVM = $(ROOTLIB)/lvm
|
|
53
|
|
54 include ../../../Makefile.cmd
|
|
55 include ../../Makefile.lvm
|
|
56
|
|
57 LDLIBS += -lmeta
|
|
58
|
|
59 CFLAGS += $(DEFINES)
|
|
60 #
|
|
61 #
|
|
62 lint := LINTFLAGS += -m
|
|
63
|
|
64 .KEEP_STATE:
|
|
65
|
|
66 %.o: ../%.c
|
|
67 $(COMPILE.c) $<
|
|
68
|
|
69 all: $(PROG)
|
|
70
|
|
71 $(COMMD): $(DERIVED_FILES) $(COMMD_OBJECTS)
|
|
72 $(LINK.c) -o $@ $(COMMD_OBJECTS) $(LDLIBS) -lnsl
|
|
73 $(POST_PROCESS)
|
|
74
|
|
75 $(MDDOORS): ../mddoors.c
|
|
76 $(COMPILE.c) ../mddoors.c
|
|
77 $(LINK.c) -o $@ $(MDDOORS_OBJECTS) $(LDLIBS)
|
|
78 $(POST_PROCESS)
|
|
79
|
|
80 INSTPROGS = $(ROOTUSRSBIN)/$(COMMD) $(ROOTLIBLVM)/$(MDDOORS)
|
|
81 install: all $(ROOTLIBLVM) $(INSTPROGS)
|
|
82
|
|
83 cstyle:
|
|
84 $(CSTYLE) $(SRCS)
|
|
85
|
|
86 lint:
|
|
87 for f in $(LINTSRCS) ; do \
|
|
88 $(LINT.c) $(LINTFLAGS) $$f ; \
|
|
89 done
|
|
90
|
|
91 clean:
|
14174
|
92 $(RM) $(OBJECTS) $(DERIVED_FILES) *.o
|
0
|
93
|
|
94 clobber: clean
|
14174
|
95 $(RM) $(PROG) $(CLOBBERFILES)
|
0
|
96
|
|
97 $(DERIVED_FILES): $(SRC)/uts/common/sys/lvm/mdmn_commd.x
|
|
98 $(RPCGEN) -c $(SRC)/uts/common/sys/lvm/mdmn_commd.x -o $@
|
|
99
|
|
100 $(ROOTLIBLVM)/%: %
|
|
101 $(INS.file)
|
|
102
|
|
103 $(ROOTLIBLVM):
|
|
104 $(INS.dir)
|
|
105
|