xref: /illumos-gate/usr/src/uts/intel/iscsit/Makefile (revision a6d42e7d71324c5193c3b94d57d96ba2925d52e1)
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# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23*a6d42e7dSPeter Dunlap# Use is subject to license terms.
24*a6d42e7dSPeter Dunlap#
25*a6d42e7dSPeter Dunlap#	This makefile drives the production of the iscsit pseudo-driver for
26*a6d42e7dSPeter Dunlap#	COMSTAR.
27*a6d42e7dSPeter Dunlap
28*a6d42e7dSPeter Dunlap#
29*a6d42e7dSPeter Dunlap#	Path to the base of the uts directory tree (usually /usr/src/uts).
30*a6d42e7dSPeter Dunlap#
31*a6d42e7dSPeter Dunlap
32*a6d42e7dSPeter Dunlap
33*a6d42e7dSPeter DunlapUTSBASE	= ../..
34*a6d42e7dSPeter Dunlap
35*a6d42e7dSPeter DunlapARCHDIR:sh = cd ..; basename `pwd`
36*a6d42e7dSPeter Dunlap
37*a6d42e7dSPeter Dunlap#
38*a6d42e7dSPeter Dunlap#	Define the module and object file sets.
39*a6d42e7dSPeter Dunlap#
40*a6d42e7dSPeter DunlapMODULE		= iscsit
41*a6d42e7dSPeter DunlapOBJECTS		= $(ISCSIT_OBJS:%=$(OBJS_DIR)/%)
42*a6d42e7dSPeter DunlapLINTS		= $(ISCSIT_OBJS:%.o=$(LINTS_DIR)/%.ln)
43*a6d42e7dSPeter DunlapROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
44*a6d42e7dSPeter DunlapCONF_SRCDIR	= $(UTSBASE)/common/io/comstar/port/iscsit
45*a6d42e7dSPeter Dunlap
46*a6d42e7dSPeter Dunlap#
47*a6d42e7dSPeter Dunlap#	Include common rules.
48*a6d42e7dSPeter Dunlap#
49*a6d42e7dSPeter Dunlapinclude ../Makefile.$(ARCHDIR)
50*a6d42e7dSPeter Dunlap
51*a6d42e7dSPeter Dunlap#
52*a6d42e7dSPeter Dunlap#	Define targets
53*a6d42e7dSPeter Dunlap#
54*a6d42e7dSPeter DunlapALL_TARGET	= $(BINARY) $(SRC_CONFILE)
55*a6d42e7dSPeter DunlapLINT_TARGET	= $(MODULE).lint
56*a6d42e7dSPeter DunlapINSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
57*a6d42e7dSPeter Dunlap
58*a6d42e7dSPeter Dunlap#
59*a6d42e7dSPeter Dunlap#	Overrides and depends_on
60*a6d42e7dSPeter Dunlap#
61*a6d42e7dSPeter DunlapMODSTUBS_DIR	 = $(OBJS_DIR)
62*a6d42e7dSPeter DunlapLDFLAGS		+= -dy -Ndrv/stmf -Nmisc/idm -Nfs/sockfs -Nmisc/md5
63*a6d42e7dSPeter Dunlap
64*a6d42e7dSPeter DunlapINC_PATH	+= -I$(UTSBASE)/common/io/comstar/port/iscsit
65*a6d42e7dSPeter Dunlap# This path should be remove with the libiscsit.h/iscsit_common.h issue is
66*a6d42e7dSPeter Dunlap# resolved.
67*a6d42e7dSPeter DunlapINC_PATH	+= -I../../../lib/libiscsit/common/
68*a6d42e7dSPeter Dunlap
69*a6d42e7dSPeter DunlapC99MODE=	-xc99=%all
70*a6d42e7dSPeter DunlapC99LMODE=	-Xc99=%all
71*a6d42e7dSPeter Dunlap
72*a6d42e7dSPeter Dunlap#
73*a6d42e7dSPeter Dunlap#	Default build targets.
74*a6d42e7dSPeter Dunlap#
75*a6d42e7dSPeter Dunlap.KEEP_STATE:
76*a6d42e7dSPeter Dunlap
77*a6d42e7dSPeter Dunlapdef:		$(DEF_DEPS)
78*a6d42e7dSPeter Dunlap
79*a6d42e7dSPeter Dunlapall:		$(ALL_DEPS)
80*a6d42e7dSPeter Dunlap
81*a6d42e7dSPeter Dunlapclean:		$(CLEAN_DEPS)
82*a6d42e7dSPeter Dunlap
83*a6d42e7dSPeter Dunlapclobber:	$(CLOBBER_DEPS)
84*a6d42e7dSPeter Dunlap
85*a6d42e7dSPeter Dunlaplint:		$(LINT_DEPS)
86*a6d42e7dSPeter Dunlap
87*a6d42e7dSPeter Dunlapmodlintlib:	$(MODLINTLIB_DEPS)
88*a6d42e7dSPeter Dunlap
89*a6d42e7dSPeter Dunlapclean.lint:	$(CLEAN_LINT_DEPS)
90*a6d42e7dSPeter Dunlap
91*a6d42e7dSPeter Dunlapinstall:	$(INSTALL_DEPS)
92*a6d42e7dSPeter Dunlap
93*a6d42e7dSPeter Dunlap#
94*a6d42e7dSPeter Dunlap#	Include common targets.
95*a6d42e7dSPeter Dunlap#
96*a6d42e7dSPeter Dunlapinclude ../Makefile.targ
97