7712 mandoc -Tlint does always exit with error code 0
[unleashed.git] / usr / src / lib / lvm / libmeta / Makefile.com
blob66f42e178e579f9f6c8273c5f692d32529c2dc30
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
22 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23 # Use is subject to license terms.
24 # Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
27 LIBRARY=        libmeta.a 
28 VERS=           .1 
29 COMMON =        $(SRC)/common/lvm
31 CMN_OBJS = md_crc.o md_convert.o md_revchk.o
33 DERIVED_OBJS = \
34         mdiox_xdr.o \
35         meta_basic_xdr.o \
36         metad_clnt.o \
37         metad_xdr.o \
38         metamed_clnt.o \
39         metamed_xdr.o \
40         metamhd_clnt.o \
41         metamhd_xdr.o \
42         mdmn_commd_xdr.o \
43         mhdx_xdr.o
45 LOCAL_OBJS=        \
46         metad_svc_stubs.o \
47         meta_admin.o \
48         meta_attach.o \
49         meta_db.o \
50         meta_db_balance.o \
51         meta_devadm.o \
52         meta_devstamp.o \
53         meta_error.o \
54         meta_getdevs.o \
55         meta_hotspares.o \
56         meta_import.o \
57         meta_init.o \
58         meta_lib_prv.o \
59         meta_mdcf.o \
60         meta_med_err.o \
61         meta_mem.o \
62         meta_metad.o \
63         meta_metad_subr.o \
64         meta_med.o \
65         meta_mh.o \
66         meta_mirror.o \
67         meta_mirror_resync.o \
68         meta_mn_comm.o \
69         meta_mn_changelog.o \
70         meta_mn_handlers.o \
71         meta_mn_msg_table.o \
72         meta_mn_subr.o \
73         meta_mount.o \
74         meta_name.o \
75         meta_nameinfo.o \
76         meta_namespace.o \
77         meta_notify.o \
78         meta_se_notify.o \
79         meta_patch.o \
80         meta_patch_root.o \
81         meta_print.o \
82         meta_raid.o \
83         meta_raid_resync.o \
84         meta_rename.o \
85         meta_repartition.o \
86         meta_replace.o \
87         meta_reset.o \
88         meta_resync.o \
89         meta_runtime.o \
90         meta_set.o \
91         meta_set_drv.o \
92         meta_set_hst.o \
93         meta_set_med.o \
94         meta_set_prv.o \
95         meta_set_tkr.o \
96         meta_setup.o \
97         meta_smf.o \
98         meta_stat.o \
99         meta_statconcise.o \
100         meta_sp.o \
101         meta_stripe.o \
102         meta_systemfile.o \
103         meta_tab.o \
104         meta_time.o \
105         meta_trans.o \
106         meta_userflags.o \
107         metarpcopen.o \
108         metasplitname.o \
109         metagetroot.o \
110         sdssc_bind.o
112 SPC_OBJS= meta_check.o
114 CMN_SRCS =      $(CMN_OBJS:%.o=$(COMMON)/%.c)
115 LOCAL_SRCS =    $(LOCAL_OBJS:%.o=../common/%.c)
116 DERIVED_SRCS =  $(DERIVED_OBJS:%.o=%.c)
117 SPC_SRCS =      $(SPC_OBJS:%.o=../common/%.c)
119 OBJECTS64 =     $(LOCAL_OBJS) $(DERIVED_OBJS) $(CMN_OBJS)
120 OBJECTS =       $(OBJECTS64) $(SPC_OBJS)
122 include $(SRC)/lib/lvm/Makefile.lvm
124 MSGSRCS = $(LOCAL_SRCS) $(SPC_SRCS)
125 MSGFILES = $(MSGSRCS:%.c=%.i)
126 POFILE = libmeta.po     
128 DCFILES = ../common/meta_print.po
129 DCFILE = libmeta.dc
131 CLOBBERFILES += $(POFILE) $(DCFILE)
133 # install this library in the root filesystem
134 include ../../../Makefile.rootfs
136 LIBS =          $(DYNLIB) $(LINTLIB)
137 SRCS =          $(CMN_SRCS) $(LOCAL_SRCS) $(DERIVED_SRCS)
138 $(LINTLIB) :=   SRCS = $(SRCDIR)/$(LINTSRC)
139 lint :=         SRCS = $(CMN_SRCS) $(LOCAL_SRCS) $(SPC_SRCS)
140 CPPFLAGS +=     -I$(SRC)/lib/lvm/libmeta/common/hdrs
141 LDLIBS +=       -lnsl -lc -ladm -ldevid -lgen -lefi -ldevinfo -lscf
142 CLEANFILES +=   $(DERIVED_SRCS) $(MSGFILES) $(DCFILES)
144 .KEEP_STATE:
146 BIG_TARGETS = $(OBJECTS64:%=pics/%)
148 $(BIG_TARGETS) := CPPFLAGS += -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
150 $(LINTLIB) := CPPFLAGS += -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
152 all: $(LIBS)
154 install debug: all $(ROOTLIBS) $(ROOTLINT) $(ROOTLINKS)
156 objs/%.o profs/%.o pics/%.o: $(COMMON)/%.c
157         $(COMPILE.c) -o $@ $<
158         $(POST_PROCESS_O)
160 mdiox_xdr.c: $(SRC)/uts/common/sys/lvm/mdiox.x
161         $(RPCGEN) $(RPCGENFLAGS) -c -i 100 $(SRC)/uts/common/sys/lvm/mdiox.x | \
162         $(AWK) '{sub(/uts\/common\/sys\/lvm/, "head"); print $$0}' >$@
164 meta_basic_xdr.c: $(SRC)/uts/common/sys/lvm/meta_basic.x
165         $(RPCGEN) $(RPCGENFLAGS) -c $(SRC)/uts/common/sys/lvm/meta_basic.x | \
166         $(AWK) '{sub(/uts\/common\/sys\/lvm/, "head"); print $$0}' >$@
168 metad_clnt.c: $(SRC)/head/metad.x 
169         $(RPCGEN) $(RPCGENFLAGS) -l $(SRC)/head/metad.x -o $@
171 metad_xdr.c: $(SRC)/head/metad.x
172         $(RPCGEN) $(RPCGENFLAGS) -c $(SRC)/head/metad.x -o $@
174 metamed_clnt.c: $(SRC)/uts/common/sys/lvm/metamed.x
175         $(RPCGEN) $(RPCGENFLAGS) -l $(SRC)/uts/common/sys/lvm/metamed.x | \
176         $(AWK) '{sub(/uts\/common\/sys\/lvm/, "head"); print $$0}' >$@
178 metamed_xdr.c: $(SRC)/uts/common/sys/lvm/metamed.x 
179         $(RPCGEN) $(RPCGENFLAGS) -c $(SRC)/uts/common/sys/lvm/metamed.x | \
180         $(AWK) '{sub(/uts\/common\/sys\/lvm/, "head"); print $$0}' >$@
182 metamhd_clnt.c: $(SRC)/head/metamhd.x 
183         $(RPCGEN) $(RPCGENFLAGS) -l $(SRC)/head/metamhd.x -o $@
185 metamhd_xdr.c: $(SRC)/head/metamhd.x 
186         $(RPCGEN) $(RPCGENFLAGS) -c $(SRC)/head/metamhd.x -o $@
188 mhdx_xdr.c: $(SRC)/uts/common/sys/lvm/mhdx.x
189         $(RPCGEN) $(RPCGENFLAGS) -c $(SRC)/uts/common/sys/lvm/mhdx.x | \
190         $(AWK) '{sub(/uts\/common\/sys\/lvm/, "head"); print $$0}' >$@
192 mdmn_commd_xdr.c: $(SRC)/uts/common/sys/lvm/mdmn_commd.x
193         $(RPCGEN) -c $(SRC)/uts/common/sys/lvm/mdmn_commd.x -o $@
195 $(DCFILE):= XGETFLAGS = -c TRANSLATION_NOTE_LC_TIME -t
197 $(DCFILE): $(DCFILES)
198         $(CAT) $(DCFILES) > $(DCFILE)
200 $(POFILE): $(MSGFILES)
201         $(BUILDPO.msgfiles)
203 _msg: $(MSGDOMAINPOFILE)
205 _dc: $(DCMSGDOMAINPOFILE)
207 include $(SRC)/lib/lvm/Makefile.targ
208 include $(SRC)/Makefile.msg.targ