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 26# 27# Path to the base of the uts directory tree. 28# 29UTSBASE = ../.. 30 31# 32# Define the module and object file sets. 33# 34MODULE = scsa1394 35OBJECTS = $(SCSA1394_OBJS:%=$(OBJS_DIR)/%) 36LINTS = $(SCSA1394_OBJS:%.o=$(LINTS_DIR)/%.ln) 37ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 38WARLOCK_OUT = $(SCSA1394_OBJS:%.o=%.ll) 39WARLOCK_OK = $(MODULE).ok 40WLCMD_DIR = $(UTSBASE)/common/io/warlock 41 42# 43# Include common rules. 44# 45include $(UTSBASE)/intel/Makefile.intel 46 47# 48# Define targets 49# 50ALL_TARGET = $(BINARY) 51LINT_TARGET = $(MODULE).lint 52INSTALL_TARGET = $(BINARY) $(ROOTMODULE) 53 54# 55# depends on 56# 57LDFLAGS += -dy -Nmisc/scsi -Nmisc/s1394 -Nmisc/sbp2 58 59# 60# For now, disable these lint checks; maintainers should endeavor 61# to investigate and remove these for maximum lint coverage. 62# Please do not carry these forward to new Makefiles. 63# 64LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON 65LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN 66LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV 67 68CERRWARN += -_gcc=-Wno-parentheses 69CERRWARN += -_gcc=-Wno-uninitialized 70 71# Default build targets. 72# 73.KEEP_STATE: 74 75def: $(DEF_DEPS) 76 77all: $(ALL_DEPS) 78 79clean: $(CLEAN_DEPS) 80 $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 81 82clobber: $(CLOBBER_DEPS) 83 $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 84 85lint: $(LINT_DEPS) 86 87modlintlib: $(MODLINTLIB_DEPS) 88 89clean.lint: $(CLEAN_LINT_DEPS) 90 91install: $(INSTALL_DEPS) 92 93# 94# Include common targets. 95# 96include $(UTSBASE)/intel/Makefile.targ 97 98# 99# Defines for local commands. 100# 101WARLOCK = warlock 102WLCC = wlcc 103TOUCH = touch 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$(WARLOCK_OK): $(WARLOCK_OUT) sbp2.files warlock_ddi.files \ 117 $(WLCMD_DIR)/scsa1394.wlcmd sd.files scsi.files cmlb.files 118 $(WARLOCK) -c $(WLCMD_DIR)/scsa1394.wlcmd $(WARLOCK_OUT) $(SD_FILES) \ 119 $(SCSI_FILES) \ 120 $(CMLB_FILES) \ 121 $(SBP2_FILES) \ 122 -l ../warlock/ddi_dki_impl.ll 123 $(TOUCH) $@ 124 125%.ll: $(UTSBASE)/common/io/1394/targets/scsa1394/%.c 126 $(WLCC) $(CPPFLAGS) -DNPROBE -DDEBUG -o $@ $< 127 128sbp2.files: 129 @cd ../sbp2; pwd; $(MAKE) warlock 130 131warlock_ddi.files: 132 @cd ../warlock; pwd; $(MAKE) warlock 133 134sd.files: 135 @cd ../sd; pwd; $(MAKE) warlock_alone 136 137scsi.files: 138 @cd ../scsi; pwd; $(MAKE) warlock 139 140cmlb.files: 141 @cd ../cmlb; pwd; $(MAKE) warlock 142 143