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*6185db85Sdougm 28*6185db85Sdougminclude ../../../Makefile.cmd 29*6185db85Sdougm 30*6185db85SdougmCOMMON = .. 31*6185db85Sdougm 32*6185db85SdougmPROG= sharemgr 33*6185db85Sdougm 34*6185db85SdougmLINK_SRCS = libshare_nfs.c 35*6185db85SdougmLINK_OBJS = libshare_nfs.o 36*6185db85SdougmLINK_MODS = libshare_nfs.so 37*6185db85Sdougm 38*6185db85SdougmSHAREMGR_MOD = sharemgr 39*6185db85Sdougm 40*6185db85SdougmCOMMONSRC = sharemgr_main.c commands.c shareutil.c 41*6185db85Sdougm 42*6185db85SdougmSHAREMGR_SRC = $(COMMONSRC:%=$(COMMON)/%) 43*6185db85Sdougm 44*6185db85SdougmSHAREMGR_OBJ = $(COMMONSRC:%.c=%.o) 45*6185db85Sdougm 46*6185db85SdougmROOTLINKS = $(ROOTUSRSBIN)/share $(ROOTUSRSBIN)/unshare 47*6185db85Sdougm 48*6185db85SdougmMYCPPFLAGS = -I../../../../lib/libfsmgt/common -I/usr/include/libxml2 \ 49*6185db85Sdougm -I../.. 50*6185db85SdougmCPPFLAGS += $(MYCPPFLAGS) 51*6185db85SdougmLDLIBS += -lshare -lxml2 -lscf -lsecdb -lumem 52*6185db85SdougmLINTFLAGS += -u 53*6185db85Sdougm 54*6185db85SdougmSRCS = $(SHAREMGR_SRC) 55*6185db85SdougmOBJS = $(SHAREMGR_OBJ) 56*6185db85SdougmMODS = $(SHAREMGR_MOD) 57*6185db85Sdougm 58*6185db85SdougmCLOBBERFILES = $(MODS) 59*6185db85Sdougm 60*6185db85SdougmPOFILES = $(SHAREMGR_SRC:.c=.po) 61*6185db85SdougmPOFILE = sharemgr.po 62*6185db85Sdougm 63*6185db85Sdougmall := TARGET= all 64*6185db85Sdougminstall := TARGET= install 65*6185db85Sdougmclean := TARGET= clean 66*6185db85Sdougmclobber := TARGET= clobber 67*6185db85Sdougmlint := TARGET= lint 68*6185db85Sdougm_msg:= TARGET= catalog 69*6185db85Sdougm 70*6185db85Sdougm.KEEP_STATE: 71*6185db85Sdougm 72*6185db85Sdougmall: $(MODS) 73*6185db85Sdougm 74*6185db85Sdougmcatalog: $(POFILE) 75*6185db85Sdougm 76*6185db85Sdougm$(PROG): $(OBJS) 77*6185db85Sdougm $(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS) 78*6185db85Sdougm $(POST_PROCESS) 79*6185db85Sdougm 80*6185db85Sdougminstall: all $(ROOTUSRSBINPROG) $(ROOTLINKS) 81*6185db85Sdougm 82*6185db85Sdougm$(ROOTLINKS): $(ROOTUSRSBINPROG) 83*6185db85Sdougm $(RM) $@ 84*6185db85Sdougm $(LN) $(ROOTUSRSBINPROG) $@ 85*6185db85Sdougm 86*6185db85Sdougmlint: $(SHAREMGR_MOD).ln $(SHAREMGR_SRC:.c=.ln) 87*6185db85Sdougm 88*6185db85Sdougmclean: 89*6185db85Sdougm $(RM) $(OBJS) 90*6185db85Sdougm 91*6185db85Sdougmcheck: $(CHKMANIFEST) 92*6185db85Sdougm 93*6185db85Sdougm%.ln: FRC 94*6185db85Sdougm $(LINT.c) $(SHAREMGR_SRC) $(LDLIBS) 95*6185db85Sdougm 96*6185db85Sdougminclude ../../../Makefile.targ 97*6185db85Sdougm 98*6185db85Sdougm$(POFILE): $(POFILES) 99*6185db85Sdougm $(RM) $@; cat $(POFILES) > $@ 100*6185db85Sdougm 101*6185db85Sdougm%.o: $(COMMON)/%.c 102*6185db85Sdougm $(COMPILE.c) -o $@ $< 103*6185db85Sdougm 104*6185db85SdougmFRC: 105