16185db85Sdougm# 26185db85Sdougm# CDDL HEADER START 36185db85Sdougm# 46185db85Sdougm# The contents of this file are subject to the terms of the 56185db85Sdougm# Common Development and Distribution License (the "License"). 66185db85Sdougm# You may not use this file except in compliance with the License. 76185db85Sdougm# 86185db85Sdougm# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 96185db85Sdougm# or http://www.opensolaris.org/os/licensing. 106185db85Sdougm# See the License for the specific language governing permissions 116185db85Sdougm# and limitations under the License. 126185db85Sdougm# 136185db85Sdougm# When distributing Covered Code, include this CDDL HEADER in each 146185db85Sdougm# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 156185db85Sdougm# If applicable, add the following below this CDDL HEADER, with the 166185db85Sdougm# fields enclosed by brackets "[]" replaced with your own identifying 176185db85Sdougm# information: Portions Copyright [yyyy] [name of copyright owner] 186185db85Sdougm# 196185db85Sdougm# CDDL HEADER END 206185db85Sdougm# 216185db85Sdougm# 226185db85Sdougm# ident "%Z%%M% %I% %E% SMI" 236185db85Sdougm# 246185db85Sdougm# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 256185db85Sdougm# Use is subject to license terms. 266185db85Sdougm# 276185db85SdougmLIBRARY = libshare.a 286185db85SdougmVERS = .1 296185db85SdougmNFSLIB_DIR = $(SRC)/cmd/fs.d/nfs/lib 306185db85SdougmNFSSECSRC = $(NFSLIB_DIR)/nfs_sec.c 316185db85SdougmNFSSHARETAB = $(NFSLIB_DIR)/sharetab.c 326185db85Sdougm 336185db85SdougmLIBOBJS = libshare.o libsharecore.o scfutil.o libshare_zfs.o \ 346185db85Sdougm plugin.o parser.o issubdir.o 356185db85SdougmOTHOBJS = sharetab.o nfs_sec.o 366185db85SdougmOBJECTS = $(LIBOBJS) $(OTHOBJS) 376185db85SdougmCOMMON = ../common 386185db85Sdougm 396185db85SdougmSRCS = $(OBJECTS:%.o=../%.c) 406185db85SdougmLIBSRCS = $(LIBOBJS:%.o=$(COMMON)/%.c) 416185db85SdougmPOFILES = $(OBJECTS:%.o=%.po) 426185db85SdougmPOFILE = libshare.po 436185db85Sdougm 446185db85Sdougminclude ../../Makefile.lib 456185db85Sdougm 466185db85SdougmROOTDIRS= $(ROOT)/usr/include 476185db85Sdougm 486185db85SdougmROOTHDRS= $(HDRS:%=$(ROOTDIRS)/%) 496185db85Sdougm 506185db85SdougmCHECKHDRS= $(HDRS:%.h=%.check) 516185db85Sdougm 526185db85SdougmLIBS = $(DYNLIB) $(LINTLIB) 53*1cea05afSdougmLDLIBS += -lc -lnsl -lscf -lzfs -luuid 545359815fSdougmall install := LDLIBS += -lxml2 556185db85Sdougm$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC) 566185db85Sdougm 576185db85SdougmSRCDIR = ../common 586185db85SdougmMAPDIR = ../spec/$(TRANSMACH) 596185db85SdougmSPECMAPFILE = $(MAPDIR)/mapfile 606185db85Sdougm 616185db85Sdougm#add nfs/lib directory as part of the include path 626185db85SdougmCFLAGS += $(CCVERBOSE) -g 63*1cea05afSdougmCPPFLAGS += -D_REENTRANT -I$(SRC)/cmd/fs.d/nfs/lib -I/usr/include/libxml2 \ 646185db85Sdougm -I../common 656185db85Sdougm 666185db85Sdougm.KEEP_STATE: 676185db85Sdougm 686185db85Sdougmall: $(LIBS) 696185db85Sdougm 706185db85Sdougm# we don't want to lint the sharetab and nfs_sec files 716185db85Sdougmlint: $$(LIBSRCS) 726185db85Sdougm $(LINT.c) $(LINTCHECKFLAGS) $(LIBSRCS) $(LDLIBS) 736185db85Sdougm 746185db85Sdougmpics/%.o: $(NFSLIB_DIR)/%.c 756185db85Sdougm $(COMPILE.c) -o $@ $< 766185db85Sdougm $(POST_PROCESS_O) 776185db85Sdougm 786185db85Sdougminclude ../../Makefile.targ 796185db85Sdougm 806185db85Sdougm$(POFILE): $(POFILES) 816185db85Sdougm $(RM) $@; cat $(POFILES) > $@ 82