Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# CDDL HEADER START
04428429c4e689333e3ef8d19a2debeb20d4d15dMark Andrews#
e999539fb3e45b2617571e0e3ecd651992291701Mark Andrews# The contents of this file are subject to the terms of the
e999539fb3e45b2617571e0e3ecd651992291701Mark Andrews# Common Development and Distribution License (the "License").
2a40fdc2d34adb8a5c72a748449699666032d461Mark Andrews# You may not use this file except in compliance with the License.
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
a3b428812703d22a605a9f882e71ed65f0ffdc65Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# or http://www.opensolaris.org/os/licensing.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# See the License for the specific language governing permissions
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews# and limitations under the License.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# When distributing Covered Code, include this CDDL HEADER in each
d56e188030368b835122d759ebbf8d9613c166f4Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews# If applicable, add the following below this CDDL HEADER, with the
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews#
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews# CDDL HEADER END
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# This makefile drives the production of the iscsit pseudo-driver for
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# COMSTAR.
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# Path to the base of the uts directory tree (usually /usr/src/uts).
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsUTSBASE = ../..
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
a3b428812703d22a605a9f882e71ed65f0ffdc65Mark AndrewsARCHDIR:sh = cd ..; basename `pwd`
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews#
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews# Define the module and object file sets.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c718d15a9a95054ee3c71540c02335426071fc6dMark AndrewsMODULE = iscsit
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsOBJECTS = $(ISCSIT_OBJS:%=$(OBJS_DIR)/%)
c069a20053d41ae299eb9457e50ea44ae9f73ed2Mark AndrewsLINTS = $(ISCSIT_OBJS:%.o=$(LINTS_DIR)/%.ln)
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark AndrewsROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCONF_SRCDIR = $(UTSBASE)/common/io/comstar/port/iscsit
605bd686e437162b5ab65ac4e7c1be0bba1886ddMark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
3f6174bffe227be44e241a29d186add00c032ff6Mark Andrews# Include common rules.
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsinclude ../Makefile.$(ARCHDIR)
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# Define targets
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews#
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark AndrewsALL_TARGET = $(BINARY) $(SRC_CONFILE)
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsLINT_TARGET = $(MODULE).lint
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# Overrides and depends_on
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonMODSTUBS_DIR = $(OBJS_DIR)
26a77b80bb7ee886c6fa704348d5e80a011d8811Mark AndrewsLDFLAGS += -dy -Ndrv/stmf -Nmisc/idm -Nfs/sockfs -Nmisc/md5 -Nmisc/ksocket
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
6f046a065e5543f8cd7e2f24991c65d2372f4c8dMark AndrewsC99MODE= -xc99=%all
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark AndrewsC99LMODE= -Xc99=%all
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCERRWARN += -_gcc=-Wno-switch
62ee2c9f460d2e2e45dcf1abc8b4b4a4a43f5618Mark AndrewsCERRWARN += -_gcc=-Wno-uninitialized
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark AndrewsCERRWARN += -_gcc=-Wno-unused-label
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Default build targets.
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews#
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews.KEEP_STATE:
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssondef: $(DEF_DEPS)
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrewsall: $(ALL_DEPS)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrewsclean: $(CLEAN_DEPS)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrewsclobber: $(CLOBBER_DEPS)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
45eca3a5d46ed15aee14d81f6cb6c9fb6f365344Mark Andrewslint: $(LINT_DEPS)
80f9a970ae6681c08529ef209eaabbe078c27ca3Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrewsmodlintlib: $(MODLINTLIB_DEPS)
46e873c835bf7d9ec3e1097e0aceb8db5b1ae93aMark Andrews
46e873c835bf7d9ec3e1097e0aceb8db5b1ae93aMark Andrewsclean.lint: $(CLEAN_LINT_DEPS)
dd9ad704c3800e3ab07ede8595871eac79984871Mark Andrews
605bd686e437162b5ab65ac4e7c1be0bba1886ddMark Andrewsinstall: $(INSTALL_DEPS)
45eca3a5d46ed15aee14d81f6cb6c9fb6f365344Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews#
ab81f57ca0c3addfec3df3babdcea9644757cf23Mark Andrews# Include common targets.
605bd686e437162b5ab65ac4e7c1be0bba1886ddMark Andrews#
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrewsinclude ../Makefile.targ
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews