1a4aa671eSarutz# 2a4aa671eSarutz# CDDL HEADER START 3a4aa671eSarutz# 4a4aa671eSarutz# The contents of this file are subject to the terms of the 5a4aa671eSarutz# Common Development and Distribution License (the "License"). 6a4aa671eSarutz# You may not use this file except in compliance with the License. 7a4aa671eSarutz# 8a4aa671eSarutz# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9a4aa671eSarutz# or http://www.opensolaris.org/os/licensing. 10a4aa671eSarutz# See the License for the specific language governing permissions 11a4aa671eSarutz# and limitations under the License. 12a4aa671eSarutz# 13a4aa671eSarutz# When distributing Covered Code, include this CDDL HEADER in each 14a4aa671eSarutz# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15a4aa671eSarutz# If applicable, add the following below this CDDL HEADER, with the 16a4aa671eSarutz# fields enclosed by brackets "[]" replaced with your own identifying 17a4aa671eSarutz# information: Portions Copyright [yyyy] [name of copyright owner] 18a4aa671eSarutz# 19a4aa671eSarutz# CDDL HEADER END 20a4aa671eSarutz# 21a4aa671eSarutz# 22a4aa671eSarutz#ident "%Z%%M% %I% %E% SMI" 23a4aa671eSarutz# 24a4aa671eSarutz# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 25a4aa671eSarutz# Use is subject to license terms. 26a4aa671eSarutz# 27a4aa671eSarutz# uts/sparc/dad/Makefile 28a4aa671eSarutz# 29a4aa671eSarutz# This makefile drives the production of the dad driver kernel module. 30a4aa671eSarutz# 31a4aa671eSarutz# SPARC architecture dependent 32a4aa671eSarutz# 33a4aa671eSarutz 34a4aa671eSarutz# 35a4aa671eSarutz# Path to the base of the uts directory tree (usually /usr/src/uts). 36a4aa671eSarutz# 37a4aa671eSarutzUTSBASE = ../.. 38a4aa671eSarutz 39a4aa671eSarutz# 40a4aa671eSarutz# Define the module and object file sets. 41a4aa671eSarutz# 42a4aa671eSarutzMODULE = dad 43a4aa671eSarutzOBJECTS = $(DAD_OBJS:%=$(OBJS_DIR)/%) 44a4aa671eSarutzLINTS = $(DAD_OBJS:%.o=$(LINTS_DIR)/%.ln) 45a4aa671eSarutzROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 46a4aa671eSarutzCONF_SRCDIR = $(UTSBASE)/sun/io/dada/targets 47a4aa671eSarutzWARLOCK_OUT = $(DAD_OBJS:%.o=%.ll) 48a4aa671eSarutzWARLOCK_OK = $(MODULE).ok 49a4aa671eSarutzWLCMD_DIR = $(UTSBASE)/common/io/warlock 50a4aa671eSarutz 51a4aa671eSarutz# 52a4aa671eSarutz# Include common rules. 53a4aa671eSarutz# 54a4aa671eSarutzinclude $(UTSBASE)/sparc/Makefile.sparc 55a4aa671eSarutz 56a4aa671eSarutz 57a4aa671eSarutz# 58a4aa671eSarutz# Define targets 59a4aa671eSarutz# 60a4aa671eSarutzALL_TARGET = $(BINARY) 61a4aa671eSarutzLINT_TARGET = $(MODULE).lint 62a4aa671eSarutzINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) 63a4aa671eSarutz 64a4aa671eSarutz# 65a4aa671eSarutz# Overrides. 66a4aa671eSarutz# 67a4aa671eSarutzCFLAGS += $(CCVERBOSE) 68a4aa671eSarutzLDFLAGS += -dy -Nmisc/dada -Nmisc/cmlb 69a4aa671eSarutz 70a4aa671eSarutz# 71a4aa671eSarutz# For now, disable these lint checks; maintainers should endeavor 72a4aa671eSarutz# to investigate and remove these for maximum lint coverage. 73a4aa671eSarutz# Please do not carry these forward to new Makefiles. 74a4aa671eSarutz# 75a4aa671eSarutzLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN 76a4aa671eSarutzLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV 77a4aa671eSarutzLINTTAGS += -erroff=E_STATIC_UNUSED 78a4aa671eSarutzLINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON 79a4aa671eSarutz 80a4aa671eSarutz# 81a4aa671eSarutz# Default build targets. 82a4aa671eSarutz# 83a4aa671eSarutz.KEEP_STATE: 84a4aa671eSarutz 85a4aa671eSarutzall: $(ALL_DEPS) 86a4aa671eSarutz 87a4aa671eSarutzdef: $(DEF_DEPS) 88a4aa671eSarutz 89a4aa671eSarutzclean: $(CLEAN_DEPS) 90a4aa671eSarutz $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 91a4aa671eSarutz 92a4aa671eSarutzclobber: $(CLOBBER_DEPS) 93a4aa671eSarutz $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 94a4aa671eSarutz 95a4aa671eSarutzlint: $(LINT_DEPS) 96a4aa671eSarutz 97a4aa671eSarutzmodlintlib: $(MODLINTLIB_DEPS) lint64 98a4aa671eSarutz 99a4aa671eSarutzclean.lint: $(CLEAN_LINT_DEPS) 100a4aa671eSarutz 101a4aa671eSarutzinstall: $(INSTALL_DEPS) 102a4aa671eSarutz 103a4aa671eSarutz# 104a4aa671eSarutz# Include common targets. 105a4aa671eSarutz# 106a4aa671eSarutzinclude $(UTSBASE)/sparc/Makefile.targ 107a4aa671eSarutz 108a4aa671eSarutz 109a4aa671eSarutz# 110a4aa671eSarutz# Defines for local commands. 111a4aa671eSarutz# 112a4aa671eSarutzWARLOCK = warlock 113a4aa671eSarutzWLCC = wlcc 114a4aa671eSarutzTOUCH = touch 115a4aa671eSarutzTEST = test 116a4aa671eSarutz 117a4aa671eSarutz# 118a4aa671eSarutz# Warlock targets 119a4aa671eSarutz# 120a4aa671eSarutz# Note that in warlock_with_{esp,isp} it is important to load sd.ll 121a4aa671eSarutz# before {isp,esp}.ll; the reason is that both have _init/_info/_fini 122a4aa671eSarutz# and warlock can only handle one extern function by a given name; 123a4aa671eSarutz# any loaded after the first are ignored. 124a4aa671eSarutz 125a4aa671eSarutzDADA_FILES = $(DADA_OBJS:%.o=-l $(UTSBASE)/sparc/dada/%.ll) 126a4aa671eSarutzCMLB_FILES = $(CMLB_OBJS:%.o=-l $(UTSBASE)/sparc/cmlb/%.ll) 127a4aa671eSarutz 128a4aa671eSarutzwarlock: warlock_alone 129a4aa671eSarutz 130a4aa671eSarutzwarlock_alone: $(WARLOCK_OK) 131a4aa671eSarutz 132a4aa671eSarutzdada_files: 133a4aa671eSarutz @cd $(UTSBASE)/sparc/dada; pwd; $(MAKE) warlock 134a4aa671eSarutz 135a4aa671eSarutzcmlb_files: 136a4aa671eSarutz @cd $(UTSBASE)/sparc/cmlb; pwd; $(MAKE) warlock 137a4aa671eSarutz 138*bf56214cSstevel$(WARLOCK_OK): $(WLCMD_DIR)/dad.wlcmd $(WARLOCK_OUT) dada_files \ 139*bf56214cSstevel warlock_ddi.files cmlb_files 140a4aa671eSarutz $(WARLOCK) -c $(WLCMD_DIR)/dad.wlcmd $(WARLOCK_OUT) -l $(DADA_FILES) \ 141a4aa671eSarutz -l $(CMLB_FILES) \ 142a4aa671eSarutz -l $(UTSBASE)/sparc/warlock/ddi_dki_impl.ll 143a4aa671eSarutz $(TOUCH) $@ 144a4aa671eSarutz 145a4aa671eSarutz%.ll: $(UTSBASE)/sun/io/dada/targets/%.c 146a4aa671eSarutz $(WLCC) $(CPPFLAGS) -o $@ $< 147a4aa671eSarutz 148a4aa671eSarutzwarlock_ddi.files: 149a4aa671eSarutz @cd $(UTSBASE)/sparc/warlock; pwd; $(MAKE) warlock 150