xref: /onnv-gate/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/lib/Makefile (revision 6543:465433824d87)
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 (the "License").
6# You may not use this file except in compliance with the License.
7#
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.
12#
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]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28include $(SRC)/cmd/wbem/Makefile.wbem
29
30LIBNAME =	libWBEMnfs
31LIBRARY	=	$(LIBNAME).so
32PROG =		$(LIBRARY)
33MSG_DOMAIN =	CIM_$(LIBNAME)
34TMPFILE =	classes.tmp
35TMPFILE1 =	assocclasses.tmp
36
37PROV_OBJECTS = \
38	../nfs_filesystem/Solaris_NFS.o \
39	../assoc/Solaris_PersistentShareForSystem.o \
40	../assoc/Solaris_HostedShare.o \
41	../assoc/Solaris_NFSMount.o \
42	../assoc/Solaris_NFSShareEntry.o \
43	../assoc/Solaris_SharedFileSystem.o \
44	../assoc/Solaris_NFSShareSecurityModes.o \
45	../assoc/common_functions.o \
46	../nfs_share/Solaris_NFSShare.o \
47	../nfs_share/Solaris_NFSShareSecurity.o \
48	../nfs_share/Solaris_PersistentShare.o \
49	../nfs_share/Solaris_ShareService.o \
50	../nfs_mount/Solaris_MountService.o \
51	../common/nfsprov_methods.o \
52	../common/createprop_methods.o \
53	../../common/mount_methods/mountprov_methods.o \
54	../../common/cmdgeneration/cmdgen.o \
55	../../common/cmdgeneration/mount/cmdgen_mount.o \
56	../../common/cmdgeneration/mount/nfs/cmdgen_mount_nfs.o \
57	../../common/cmdgeneration/mount/cmdgen_mountall.o \
58	../../common/cmdgeneration/umount/cmdgen_umount.o \
59	../../common/cmdgeneration/umount/cmdgen_umountall.o \
60	../../common/cmdgeneration/share/cmdgen_share.o \
61	../../common/cmdgeneration/share/cmdgen_shareall.o \
62	../../common/cmdgeneration/share/nfs/cmdgen_share_nfs.o \
63	../../common/cmdgeneration/unshare/cmdgen_unshare.o \
64	../../common/cmdgeneration/unshare/cmdgen_unshareall.o \
65	../../common/cmdgeneration/unshare/nfs/cmdgen_unshare_nfs.o \
66	../../../wbem_disk/common/util.o
67
68# Just add the name of your provider
69# to this list.
70# IMPORTANT:
71# $(LIBNAME) MUST be the last entry
72
73# Add All providers here
74WBEM_NFS_CLASSES =	Solaris_NFS \
75			Solaris_NFSMount \
76			Solaris_NFSShareEntry \
77			Solaris_SharedFileSystem \
78			Solaris_NFSShareSecurityModes \
79			Solaris_NFSShare \
80			Solaris_NFSShareSecurity \
81			Solaris_PersistentShare \
82			Solaris_MountService \
83			Solaris_ShareService \
84			Solaris_PersistentShareForSystem \
85			Solaris_HostedShare \
86	                $(LIBNAME)
87
88# Add all association providers here
89WBEM_NFS_ASSOC_CLASSES =	Solaris_PersistentShareForSystem \
90				Solaris_HostedShare \
91				Solaris_NFSMount \
92				Solaris_NFSShareEntry \
93				Solaris_SharedFileSystem \
94				Solaris_NFSShareSecurityModes \
95	                	$(LIBNAME)
96
97OBJECTS =	libDispatch.o \
98		localFunc.o
99
100LINT_OBJS	= $(OBJECTS:%.o=%.ln)
101
102GENERAL	=	$(ROOTWBEMINC) \
103		$(SRC)/cmd/wbem/provider/c/include
104
105CPPFLAGS	+= -I. $(GENERAL:%=-I%) -DPORTMAP -D_REENTRANT -Dpic -D_TS_ERRNO
106
107CFLAGS		+= $(XREGSFLAG) $(C_PICFLAGS)
108
109LINTFLAGS	+= -um
110LINTLIBS	= $(LDLIBS.cmd)
111
112LDFLAGS		+= -Mmapfile $(GSHARED) -R/usr/sadm/lib/wbem \
113		    $(ZTEXT) $(ZDEFS) $(SOFLAGS)
114
115LDLIBS		+= -L/usr/sadm/lib/wbem -lc -lcimapi -lfsmgt
116
117POFILE		= _lib.po
118MSGFILES	= $(OBJECTS:%.o=%.i)
119
120CLOBBERFILES	+= $(POFILE)
121
122CLEANFILES	= *.tmp master.h classes assocclasses Make.obj libname $(MSGFILES)
123
124
125all:=		TARGET =	all
126install:=	TARGET =	install
127
128.KEEP_STATE:
129
130all:	master.h $(LIBRARY)
131
132$(LIBRARY): $(OBJECTS)
133	$(CC) -o $@ $(LDFLAGS) \
134	$(PROV_OBJECTS) $(OBJECTS) $(LDLIBS)
135	$(POST_PROCESS_SO)
136
137master.h:	Makefile header.sh
138		@echo ${WBEM_NFS_CLASSES} > ${TMPFILE}
139		@echo ${WBEM_NFS_ASSOC_CLASSES} > ${TMPFILE1}
140		sh header.sh
141
142install:	all $(ROOTWBEMPROG)
143
144lint: $(LINT_OBJS)
145	$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
146
147clean:
148		$(RM) $(OBJECTS) $(LIBRARY) $(CLEANFILES) $(LINT_OBJS)
149
150check:
151		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c)
152
153catalog:	master.h $(POFILE)
154
155$(POFILE): $(MSGFILES)
156	$(BUILDPO.msgfiles)
157
158include $(SRC)/cmd/Makefile.targ
159include $(SRC)/Makefile.msg.targ
160