7712 mandoc -Tlint does always exit with error code 0
[unleashed.git] / usr / src / cmd / lvm / rpc.metamhd / sparc / Makefile
blob1eec3121798ff0bb0a4080cfeb49503b105db4d2
2 # CDDL HEADER START
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.
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.
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]
20 # CDDL HEADER END
23 # Copyright 1996, 2001-2003 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
25 # Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
28 # Makefile for logical volume management
31 PROG= rpc.metamhd
33 RPCMOD = metamhd
35 DERIVED_FILES = \
36 $(RPCMOD)_svc.c \
37 $(RPCMOD)_xdr.c \
38 mhdx_xdr.c
40 OBJECTS= \
41 mhd_drive.o \
42 mhd_error.o \
43 mhd_failfast.o \
44 mhd_freeresult.o \
45 mhd_init.o \
46 mhd_mem.o \
47 mhd_metamhd.o \
48 mhd_set.o \
49 mhd_synch.o \
50 mhd_time.o
52 LINTOBJECTS= \
53 mhd_drive.o \
54 mhd_error.o \
55 mhd_failfast.o \
56 mhd_freeresult.o \
57 mhd_init.o \
58 mhd_mem.o \
59 mhd_metamhd.o \
60 mhd_set.o \
61 mhd_synch.o \
62 mhd_time.o
64 OBJECTS += $(DERIVED_FILES:.c=.o)
66 SRCS = $(OBJECTS:%.o=../%.c)
67 LINTSRCS = $(LINTOBJECTS:%.o=../%.c)
69 include ../../../Makefile.cmd
70 include ../../Makefile.lvm
73 MDLIBS =
74 LDLIBS += -ladm -lsocket -lnsl
76 POFILES= $(OBJECTS:%.o=%.po)
79 $(RPCMOD)_svc.c := RPCGENFLAGS += -A -K -1
81 DEFINES += -D_REENTRANT
82 CFLAGS += $(DEFINES)
87 lint := LINTFLAGS += -m
89 .KEEP_STATE:
91 %.o: ../%.c
92 $(COMPILE.c) $<
94 all: $(PROG)
96 $(PROG): $(OBJECTS)
97 $(LINK.c) -o $@ $(OBJECTS) $(LDLIBS)
98 $(POST_PROCESS)
101 ROOTUSRSBINPROG=$(PROG:%=$(ROOTUSRSBIN)/%)
102 install: all $(ROOTUSRSBINPROG)
104 catalog:
106 cstyle:
107 ${CSTYLE} ${SRCS}
109 lint:
110 ${LINT.c} $(LINTFLAGS) ${LINTSRCS}
112 clean:
113 ${RM} ${OBJECTS} ${DERIVED_FILES} *.o
115 clobber: clean
116 $(RM) $(PROG) $(CLOBBERFILES)
118 metamhd_svc.c: $(SRC)/head/metamhd.x
119 $(CP) $(SRC)/head/metamhd.x .
120 $(RPCGEN) $(RPCGENFLAGS_SERVER) metamhd.x -o $@
121 ${RM} metamhd.x
123 metamhd_xdr.c: $(SRC)/head/metamhd.x
124 $(RPCGEN) $(RPCGENFLAGS) -c $(SRC)/head/metamhd.x -o $@
126 mhdx_xdr.c: $(SRC)/uts/common/sys/lvm/mhdx.x
127 $(RPCGEN) $(RPCGENFLAGS) -c $(SRC)/uts/common/sys/lvm/mhdx.x | \
128 $(AWK) '{sub(/uts\/common\/sys\/lvm/, "head") ; print $$0}' >$@