Makefile revision 3138:7bbdcbfa4cd5
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 2006 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) 112 113warlock: $(WARLOCK_OK) 114 115%.wlcmd: 116 cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@ 117 118$(WARLOCK_OK): $(WARLOCK_OUT) sbp2.files warlock_ddi.files scsa1394.wlcmd \ 119 sd.files scsi.files 120 $(WARLOCK) -c $(WLCMD_DIR)/scsa1394.wlcmd $(WARLOCK_OUT) $(SD_FILES) \ 121 $(SCSI_FILES) \ 122 $(SBP2_FILES) \ 123 -l ../warlock/ddi_dki_impl.ll 124 $(TOUCH) $@ 125 126%.ll: $(UTSBASE)/common/io/1394/targets/scsa1394/%.c 127 $(WLCC) $(CPPFLAGS) -DNPROBE -DDEBUG -o $@ $< 128 129sbp2.files: 130 @cd ../sbp2; pwd; $(MAKE) warlock 131 132warlock_ddi.files: 133 @cd ../warlock; pwd; $(MAKE) warlock 134 135sd.files: 136 @cd ../sd; pwd; $(MAKE) warlock_alone 137 138scsi.files: 139 @cd ../scsi; pwd; $(MAKE) warlock 140 141 142