xref: /titanic_51/usr/src/lib/libfsmgt/Makefile.com (revision 8eea8e29cc4374d1ee24c25a07f45af132db3499)
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 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29LIBRARY =	libfsmgt.a
30VERS =		.1
31NFSLIB_DIR =	$(SRC)/cmd/fs.d/nfs/lib
32
33OBJECTS =	fs_mounts.o fs_mount_defaults.o \
34		sys_info.o sharetab.o nfs_sec.o \
35		replica.o nfs_mntinfo.o fs_shares.o \
36		cmd.o fileutil.o fs_dfstab.o \
37		nfs_netcfg.o nfs_nfssec.o
38
39SRCS =		$(OBJECTS:%.o=../%.c)
40
41include ../../Makefile.lib
42
43ROOTDIRS= $(ROOT)/usr/include
44
45ROOTHDRS= $(HDRS:%=$(ROOTDIRS)/%)
46
47CHECKHDRS= $(HDRS:%.h=%.check)
48
49LIBS =		$(DYNLIB) $(LINTLIB)
50LDLIBS +=	-lc -lnsl -lkstat
51$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
52
53SRCDIR =	../common
54MAPDIR =	../spec/$(TRANSMACH)
55SPECMAPFILE =	$(MAPDIR)/mapfile
56
57#add nfs/lib directory as part of the include path
58CFLAGS +=	$(CCVERBOSE)
59CPPFLAGS +=	-D_REENTRANT -I$(SRC)/lib/libfsmgt/common \
60		-I$(SRC)/cmd/fs.d/nfs/lib
61
62.KEEP_STATE:
63
64all: $(LIBS)
65
66lint: lintcheck
67
68$(SRCDIR)/sharetab.c: $(NFSLIB_DIR)/sharetab.c
69	rm -f $(SRCDIR)/sharetab.c
70	$(CP) -p $(NFSLIB_DIR)/sharetab.c $(SRCDIR)
71
72$(SRCDIR)/nfs_sec.c: $(NFSLIB_DIR)/nfs_sec.c
73	rm -f $(SRCDIR)/nfs_sec.c
74	$(CP) -p $(NFSLIB_DIR)/nfs_sec.c $(SRCDIR)
75
76$(SRCDIR)/replica.c: $(NFSLIB_DIR)/replica.c
77	rm -f $(SRCDIR)/replica.c
78	$(CP) -p $(NFSLIB_DIR)/replica.c $(SRCDIR)
79
80include ../../Makefile.targ
81