1*1c42de6dSgd78059# 2*1c42de6dSgd78059# CDDL HEADER START 3*1c42de6dSgd78059# 4*1c42de6dSgd78059# The contents of this file are subject to the terms of the 5*1c42de6dSgd78059# Common Development and Distribution License (the "License"). 6*1c42de6dSgd78059# You may not use this file except in compliance with the License. 7*1c42de6dSgd78059# 8*1c42de6dSgd78059# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*1c42de6dSgd78059# or http://www.opensolaris.org/os/licensing. 10*1c42de6dSgd78059# See the License for the specific language governing permissions 11*1c42de6dSgd78059# and limitations under the License. 12*1c42de6dSgd78059# 13*1c42de6dSgd78059# When distributing Covered Code, include this CDDL HEADER in each 14*1c42de6dSgd78059# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*1c42de6dSgd78059# If applicable, add the following below this CDDL HEADER, with the 16*1c42de6dSgd78059# fields enclosed by brackets "[]" replaced with your own identifying 17*1c42de6dSgd78059# information: Portions Copyright [yyyy] [name of copyright owner] 18*1c42de6dSgd78059# 19*1c42de6dSgd78059# CDDL HEADER END 20*1c42de6dSgd78059# 21*1c42de6dSgd78059# 22*1c42de6dSgd78059# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23*1c42de6dSgd78059# Use is subject to license terms. 24*1c42de6dSgd78059# 25*1c42de6dSgd78059# ident "%Z%%M% %I% %E% SMI" 26*1c42de6dSgd78059 27*1c42de6dSgd78059# This makefile drives the production of the i2bsc nexus driver. 28*1c42de6dSgd78059# 29*1c42de6dSgd78059# Path to the base of the uts directory tree (usually /usr/src/uts). 30*1c42de6dSgd78059 31*1c42de6dSgd78059UTSBASE = ../.. 32*1c42de6dSgd78059 33*1c42de6dSgd78059# 34*1c42de6dSgd78059# Define the module and object file sets. 35*1c42de6dSgd78059# 36*1c42de6dSgd78059MODULE = i2bsc 37*1c42de6dSgd78059OBJECTS = $(I2BSC_OBJS:%=$(OBJS_DIR)/%) 38*1c42de6dSgd78059LINTS = $(I2BSC_OBJS:%.o=$(LINTS_DIR)/%.ln) 39*1c42de6dSgd78059ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) 40*1c42de6dSgd78059CONF_SRCDIR = $(UTSBASE)/sun4u/io/i2c/nexus 41*1c42de6dSgd78059 42*1c42de6dSgd78059# 43*1c42de6dSgd78059# Include common rules. 44*1c42de6dSgd78059# 45*1c42de6dSgd78059include $(UTSBASE)/sun4u/Makefile.sun4u 46*1c42de6dSgd78059 47*1c42de6dSgd78059# 48*1c42de6dSgd78059# lint pass one enforcement 49*1c42de6dSgd78059# 50*1c42de6dSgd78059CFLAGS += $(CCVERBOSE) -I$(UTSBASE)/sun4u 51*1c42de6dSgd78059 52*1c42de6dSgd78059LDFLAGS += -dy -N misc/i2c_svc 53*1c42de6dSgd78059 54*1c42de6dSgd78059# 55*1c42de6dSgd78059# Define targets 56*1c42de6dSgd78059# 57*1c42de6dSgd78059ALL_TARGET = $(BINARY) 58*1c42de6dSgd78059LINT_TARGET = $(MODULE).lint 59*1c42de6dSgd78059INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) 60*1c42de6dSgd78059 61*1c42de6dSgd78059# 62*1c42de6dSgd78059# For now, disable these lint checks; maintainers should endeavor 63*1c42de6dSgd78059# to investigate and remove these for maximum lint coverage. 64*1c42de6dSgd78059# Please do not carry these forward to new Makefiles. 65*1c42de6dSgd78059# 66*1c42de6dSgd78059LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN 67*1c42de6dSgd78059LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW 68*1c42de6dSgd78059LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV 69*1c42de6dSgd78059 70*1c42de6dSgd78059.KEEP_STATE: 71*1c42de6dSgd78059 72*1c42de6dSgd78059def: $(DEF_DEPS) 73*1c42de6dSgd78059 74*1c42de6dSgd78059all: $(ALL_DEPS) 75*1c42de6dSgd78059 76*1c42de6dSgd78059clean: $(CLEAN_DEPS) 77*1c42de6dSgd78059 78*1c42de6dSgd78059clobber: $(CLOBBER_DEPS) 79*1c42de6dSgd78059 80*1c42de6dSgd78059lint: $(LINT_DEPS) 81*1c42de6dSgd78059 82*1c42de6dSgd78059modlintlib: $(MODLINTLIB_DEPS) 83*1c42de6dSgd78059 84*1c42de6dSgd78059clean.lint: $(CLEAN_LINT_DEPS) 85*1c42de6dSgd78059 86*1c42de6dSgd78059install: $(INSTALL_DEPS) 87*1c42de6dSgd78059 88*1c42de6dSgd78059# 89*1c42de6dSgd78059# Defines for local commands. 90*1c42de6dSgd78059# 91*1c42de6dSgd78059WLCC = wlcc 92*1c42de6dSgd78059TOUCH = touch 93*1c42de6dSgd78059WARLOCK = warlock 94*1c42de6dSgd78059 95*1c42de6dSgd78059# 96*1c42de6dSgd78059# Warlock targets 97*1c42de6dSgd78059# 98*1c42de6dSgd78059 99*1c42de6dSgd78059I2BSC = $(I2BSC_OBJS:%.o=%.ll) 100*1c42de6dSgd78059 101*1c42de6dSgd78059warlock: $(MODULE).ok 102*1c42de6dSgd78059 103*1c42de6dSgd78059%.ok: $(I2BSC_FILES) 104*1c42de6dSgd78059 $(TOUCH) $@ 105*1c42de6dSgd78059 106*1c42de6dSgd78059%.ll: $(UTSBASE)/sun4u/io/i2c/nexus/i2bsc/%.c 107*1c42de6dSgd78059 $(WLCC) $(CFLAGS) $(CPPFLAGS) -DDEBUG -o $@ $< 108*1c42de6dSgd78059 109*1c42de6dSgd78059# 110*1c42de6dSgd78059# Include common targets 111*1c42de6dSgd78059# 112*1c42de6dSgd78059include $(UTSBASE)/sun4u/Makefile.targ 113