comparison usr/src/cmd/lvm/rpc.mdcommd/sparc/Makefile @ 0:68f95e015346

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