1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License, Version 1.0 only 6# (the "License"). You may not use this file except in compliance 7# with the License. 8# 9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10# or http://www.opensolaris.org/os/licensing. 11# See the License for the specific language governing permissions 12# and limitations under the License. 13# 14# When distributing Covered Code, include this CDDL HEADER in each 15# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16# If applicable, add the following below this CDDL HEADER, with the 17# fields enclosed by brackets "[]" replaced with your own identifying 18# information: Portions Copyright [yyyy] [name of copyright owner] 19# 20# CDDL HEADER END 21# 22# 23# uts/sparc/ses/Makefile 24# 25# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 26# Use is subject to license terms. 27# 28#ident "%Z%%M% %I% %E% SMI" 29# 30# This makefile drives the production of the ses driver kernel module. 31# 32# sparc architecture dependent 33# 34 35# 36# Path to the base of the uts directory tree (usually /usr/src/uts). 37# 38UTSBASE = ../.. 39 40# 41# Define the module and object file sets. 42# 43MODULE = ses 44OBJECTS = $(SES_OBJS:%=$(OBJS_DIR)/%) 45LINTS = $(SES_OBJS:%.o=$(LINTS_DIR)/%.ln) 46ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 47CONF_SRCDIR = $(UTSBASE)/sun/io/scsi/targets 48WARLOCK_TARGETS = warlock.ok warlock_with_esp.ok warlock_with_fas.ok \ 49 warlock_with_isp.ok warlock_with_glm.ok 50 51# 52# Include common rules. 53# 54include $(UTSBASE)/sparc/Makefile.sparc 55 56# 57# Define targets 58# 59ALL_TARGET = $(BINARY) $(SRC_CONFILE) 60LINT_TARGET = $(MODULE).lint 61INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) 62CLEANFILES += $(WARLOCK_TARGETS) 63 64# 65# Default build targets. 66# 67.KEEP_STATE: 68 69def: $(DEF_DEPS) 70 71all: $(ALL_DEPS) 72 73clean: $(CLEAN_DEPS) 74 75clobber: $(CLOBBER_DEPS) 76 77lint: $(LINT_DEPS) 78 79modlintlib: $(MODLINTLIB_DEPS) lint64 80 81clean.lint: $(CLEAN_LINT_DEPS) 82 83install: $(INSTALL_DEPS) 84 85# 86# Include common targets. 87# 88include $(UTSBASE)/sparc/Makefile.targ 89 90 91# 92# Defines for local commands. 93# 94WARLOCK = warlock 95WLCC = wlcc 96TOUCH = touch 97SCCS = sccs 98TEST = test 99 100# 101# Warlock targets 102# 103SES_FILES = $(MODULE).ll 104SCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll) 105 106 107warlock: $(WARLOCK_TARGETS) 108 109warlock.ok: $(MODULE).wlcmd $(SES_FILES) 110 @cd ../warlock; $(MAKE) warlock 111 @cd ../scsi; $(MAKE) warlock 112 $(WARLOCK) -c ./$(MODULE).wlcmd $(SES_FILES) ../warlock/scsi.ll \ 113 -l ../warlock/ddi_dki_impl.ll \ 114 $(SCSI_FILES) 115 @ $(TOUCH) $@ 116 117warlock_with_esp.ok: ses_with_esp.wlcmd $(SES_FILES) 118 @cd ../warlock; $(MAKE) warlock 119 @cd ../scsi; $(MAKE) warlock 120 @cd ../esp; $(MAKE) warlock; 121 $(WARLOCK) -c ./ses_with_esp.wlcmd $(SES_FILES) ../esp/esp \ 122 ../warlock/scsi.ll \ 123 -l ../warlock/ddi_dki_impl.ll \ 124 $(SCSI_FILES) 125 @ $(TOUCH) $@ 126 127warlock_with_fas.ok: ses_with_fas.wlcmd $(SES_FILES) 128 @cd ../warlock; $(MAKE) warlock 129 @cd ../scsi; $(MAKE) warlock 130 @cd ../fas; $(MAKE) warlock; 131 $(WARLOCK) -c ./ses_with_fas.wlcmd $(SES_FILES) \ 132 ../fas/fas ../fas/fas_callbacks \ 133 ../warlock/scsi.ll \ 134 -l ../warlock/ddi_dki_impl.ll \ 135 $(SCSI_FILES) 136 @ $(TOUCH) $@ 137 138warlock_with_isp.ok: ses_with_isp.wlcmd $(SES_FILES) 139 @cd ../warlock; $(MAKE) warlock 140 @cd ../scsi; $(MAKE) warlock 141 @cd ../isp; $(MAKE) warlock; 142 $(WARLOCK) -c ./ses_with_isp.wlcmd $(SES_FILES) ../isp/isp \ 143 ../warlock/scsi.ll \ 144 -l ../warlock/ddi_dki_impl.ll \ 145 $(SCSI_FILES) 146 @ $(TOUCH) $@ 147 148warlock_with_glm.ok: ses_with_glm.wlcmd $(SES_FILES) 149 @cd ../warlock; $(MAKE) warlock 150 @cd ../scsi; $(MAKE) warlock 151 @cd ../glm; $(MAKE) warlock; 152 $(WARLOCK) -c ./ses_with_glm.wlcmd $(SES_FILES) ../glm/glm \ 153 ../warlock/scsi.ll \ 154 -l ../warlock/ddi_dki_impl.ll \ 155 $(SCSI_FILES) 156 @ $(TOUCH) $@ 157 158%.ll: $(UTSBASE)/common/io/scsi/targets/%.c 159 $(WLCC) $(CPPFLAGS) -o $@ $< 160 161 162