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