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 (the "License"). 6# You may not use this file except in compliance with the License. 7# 8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9# or http://www.opensolaris.org/os/licensing. 10# See the License for the specific language governing permissions 11# and limitations under the License. 12# 13# When distributing Covered Code, include this CDDL HEADER in each 14# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15# If applicable, add the following below this CDDL HEADER, with the 16# fields enclosed by brackets "[]" replaced with your own identifying 17# information: Portions Copyright [yyyy] [name of copyright owner] 18# 19# CDDL HEADER END 20# 21# 22# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23# Use is subject to license terms. 24# 25#ident "%Z%%M% %I% %E% SMI" 26# 27 28# 29# Path to the base of the uts directory tree. 30# 31UTSBASE = ../.. 32 33# 34# Define the module and object file sets. 35# 36MODULE = scsa1394 37OBJECTS = $(SCSA1394_OBJS:%=$(OBJS_DIR)/%) 38LINTS = $(SCSA1394_OBJS:%.o=$(LINTS_DIR)/%.ln) 39ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 40WARLOCK_OUT = $(SCSA1394_OBJS:%.o=%.ll) 41WARLOCK_OK = $(MODULE).ok 42WLCMD_DIR = $(UTSBASE)/common/io/warlock 43 44# 45# Include common rules. 46# 47include $(UTSBASE)/intel/Makefile.intel 48 49# 50# Define targets 51# 52ALL_TARGET = $(BINARY) 53LINT_TARGET = $(MODULE).lint 54INSTALL_TARGET = $(BINARY) $(ROOTMODULE) 55 56# 57# depends on 58# 59LDFLAGS += -dy -Nmisc/scsi -Nmisc/s1394 -Nmisc/sbp2 60 61# 62# For now, disable these lint checks; maintainers should endeavor 63# to investigate and remove these for maximum lint coverage. 64# Please do not carry these forward to new Makefiles. 65# 66LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON 67LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN 68LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV 69 70# Default build targets. 71# 72.KEEP_STATE: 73 74def: $(DEF_DEPS) 75 76all: $(ALL_DEPS) 77 78clean: $(CLEAN_DEPS) 79 $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 80 81clobber: $(CLOBBER_DEPS) 82 $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 83 84lint: $(LINT_DEPS) 85 86modlintlib: $(MODLINTLIB_DEPS) 87 88clean.lint: $(CLEAN_LINT_DEPS) 89 90install: $(INSTALL_DEPS) 91 92# 93# Include common targets. 94# 95include $(UTSBASE)/intel/Makefile.targ 96 97# 98# Defines for local commands. 99# 100WARLOCK = warlock 101WLCC = wlcc 102TOUCH = touch 103SCCS = sccs 104TEST = test 105 106# 107# Warlock targets 108# 109SBP2_FILES = $(SBP2_OBJS:%.o= -l ../sbp2/%.ll) 110SD_FILES = $(SD_OBJS:%.o=../sd/%.ll) 111SCSI_FILES = $(SCSI_OBJS:%.o= -l ../scsi/%.ll) 112CMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll) 113 114warlock: $(WARLOCK_OK) 115 116%.wlcmd: 117 cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@ 118 119$(WARLOCK_OK): $(WARLOCK_OUT) sbp2.files warlock_ddi.files scsa1394.wlcmd \ 120 sd.files scsi.files cmlb.files 121 $(WARLOCK) -c $(WLCMD_DIR)/scsa1394.wlcmd $(WARLOCK_OUT) $(SD_FILES) \ 122 $(SCSI_FILES) \ 123 $(CMLB_FILES) \ 124 $(SBP2_FILES) \ 125 -l ../warlock/ddi_dki_impl.ll 126 $(TOUCH) $@ 127 128%.ll: $(UTSBASE)/common/io/1394/targets/scsa1394/%.c 129 $(WLCC) $(CPPFLAGS) -DNPROBE -DDEBUG -o $@ $< 130 131sbp2.files: 132 @cd ../sbp2; pwd; $(MAKE) warlock 133 134warlock_ddi.files: 135 @cd ../warlock; pwd; $(MAKE) warlock 136 137sd.files: 138 @cd ../sd; pwd; $(MAKE) warlock_alone 139 140scsi.files: 141 @cd ../scsi; pwd; $(MAKE) warlock 142 143cmlb.files: 144 @cd ../cmlb; pwd; $(MAKE) warlock 145 146