xref: /titanic_50/usr/src/lib/libshare/Makefile.com (revision 6185db853e024a486ff8837e6784dd290d866112)
1*6185db85Sdougm#
2*6185db85Sdougm# CDDL HEADER START
3*6185db85Sdougm#
4*6185db85Sdougm# The contents of this file are subject to the terms of the
5*6185db85Sdougm# Common Development and Distribution License (the "License").
6*6185db85Sdougm# You may not use this file except in compliance with the License.
7*6185db85Sdougm#
8*6185db85Sdougm# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*6185db85Sdougm# or http://www.opensolaris.org/os/licensing.
10*6185db85Sdougm# See the License for the specific language governing permissions
11*6185db85Sdougm# and limitations under the License.
12*6185db85Sdougm#
13*6185db85Sdougm# When distributing Covered Code, include this CDDL HEADER in each
14*6185db85Sdougm# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*6185db85Sdougm# If applicable, add the following below this CDDL HEADER, with the
16*6185db85Sdougm# fields enclosed by brackets "[]" replaced with your own identifying
17*6185db85Sdougm# information: Portions Copyright [yyyy] [name of copyright owner]
18*6185db85Sdougm#
19*6185db85Sdougm# CDDL HEADER END
20*6185db85Sdougm#
21*6185db85Sdougm#
22*6185db85Sdougm# ident	"%Z%%M%	%I%	%E% SMI"
23*6185db85Sdougm#
24*6185db85Sdougm# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25*6185db85Sdougm# Use is subject to license terms.
26*6185db85Sdougm#
27*6185db85SdougmLIBRARY =	libshare.a
28*6185db85SdougmVERS =		.1
29*6185db85SdougmNFSLIB_DIR =	$(SRC)/cmd/fs.d/nfs/lib
30*6185db85SdougmNFSSECSRC  =	$(NFSLIB_DIR)/nfs_sec.c
31*6185db85SdougmNFSSHARETAB =	$(NFSLIB_DIR)/sharetab.c
32*6185db85Sdougm
33*6185db85SdougmLIBOBJS =	libshare.o libsharecore.o scfutil.o libshare_zfs.o \
34*6185db85Sdougm		plugin.o parser.o issubdir.o
35*6185db85SdougmOTHOBJS =	sharetab.o nfs_sec.o
36*6185db85SdougmOBJECTS =	$(LIBOBJS) $(OTHOBJS)
37*6185db85SdougmCOMMON =	../common
38*6185db85Sdougm
39*6185db85SdougmSRCS =		$(OBJECTS:%.o=../%.c)
40*6185db85SdougmLIBSRCS =	$(LIBOBJS:%.o=$(COMMON)/%.c)
41*6185db85SdougmPOFILES	=	$(OBJECTS:%.o=%.po)
42*6185db85SdougmPOFILE  =	libshare.po
43*6185db85Sdougm
44*6185db85Sdougminclude ../../Makefile.lib
45*6185db85Sdougm
46*6185db85SdougmROOTDIRS= $(ROOT)/usr/include
47*6185db85Sdougm
48*6185db85SdougmROOTHDRS= $(HDRS:%=$(ROOTDIRS)/%)
49*6185db85Sdougm
50*6185db85SdougmCHECKHDRS= $(HDRS:%.h=%.check)
51*6185db85Sdougm
52*6185db85SdougmLIBS =		$(DYNLIB) $(LINTLIB)
53*6185db85SdougmLDLIBS +=	-lc -lnsl -lscf -lxml2 -lzfs -luuid -lfsmgt
54*6185db85Sdougm$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
55*6185db85Sdougm
56*6185db85SdougmSRCDIR =	../common
57*6185db85SdougmMAPDIR =	../spec/$(TRANSMACH)
58*6185db85SdougmSPECMAPFILE =	$(MAPDIR)/mapfile
59*6185db85Sdougm
60*6185db85Sdougm#add nfs/lib directory as part of the include path
61*6185db85SdougmCFLAGS +=	$(CCVERBOSE) -g
62*6185db85SdougmCPPFLAGS +=	-D_REENTRANT -I$(SRC)/lib/libfsmgt/common \
63*6185db85Sdougm		-I$(SRC)/cmd/fs.d/nfs/lib -I/usr/include/libxml2 \
64*6185db85Sdougm		-I../common
65*6185db85Sdougm
66*6185db85Sdougm.KEEP_STATE:
67*6185db85Sdougm
68*6185db85Sdougmall: $(LIBS)
69*6185db85Sdougm
70*6185db85Sdougm# we don't want to lint the sharetab and nfs_sec files
71*6185db85Sdougmlint: $$(LIBSRCS)
72*6185db85Sdougm	$(LINT.c) $(LINTCHECKFLAGS) $(LIBSRCS) $(LDLIBS)
73*6185db85Sdougm
74*6185db85Sdougmpics/%.o:	$(NFSLIB_DIR)/%.c
75*6185db85Sdougm	$(COMPILE.c) -o $@ $<
76*6185db85Sdougm	$(POST_PROCESS_O)
77*6185db85Sdougm
78*6185db85Sdougminclude ../../Makefile.targ
79*6185db85Sdougm
80*6185db85Sdougm$(POFILE):      $(POFILES)
81*6185db85Sdougm	$(RM) $@; cat $(POFILES) > $@
82