xref: /illumos-gate/usr/src/uts/intel/aac/Makefile (revision a74f7440e9d4ba2cf59e6cbfc445479a28170f2a)
17c478bd9Sstevel@tonic-gate#
2382c8bcaSpl196000# CDDL HEADER START
3382c8bcaSpl196000#
4382c8bcaSpl196000# The contents of this file are subject to the terms of the
5382c8bcaSpl196000# Common Development and Distribution License (the "License").
6382c8bcaSpl196000# You may not use this file except in compliance with the License.
7382c8bcaSpl196000#
8382c8bcaSpl196000# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9382c8bcaSpl196000# or http://www.opensolaris.org/os/licensing.
10382c8bcaSpl196000# See the License for the specific language governing permissions
11382c8bcaSpl196000# and limitations under the License.
12382c8bcaSpl196000#
13382c8bcaSpl196000# When distributing Covered Code, include this CDDL HEADER in each
14382c8bcaSpl196000# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15382c8bcaSpl196000# If applicable, add the following below this CDDL HEADER, with the
16382c8bcaSpl196000# fields enclosed by brackets "[]" replaced with your own identifying
17382c8bcaSpl196000# information: Portions Copyright [yyyy] [name of copyright owner]
18382c8bcaSpl196000#
19382c8bcaSpl196000# CDDL HEADER END
20382c8bcaSpl196000#
21382c8bcaSpl196000
22382c8bcaSpl196000#
23*a74f7440Spl196000# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate# Use is subject to license terms.
257c478bd9Sstevel@tonic-gate#
267c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
277c478bd9Sstevel@tonic-gate#
287c478bd9Sstevel@tonic-gate#	This makefile drives the production of the aac driver kernel module.
297c478bd9Sstevel@tonic-gate#
307c478bd9Sstevel@tonic-gate#	intel implementation architecture dependent
317c478bd9Sstevel@tonic-gate#
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gate#
347c478bd9Sstevel@tonic-gate#	Path to the base of the uts directory tree (usually /usr/src/uts).
357c478bd9Sstevel@tonic-gate#
367c478bd9Sstevel@tonic-gateUTSBASE	= ../..
377c478bd9Sstevel@tonic-gate
387c478bd9Sstevel@tonic-gate#
397c478bd9Sstevel@tonic-gate#	Define the module and object file sets.
407c478bd9Sstevel@tonic-gate#
417c478bd9Sstevel@tonic-gateMODULE		= aac
427c478bd9Sstevel@tonic-gateOBJECTS		= $(AAC_OBJS:%=$(OBJS_DIR)/%)
437c478bd9Sstevel@tonic-gateLINTS		= $(AAC_OBJS:%.o=$(LINTS_DIR)/%.ln)
447c478bd9Sstevel@tonic-gateROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
45942c5e3cSpl196000CONF_SRCDIR     = $(UTSBASE)/common/io/aac
46382c8bcaSpl196000WARLOCK_OUT     = $(AAC_OBJS:%.o=%.ll)
47382c8bcaSpl196000WARLOCK_OK      = $(MODULE).ok
48382c8bcaSpl196000WLCMD_DIR       = $(UTSBASE)/common/io/warlock
497c478bd9Sstevel@tonic-gate
507c478bd9Sstevel@tonic-gate#
517c478bd9Sstevel@tonic-gate#	Include common rules.
527c478bd9Sstevel@tonic-gate#
537c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/intel/Makefile.intel
547c478bd9Sstevel@tonic-gate
557c478bd9Sstevel@tonic-gate#
567c478bd9Sstevel@tonic-gate#	Define targets
577c478bd9Sstevel@tonic-gate#
58c8343062SmeemALL_TARGET	= $(BINARY) $(CONFMOD)
597c478bd9Sstevel@tonic-gateLINT_TARGET	= $(MODULE).lint
60c8343062SmeemINSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
617c478bd9Sstevel@tonic-gate
627c478bd9Sstevel@tonic-gate#
63942c5e3cSpl196000# 	Kernel Module Dependencies
64942c5e3cSpl196000#
65942c5e3cSpl196000LDFLAGS		+= -dy -Nmisc/scsi
66942c5e3cSpl196000
67942c5e3cSpl196000#
687c478bd9Sstevel@tonic-gate# 	Overrides
697c478bd9Sstevel@tonic-gate#
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gate#
727c478bd9Sstevel@tonic-gate#	Default build targets.
737c478bd9Sstevel@tonic-gate#
747adeeb5aSmike_s.KEEP_STATE:
757c478bd9Sstevel@tonic-gate
767c478bd9Sstevel@tonic-gatedef:		$(DEF_DEPS)
777c478bd9Sstevel@tonic-gate
787c478bd9Sstevel@tonic-gateall:		$(ALL_DEPS)
797c478bd9Sstevel@tonic-gate
807c478bd9Sstevel@tonic-gateclean:		$(CLEAN_DEPS)
817c478bd9Sstevel@tonic-gate
827c478bd9Sstevel@tonic-gateclobber:	$(CLOBBER_DEPS)
837c478bd9Sstevel@tonic-gate
847c478bd9Sstevel@tonic-gatelint:		$(LINT_DEPS)
857c478bd9Sstevel@tonic-gate
867c478bd9Sstevel@tonic-gatemodlintlib:	$(MODLINTLIB_DEPS)
877c478bd9Sstevel@tonic-gate
887c478bd9Sstevel@tonic-gateclean.lint:	$(CLEAN_LINT_DEPS)
897c478bd9Sstevel@tonic-gate
907c478bd9Sstevel@tonic-gateinstall:	$(INSTALL_DEPS)
917c478bd9Sstevel@tonic-gate
927c478bd9Sstevel@tonic-gate#
937c478bd9Sstevel@tonic-gate#	Include common targets.
947c478bd9Sstevel@tonic-gate#
957c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/intel/Makefile.targ
96382c8bcaSpl196000
97382c8bcaSpl196000#
98382c8bcaSpl196000#	Defines for local commands.
99382c8bcaSpl196000#
100382c8bcaSpl196000WARLOCK		= warlock
101382c8bcaSpl196000WLCC		= wlcc
102382c8bcaSpl196000TOUCH		= touch
103382c8bcaSpl196000TEST		= test
104382c8bcaSpl196000
105382c8bcaSpl196000#
106382c8bcaSpl196000#	lock_lint rules
107382c8bcaSpl196000#
108382c8bcaSpl196000SCSI_FILES = $(SCSI_OBJS:%.o= -l $(UTSBASE)/intel/scsi/%.ll)
109382c8bcaSpl196000
110382c8bcaSpl196000%.wlcmd:
111382c8bcaSpl196000	cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@
112382c8bcaSpl196000
113382c8bcaSpl196000warlock: $(WARLOCK_OK)
114382c8bcaSpl196000
115382c8bcaSpl196000$(WARLOCK_OK): $(WARLOCK_OUT) warlock_ddi.files scsi.files aac.wlcmd
116382c8bcaSpl196000	$(WARLOCK) -c $(WLCMD_DIR)/aac.wlcmd $(WARLOCK_OUT) \
117382c8bcaSpl196000	$(SCSI_FILES) \
118382c8bcaSpl196000	$(UTSBASE)/intel/warlock/scsi.ll \
119382c8bcaSpl196000	-l $(UTSBASE)/intel/warlock/ddi_dki_impl.ll
120382c8bcaSpl196000	$(TOUCH) $@
121382c8bcaSpl196000
122942c5e3cSpl196000%.ll: $(UTSBASE)/common/io/aac/%.c
123382c8bcaSpl196000	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
124382c8bcaSpl196000
125382c8bcaSpl196000warlock_ddi.files:
126382c8bcaSpl196000	@cd $(UTSBASE)/intel/warlock; pwd; $(MAKE) warlock
127382c8bcaSpl196000
128382c8bcaSpl196000scsi.files:
129382c8bcaSpl196000	@cd $(UTSBASE)/intel/scsi; pwd; $(MAKE) warlock
130