1*a6d42e7dSPeter Dunlap# 2*a6d42e7dSPeter Dunlap# CDDL HEADER START 3*a6d42e7dSPeter Dunlap# 4*a6d42e7dSPeter Dunlap# The contents of this file are subject to the terms of the 5*a6d42e7dSPeter Dunlap# Common Development and Distribution License (the "License"). 6*a6d42e7dSPeter Dunlap# You may not use this file except in compliance with the License. 7*a6d42e7dSPeter Dunlap# 8*a6d42e7dSPeter Dunlap# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*a6d42e7dSPeter Dunlap# or http://www.opensolaris.org/os/licensing. 10*a6d42e7dSPeter Dunlap# See the License for the specific language governing permissions 11*a6d42e7dSPeter Dunlap# and limitations under the License. 12*a6d42e7dSPeter Dunlap# 13*a6d42e7dSPeter Dunlap# When distributing Covered Code, include this CDDL HEADER in each 14*a6d42e7dSPeter Dunlap# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*a6d42e7dSPeter Dunlap# If applicable, add the following below this CDDL HEADER, with the 16*a6d42e7dSPeter Dunlap# fields enclosed by brackets "[]" replaced with your own identifying 17*a6d42e7dSPeter Dunlap# information: Portions Copyright [yyyy] [name of copyright owner] 18*a6d42e7dSPeter Dunlap# 19*a6d42e7dSPeter Dunlap# CDDL HEADER END 20*a6d42e7dSPeter Dunlap# 21*a6d42e7dSPeter Dunlap 22*a6d42e7dSPeter Dunlap# 23*a6d42e7dSPeter Dunlap# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24*a6d42e7dSPeter Dunlap# Use is subject to license terms. 25*a6d42e7dSPeter Dunlap# 26*a6d42e7dSPeter Dunlap 27*a6d42e7dSPeter DunlapPROG = iscsi-target 28*a6d42e7dSPeter Dunlap 29*a6d42e7dSPeter Dunlapinclude ../Makefile.cmd 30*a6d42e7dSPeter Dunlap 31*a6d42e7dSPeter DunlapCOMMONBASE = ../../common 32*a6d42e7dSPeter Dunlap 33*a6d42e7dSPeter DunlapLOCAL_OBJS = iscsitsvc.o 34*a6d42e7dSPeter DunlapCOMMON_OBJS = cmdparse.o 35*a6d42e7dSPeter DunlapLOCAL_SRCS = $(LOCAL_OBJS:%.o=%.c) 36*a6d42e7dSPeter DunlapCOMMON_SRCS = $(COMMON_OBJS:%.o=$(COMMONBASE)/cmdparse/%.c) 37*a6d42e7dSPeter DunlapOBJS = $(LOCAL_OBJS) $(COMMON_OBJS) 38*a6d42e7dSPeter DunlapSRCS = $(LOCAL_SRCS) $(COMMON_SRCS) 39*a6d42e7dSPeter Dunlap 40*a6d42e7dSPeter DunlapCPPFLAGS += -I$(COMMONBASE)/cmdparse 41*a6d42e7dSPeter Dunlap 42*a6d42e7dSPeter DunlapMANIFEST = iscsi-target.xml 43*a6d42e7dSPeter DunlapSVCMETHOD = iscsi-target 44*a6d42e7dSPeter Dunlap 45*a6d42e7dSPeter DunlapROOTMANIFESTDIR = $(ROOTSVCNETWORKISCSI) 46*a6d42e7dSPeter Dunlap$(ROOTSVCNETWORKISCSI)/iscsi-target.xml := OWNER = root 47*a6d42e7dSPeter Dunlap$(ROOTSVCNETWORKISCSI)/iscsi-target.xml := GROUP = bin 48*a6d42e7dSPeter Dunlap$(ROOTSVCNETWORKISCSI)/iscsi-target.xml := FILEMODE = 0444 49*a6d42e7dSPeter Dunlap 50*a6d42e7dSPeter Dunlap.KEEP_STATE: 51*a6d42e7dSPeter Dunlap 52*a6d42e7dSPeter Dunlapall: $(PROG) 53*a6d42e7dSPeter Dunlap 54*a6d42e7dSPeter Dunlap$(PROG): $(OBJS) 55*a6d42e7dSPeter Dunlap $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 56*a6d42e7dSPeter Dunlap $(POST_PROCESS) 57*a6d42e7dSPeter Dunlap 58*a6d42e7dSPeter Dunlapinstall: all $(ROOTMANIFEST) $(ROOTSVCMETHOD) 59*a6d42e7dSPeter Dunlap 60*a6d42e7dSPeter Dunlapcheck: $(CHKMANIFEST) 61*a6d42e7dSPeter Dunlap $(CSTYLE) -pPc $(SRCS:%=%) 62*a6d42e7dSPeter Dunlap 63*a6d42e7dSPeter Dunlapcmdparse.o: $(COMMONBASE)/cmdparse/cmdparse.c 64*a6d42e7dSPeter Dunlap $(COMPILE.c) -o $@ $(COMMONBASE)/cmdparse/cmdparse.c 65*a6d42e7dSPeter Dunlap $(POST_PROCESS_O) 66*a6d42e7dSPeter Dunlap 67*a6d42e7dSPeter Dunlapclean: 68*a6d42e7dSPeter Dunlap $(RM) $(OBJS) 69*a6d42e7dSPeter Dunlap 70*a6d42e7dSPeter Dunlaplint: lint_SRCS 71*a6d42e7dSPeter Dunlap 72*a6d42e7dSPeter Dunlapinclude ../Makefile.targ 73